Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!physics.mcgill.ca!loki From: loki@physics.mcgill.ca (Loki Jorgenson Rm421) Newsgroups: comp.sys.sgi Subject: IRIXv3.3.1 FORTRAN I/O BUG Message-ID: <9012030315.AA02428@frodo.Physics.McGill.CA> Date: 3 Dec 90 03:15:29 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 61 This is being submitted on behalf of another IRIS user in our local group who does not monitor info-iris (at least not until recently). Please let me know if this bug has already mentioned. __ __ Loki Jorgenson / / \ \ node: loki@physics.mcgill.ca Grad, Systems Manager / ////// \\\\\\ \ BITNET: PY29@MCGILLA Physics, McGill University \ \\\\\\ ////// / fax: (514) 398-3733 Montreal Quebec CANADA \_\ /_/ phone: (514) 398-6531 ----------------------------------------------------------------------------- I believe I've discovered an Iris Fortran i/o bug. It only occurs when printing out numbers smaller than E-100, so it only happens with double precision (real*8). If the number is smaller than 1.E-100 the I/O routine 'forgets' to print the letter E. Consider output from the following trivial program: program writetest integer i, j real*8 tmp, temp tmp = 100.d0 temp = 1.e-86 do 100 i=1, 140 temp = temp / tmp write(6,*) temp 100 continue stop end The output is: 1.0000000000000004E-88 1.0000000000000004E-90 1.0000000000000006E-92 1.0000000000000004E-94 1.0000000000000008E-96 1.0000000000000008E-98 1.0000000000000008-100 <--- note the E is missing !!!! 1.0000000000000008-102 1.0000000000000008-104 . . and so on..... Thus any program reading this output gets gibberish. Output also fails if you use an exponential format (eg g14.7) for output. ** HOWEVER. ** 1) You can succesfully do i/o from unformatted files. 2) This problem does NOT occur in C. So, how about it? Anyone else notice this little gem? How about you people at SGI? We are running 3.3.1, by the way, so I don't know if this was a bug in 3.2.1. Ian. ----------------------------------------------------------------------------- Ian Graham ------------ node: igraham@physics.mcgill.ca Physics, McGill University | * * * * * * | fax: (514) 398-3733 Montreal Quebec CANADA ------------ phone: (514) 398-6526