home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / compiler / 1906 < prev    next >
Encoding:
Text File  |  1992-11-18  |  1.3 KB  |  32 lines

  1. Newsgroups: comp.compilers
  2. Path: sparky!uunet!think.com!spdcc!iecc!compilers-sender
  3. From: eggert@twinsun.com (Paul Eggert)
  4. Subject: Re: IEEE arithmetic handling
  5. Reply-To: eggert@twinsun.com (Paul Eggert)
  6. Organization: Twin Sun, Inc
  7. Date: Tue, 17 Nov 1992 18:58:37 GMT
  8. Approved: compilers@iecc.cambridge.ma.us
  9. Message-ID: <92-11-097@comp.compilers>
  10. References: <92-11-041@comp.compilers> <92-11-087@comp.compilers>
  11. Keywords: arithmetic
  12. Sender: compilers-sender@iecc.cambridge.ma.us
  13. Lines: 17
  14.  
  15. bill@amber.csd.harris.com (Bill Leonard) writes:
  16.  
  17. >Fortran does not *conflict* with the IEEE vis-a-vis negative zero. It merely
  18. >says that the processor must never *output* a negatively-signed zero.
  19.  
  20. But that conflicts with IEEE Std 754-1985, section 5.6, which requires
  21. that converting a number from binary to decimal and back be the identity
  22. if the proper precision and rounding is used.  The Fortran standard says
  23. -0.0 must be output as 0.0; this loses information.
  24.  
  25. One way to work around the problem is to supply IEEE-specific
  26. binary/decimal conversion routines to the Fortran programmer, but there's
  27. no standard for this, and most implementors don't bother.  So in practice,
  28. I'm afraid that Fortran and IEEE are indeed in conflict here.
  29. -- 
  30. Send compilers articles to compilers@iecc.cambridge.ma.us or
  31. {ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
  32.