This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
f77 library problem
- To: gcc-bugs at gcc dot gnu dot org, or at hackingi dot freeserve dot co dot uk, bug-gcc at gnu dot org
- Subject: f77 library problem
- From: Ian Hacking <ian at hackingi dot freeserve dot co dot uk>
- Date: Fri, 03 Mar 2000 11:35:07 +0000
I seem to be having problems with the fortran library routine for ASIN.
I am using the Nov 1999 Gcc-2.95.2 version .
As seen from the code, often the first value returned prints as
-1.#IND0 which seems to have a hex value of 0x0000000000000000 .
If the ASIN call is reissued immediately , it gives the correct answer.
Is this a hardware problem, I am using an IBM Cyrix 333MHz processor,
or is it software ??
I must admit this has shaken my confidence , as I was getting real good
results from G77 .
FUNCTION DARSIN(ANGLE)
C
C PURPOSE:
C ======= Returns the Inverse Cosine of the argument Angle as Real*8.
C
C INPUT ARGUMENTS:
C ===============
C
REAL*8 ANGLE
C
C OUTPUT ARGUMENTS:
C ================
C
REAL*8 DARSIN
C
C LOCAL VARIABLES:
C ===============
REAL*8 DTEMP
INTEGER ITEMP(2)
EQUIVALENCE (ITEMP(2),DTEMP)
C
C
C/////////////////////////////////////////////////////////////////////
C |
C START OF EXECUTABLE CODE |
C |
C/////////////////////////////////////////////////////////////////////
C
DARSIN= ASIN(ANGLE)
DTEMP = DARSIN
IF (ITEMP(1).EQ.0 .AND .ITEMP(2).EQ.0 .AND.
1 DABS(ANGLE).GT.1.D-9) THEN
WRITE( 6,1002) ANGLE , DARSIN, ITEMP
1002 FORMAT( ' DARSIN , angles =',2F10.5,2Z9)
DTEMP = ASIN(ANGLE)
IF (ITEMP(1).EQ.0 .AND .ITEMP(2).EQ.0 )THEN
WRITE(6,*) ' Wrong AGAIN '
DARSIN = ANGLE
ELSE
DARSIN = DTEMP
ENDIF
WRITE(6,1003)ANGLE , DARSIN, ITEMP
1003 FORMAT( ' DARSIN updated =',2F10.5,2Z9)
ENDIF
RETURN
END
DARSIN , angles = 0.33363 -1.#IND0 0 0
DARSIN updated = 0.33363 0.34015 0 5FBBFC76
DARSIN , angles = 0.32692 -1.#IND0 0 0
DARSIN updated = 0.32692 0.33305 0 32A57E98
DARSIN , angles = 0.33361 -1.#IND0 0 0
DARSIN updated = 0.33361 0.34014 0 F4EBBC2F
DARSIN , angles = 0.32694 -1.#IND0 0 0
DARSIN updated = 0.32694 0.33307 0 181F0B06
begin:vcard
n:;Ian Hacking
x-mozilla-html:FALSE
version:2.1
email;internet:ian@hackingi.freeserve.co.uk
x-mozilla-cpt:;0
fn:Ian Hacking
end:vcard