Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2002-10

Overflow problem with exponentiation

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

I am having problems with overflows using Exp().

Looking at the documentation, it appears that Exp
is limited to a real result, but I need a larger
number than that (the "Extended" floating
point type is large enough).

At least one other mathematical function (i.e., ABS) will accept any real type and return a result of the same type, and it would be nice if Exp, Ln, etc did this too.

In the meantime, can anyone suggest a work-around
(perhaps a special Extended Exp function)?

Thank you,

Jeff Miller

Peter Vreman
to Unknown author
Show quoted text 13 lines
I am having problems with overflows using Exp(). Looking at the documentation, it appears that Exp is limited to a real result, but I need a larger number than that (the "Extended" floating point type is large enough). At least one other mathematical function (i.e., ABS) will accept any real type and return a result of the same type, and it would be nice if Exp, Ln, etc did this too. In the meantime, can anyone suggest a work-around (perhaps a special Extended Exp function)?

The Exp() function is declared with Extended. The documentation needs to be updated