Re: [xml] XPath Infinities
- From: Sander Vesik <Sander Vesik Sun COM>
- To: Bjorn Reese <breese mail1 stofanet dk>
- Cc: Ray Strode <halfline hawaii rr com>, xml gnome org
- Subject: Re: [xml] XPath Infinities
- Date: Sun, 29 Apr 2001 22:58:27 +0100 (BST)
On Sun, 29 Apr 2001, Bjorn Reese wrote:
Do you really think that just blinding ignoring Floating point exceptions is
a good idea?
I _know_ that it is a good idea. NaN and Inf depends both on hardware, OS,
and compiler support, so you will typically experience different behaviour
on different platforms/compilers.
If you use GCC on Alpha, then 0/0 will normally result in a core dump.
If you supply your own signal handler for SIGFPE, then it returns 0
(or some arbitrary value). If you ignore the signal handler, then it
returns NaN, which is the desired output.
So, you have to ignore SIGFPE on Alpha using GCC.
Somebody decided to have an overly bright idea of tieing fp mode with the
way you set SIGFPE handling. gosh.
[snip]
With C99 compilers there is a NAN macro which can be used instead.
The problem here is the lack of consistent and true C99 support.
Or are you saying that the bug still existed on OSF?
With the native C compiler, yes.
not using -ieee should not be supported. Among other things, you don't
even have denormals that way, instead they are flushed to zero.
Sander
One day a tortoise will learn to fly
-- Terry Pratchett, 'Small Gods'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]