Silvio a Beccara wrote:
[...]
Surprisingly, and disappointingly, when I run it I get the following result:
espa: error in exponentiation (Numerical result out of range) (error #700 at 8049c75)
while with any Pascal (like FPC), and C compiler, I get no error (like it should be ). It really looks like a bug.
I'd be surprised about C compilers since (as Maurice noted) GPC internally just calls the C function and checks errno. Did you actually check errno when trying it in C?
Ernst-Ludwig Bohnen wrote:
AFAIK any floating point unit can be configured to treat 'out of range' FP-numbers (NaNs) as legal infinity/zero values or as errors. I couldn't find any hint about 'NaN' or 'IEEE' in the gpc - units directory to control this behavior.
GPC currently doesn't do anything special about it and provides no access with built-in methods (yet).
If there is no user control on that, the current behavior of gpc seems to me the best solution. Otherwise one might run into severe mathematical problems without any notification.
Good point. So I'd tend to leave things as they are.
Frank