[fpc-pascal] real numbers infinity
Florian Klaempfl
florian at freepascal.org
Tue Apr 11 13:39:00 CEST 2006
Dimitris Apostolou wrote:
>>> when a real number overflows the program halts with EInvalidOp error.
>>> How can I make the program behave the more standard way, where the
>>> variable gets the value "inf" and execution continues normally? This
> is
>>> vital for many tasks, like fractal computation.
>> You can use try..except..end block and switch -Sd when compile:
>
> Thank you very much, this solves the problem though I think that
> performance-wise it is not optimal. What is the reason for freepascal
> being not IEEE-spec compliant? I
It is:
http://community.freepascal.org:10000/docs-html/rtl/math/setexceptionmask.html
You can turn off floating point exceptions using this procedure.
> Is it backwards compatibility?
>
>> Or you may take a look IEEE specification if it is necessary to create
>> your
>> own big float support for larger precision with fractals.
>
> It seems really weird that there is no such unit in the standard
> freepascal distribution. It would be a huge task for me to create one
> with C-like speed.
>
> Dimitris
>
More information about the fpc-pascal
mailing list