home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.compilers
- Path: sparky!uunet!paladin.american.edu!darwin.sura.net!ukma!cs.widener.edu!eff!world!iecc!compilers-sender
- From: bart@cs.uoregon.edu (Barton Christopher Massey)
- Subject: Re: IEEE arithmetic handling
- Reply-To: bart@cs.uoregon.edu (Barton Christopher Massey)
- Organization: University of Oregon Computer and Information Sciences Dept.
- Date: Thu, 19 Nov 1992 07:55:41 GMT
- Approved: compilers@iecc.cambridge.ma.us
- Message-ID: <92-11-108@comp.compilers>
- Keywords: Fortran, arithmetic
- References: <92-11-041@comp.compilers> <92-11-097@comp.compilers>
- Sender: compilers-sender@iecc.cambridge.ma.us
- Lines: 31
-
- eggert@twinsun.com (Paul Eggert) writes:
- > But that conflicts with IEEE Std 754-1985, section 5.6, which requires
- > that converting a number from binary to decimal and back be the identity
- > if the proper precision and rounding is used. The Fortran standard says
- > -0.0 must be output as 0.0; this loses information.
-
- This and other recent similar comments about compilers and IEEE reminded
- me of this note from the back of a recent technical report here (How To
- Read Floating Point Numbers Accurately, William D. Clinger, University of
- Oregon CIS-TR-90-01, June 1990)
-
- The IEEE standard explicitly states that, in high level
- languages, the destination of an arithmetic operation
- may be determined by the compiler, and hence may be
- beyond the control of programmers. In other words, the
- compiler -- not the programmer who uses the compiler --
- is regarded as the client of the standard. Thus the
- error bounds guaranteed by the IEEE standard may not be
- relied upon by programmers who work in high level
- languages.
-
- Modulo arguments about whether FORTRAN is a high-level language :-), it
- seems to me that this pretty much answers the question of whether FORTRAN
- arithmetic is IEEE compliant. It's not, but it needn't be, and it may be
- unrealistic to expect it to be, given the goals of HLL design.
-
- Bart Massey
- bart@cs.uoregon.edu
- --
- Send compilers articles to compilers@iecc.cambridge.ma.us or
- {ima | spdcc | world}!iecc!compilers. Meta-mail to compilers-request.
-