Mail Archives: djgpp/1996/03/10/01:04:02
erik AT tntnhb3 DOT tn DOT tudelft DOT nl (Erik Luijten) writes:
>The recent messages about DJGPP's floating point library have somewhat
>disturbed me. Therefore I have compiled paranoia (from netlib), to see whether
>this program reveals some problems. Well, I have compiled it without
>optimization (the program completely choked when I tried -O2, why?) and
>paranoia said the following:
>No chopping nor rounding on * / + - sqrt: sticky bit incorrectly used or not
>used at all.
This is a bug in the paranoia program. The job that paranoia seeks
to perform cannot be done within well-defined C. The assumptions
that paranoia puts on the compiler are not present in the C standard.
Paranoia assumes that there is a one-to-one correspondence between
operations ("+", "-", ...) at source level and operations at the
target language level ("FADD", ...). This is not required by the
C standard and it is not so for gcc, probably not even with
"optimizations off".
Things are different in fortran where parentheses have more than
syntactic meaning.
Morten
- Raw text -