Re: [AD] div-by-zero... math3d.c

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


On Monday 17 March 2003 4:25 pm, Ben Davis wrote:
> I honestly think the best solution would be to do the arithmetic using
> double-precision values. A float can go down to 1e-38 before it becomes
> subnormal (and slow) and starts losing precision. A double can go down to

Or was that denormal? Or denormalised? The OED doesn't seem to have any of 
them (it has subnormal but not with that meaning) ... oh well.

> 1e-some_three_digit_number. So the smallest float, cast to double, and
> squared, would be will within the range of a double. As for efficiency, the
> FPU on an x86 processor probably does everything using 10-bit (the

Oops, 10 byte :)

> nonstandard 'long double') precision anyway, so we're not losing anything.

Ben




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