LAPACK Archives

[Lapack] Lapack 3.2.2 - dlatm7.f, divide-by-zero.

I'm using Silverfrost ftn95, version 5.50, on windows XP (SP3). I got
this divide-by-zero when running the test suite.


About line 187 is the block

         IF( N.GT.1 ) THEN
            ALPHA = COND**( -ONE / DBLE( RANK-1 ) )
            DO 170 I = 2, RANK
               D( I ) = ALPHA**( I-1 )
  170       CONTINUE
            DO 180 I = RANK + 1, N
               D( I ) = ZERO
  180       CONTINUE
         END IF

For RANK==1, the 1st loop is zero-trip, so the divide-by-zero may be
avoided by putting the assignment for alpha inside the loop (lazy, I
know, but, hey, it's a test program).

         IF( N.GT.1 ) THEN
C.jm ftn95 blows up rank.eq.1            ALPHA = COND**( -ONE / DBLE(
RANK-1 ) )
            DO 170 I = 2, RANK
               ALPHA = COND**( -ONE / DBLE( RANK-1 ) )
               D( I ) = ALPHA**( I-1 )
  170       CONTINUE
            DO 180 I = RANK + 1, N
               D( I ) = ZERO
  180       CONTINUE
         END IF

[ftn95 does not like floating divide-by-zero or arithmetic with denorms,
so I've had to nobble ilaenv.f to return zero for ISPEC values 10 and
11.]

-- 
John Mansell                    e-mail: john@Domain.Removed
                                        john.mansell@Domain.Removed
Whessoe Computing Systems       Phone: +44 (0)1325 390000
Whessoe Technology Centre       Fax:   +44 (0)1325 390008
Morton Palms
Darlington DL1 4WB


Whessoe Projects Limited
Registration No 06453867
Registered in England
Registered Office: Whessoe Technology Centre, Alderman Best Way,
                   Morton Palms, Darlington, Co Durham, DL1 4WB

Privileged/Confidential Information may be contained in this message. If
you are not the addressee indicated in this message (or responsible for
delivery of the message to such person), you may not copy or deliver this
message to anyone.  In such case, you should notify us immediately, and
destroy this message.  If you or your employer do not consent to Internet
Email messages of this kind, please advise us immediately.


<Prev in Thread] Current Thread [Next in Thread>
  • [Lapack] Lapack 3.2.2 - dlatm7.f, divide-by-zero., John Mansell <=


For additional information you may use the LAPACK/ScaLAPACK Forum.
Or one of the mailing lists, or