Mail Archives: djgpp/1998/05/19/07:00:07
Message-ID: | <3561653C.430C3AE4@eik.bme.hu>
|
Date: | Tue, 19 May 1998 12:55:56 +0200
|
From: | "Dr. András Sólyom" <solyom AT eik DOT bme DOT hu>
|
Organization: | TU Budapest
|
MIME-Version: | 1.0
|
To: | djgpp <djgpp AT delorie DOT com>
|
Subject: | Re: Code to Fix sinh() in libm.a
|
On Tue, 19 May 1998 Eli Zaretskii wrote:
> So a library should provide a means for the application to have these
> indications when they are needed, and a means to work inobtrusively
> when they aren't. I think setting errno and calling matherr as
> appropriate are just these means. Both are benign enough to programs
> which don't care about the exceptional conditions: you just continue
> the computations with the produced Inf, NaN, or whatever.
In Dr. Dobbs's Journal there was an interview with the man who contributed
much to the first floating point coprocessor. He stated that the Microsoft
compilers are not only weeker than the Borland compilers when floating point
accuracy is concerned but have an other very important limitation:
there is no possibility to detect some floating point exceptions, because the
compiler itself hides them from the application!
(If I remember correctly the problem is that reading some registers of the FPU
clears the corresponding error bits in the status register.) So in this case -
as he said - it would be not enough to replace the floating point libraries,
the compiler should be modified, which of course is not posssible for anyone
else than Microsoft. It will not do it because people do not demand them to do
it.
What is the case with GCC ? DOes it allow to catch/test all possible floating
point exceptions?
Andras
- Raw text -