Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Re: log(-1) raises SIGFPE
@ 1997-05-13  0:22 Jim Paradis
  0 siblings, 0 replies; 6+ messages in thread
From: Jim Paradis @ 1997-05-13  0:22 UTC (permalink / raw)


Carlos Alberto Carvalho wrote:
> Why isn't -mieee the default?

On Alpha, generating code that complies with the floating-point
exception recovery rules exacts a small but noticeable performance
penalty.  The default is for maximum performance, and you have to
*ask* to sacrifice a little performance for correctness...

-- 
Jim Paradis   jrp@jrp.tiac.net  
http://www.tiac.net/users/jrp/index.html
"It's not procrastination, it's my new Just-In-Time Workload Management
System!"

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 6+ messages in thread
[parent not found: <199705091519.KAA30572@stommel.tamu.edu>]
[parent not found: <richard@stommel.tamu.edu>]
* log(-1) raises SIGFPE
@ 1997-05-09 14:34 Zarmfab Software Development
  1997-05-09 15:19 ` Richard Henderson
  0 siblings, 1 reply; 6+ messages in thread
From: Zarmfab Software Development @ 1997-05-09 14:34 UTC (permalink / raw)


Running the tcl test-suite, i found undefined mathematical operations like log(-1) always
generate SIGFPE at my avanti. Looking inside the log() function, if found that log(x) for all
x < 0 executes the following:

static double zero   =  0.0;
return (x-x)/zero;

This should result in NaN, but it doesn't. Instead, the division by zero raises SIGFPE.
Surprisingly, leaving the generation of NaN's or infinite values to the compiler works:

isnan(0.0/0.0) returns 1 and isinf(1.0/0.0) returns 1, as expected.

Does the alpha's FPU not support infinities and NaN's ? 

-- 
Martin Cornelius, ZARMFAB software development, University of Bremen
phone: 49-421-218-4807    FAX: 49-421-218-3889
email: fabsoft@zarm.uni-bremen.de
paper-mail: Hochschulring / Am Fallturm, 28359 BREMEN, Germany

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1997-05-14 21:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-05-13  0:22 log(-1) raises SIGFPE Jim Paradis
     [not found] <199705091519.KAA30572@stommel.tamu.edu>
1997-05-12 19:09 ` Carlos Alberto Carvalho
1997-05-14 21:20   ` Richard Henderson
     [not found] <richard@stommel.tamu.edu>
1997-05-09 16:28 ` Zarmfab Software Development
  -- strict thread matches above, loose matches on Subject: below --
1997-05-09 14:34 Zarmfab Software Development
1997-05-09 15:19 ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox