Xref: utzoo comp.compilers:1440 comp.lang.fortran:4003 Path: utzoo!attcan!uunet!ogicse!mintaka!spdcc!esegue!compilers-sender From: eggert@twinsun.com (Paul Eggert) Newsgroups: comp.compilers,comp.lang.fortran Subject: Re: IEEE 754 vs Fortran arithmetic Keywords: Fortran Message-ID: <1990Oct25.010604.4796@twinsun.com> Date: 25 Oct 90 01:06:04 GMT References: <9010230628.AA22160@admin.ogi.edu> <1990Oct24.162529.20452@zoo.toronto.edu> Sender: compilers-sender@esegue.segue.boston.ma.us Reply-To: eggert@twinsun.com (Paul Eggert) Organization: Twin Sun, Inc Lines: 13 Approved: compilers@esegue.segue.boston.ma.us Apparently-To: uunet!comp-compilers >[Given that +0 = -0, it's not clear to me that the existence of -0 breaks >anything. Keep in mind that F77 is a permissive standard.... -John] Not permissive enough, unfortunately: IEEE's -0.0 breaks F77's input/output. ANSI X3.9-1978 says that -0.0 and +0.0 must print the same way. IEEE 754-1985 says that -0.0 and +0.0 are distinct, and that printing any number and reading it back in must yield the original number if the proper precision is used. These provisions contradict each other. An implementation cannot conform to both standards without unnatural contortions. I suspect most F77 implementations simply ignore the IEEE requirement here. -- Send compilers articles to compilers@esegue.segue.boston.ma.us {ima | spdcc | world}!esegue. Meta-mail to compilers-request@esegue.