SUMMARY: compiler bugs

From: Daniele Fua <fua_at_g24ux.sci.uniroma1.it>
Date: Tue, 17 Jan 1995 17:30:14 +0100 (MET)

I wrote an alarmed letter on mathematical errors
generated by C and Fortran compilers.
I received 7 responses: 4 from Digital people who were
willing to know more and help. Their concern is very
appreciated.

1) C compiler bug; there is a way to avoid it: see the
SUMMARY: Another "cc -O2 compiler...
by mattias_at_thep.lu.se... on this list on January 10.


2) Fortran compiler bug: there is a problem
with the -r8 option.

>==================================
> program complex
> complex a,b
> pi=4.*atan(1.)
> a=cmplx(exp(1.),0.)
> b=cmplx(0.,.25*pi)
> write(6,*) a**b
> end
>
>===================================
>DEC OSF/1 V2.1 (Rev. 250)
>DEC Fortran V3.4-480
>
>%f77 complex.f
>%a.out
> (0.7071068,0.7071068)
>
>%f77 -r8 complex.f
>%a.out
> (0.539641485816297,0.000000000000000E+000)
>===================================
===================================

DEC OSF/1 V3.0 with Fortran V3.6 has solved the bug!

3) As far as I know there are no other bugs, but I
strongly recommend everybody to publicize any bug as soon as it
is noticed.

4) Regarding the more general question on how we (users)
deal with compiler errors, Digital assures that they always
do their best but..."errare humanum est..."; nobody
can argue this. In very critical situations one must
double check with other computers and other operating
systems.

Thanks to:
Tom Blinn
Bill Gray
Thomas Heistracher
Drew Kramer
Michael G. Morissey
Jon Reeves
Stan Whitlock
-- 
+--------------------------------+--------------------------------------------+
| Daniele Fua`  G24              | E-mail: fua_at_g24ux.sci.uniroma1.it          |
| Dept. of Physics               | Phone : +39 6 4991 3515                    |
| Universita` "La Sapienza"      | Fax   : +39 6 4991 3522                    |
| P.le A. Moro, 2                |                                            |
| 00185 Roma, Italy              |                                            |
+--------------------------------+--------------------------------------------+
Received on Tue Jan 17 1995 - 11:28:35 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:45 NZDT