On Tue, 26 Mar 2002, Silvio a Beccara wrote:
Hello,
Good point. So I'd tend to leave things as they are.
how do I run my program, then? I cannot have it stop every time it has to calculate the exponential of something smaller than -1000. This is simply not acceptable. For instance, with FPC I get everything correct. There are no errors - just plain math!
Before I forget: with the C program, I just compiled it very normally, and it gave me no error, just the correct results.
Thanks, regards
Silvio
Dear Silvio, ..plain math with IEEE Standard 754 double precision means that we can NOT trust results of exp (x), where x < ~-745.1 . Any result is simply undefined in IEEE. 'User friendly' systems (returning 0.0) may lead you up the garden path. Your application needs to know how to handle these special cases in order to get correct results. Further operations like '*' and '/' will give misleading results, even though legal in plain math!
Regards, Ernst-Ludwig