Re: [AD] Floating Point Precision

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


From: George Foot <gfoot@xxxxxxxxxx>
Sent: Monday, October 02, 2000 2:35 PM


> Maybe we should just use the ANSI version, and not define our own epsilons
> at all. :)  It is a property of the specific floating point type, after
> all, and can vary between platforms.

It is not. The previous mail I sent was not clear enough...

Epsilons I talk about are used to test whether floating points can be
assumed equal or not ; such epsilons are typically used to determine if we
should carry on with the numerical process to get more precision or not...
Nothing to do with properties which can vary from one platform to another.
Epsilons I talk about are closely linked to the idea of iterative processes
(computing 3D rotations step by step is such an iterative process, trying to
solve differential equations in order to compute the behaviour of a car or a
plane is another iterative process). Such epsilons don't change whether you
use 80 bits floating point numbers or 159412 bits floating point numbers.
They just indicate if we are close enough to the real solution or if we
should do more iterations to get closer.
Of course, there is no floating point iterative process in Allegro but there
are floating point comparisons. And my opinion is that it has no meaning to
compare numbers very precisely in the Allegro library while the user knows
that those numbers have only 3 or 4 good digits (other ones might be wrong).
It's a matter of trust in datas you get...
And that's why I suggested to use the same AL_EPSILON throughout the library
and to allow the user to adjust its value to his own needs.

Sorry for confusion :-)
Bertrand.



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/