What is the minimum precision allowed for floats.

Décio Luiz Gazzoni Filho decio at decpp.net
Mon Sep 29 14:31:11 CEST 2008

On Sep 29, 2008, at 8:59 AM, Vincent Diepeveen wrote:

> Nah not factor 100.
> After most mathematical calculation you just AND with 0xffffffff
> to get 48 bits precision.

You'd be right if you were doing integer arithmetic. It's floating  
point, though, so you have more work to do than just arithmetic and  
masking: the overhead of doing sign-magnitude calculations on two's  
complement hardware, lining up the mantissas, adjusting the exponent,  
rounding, etc. If you want to conform to IEEE 754, it's even harder.

Perhaps 100x was exaggerated, but I don't think 10x is far off.


More information about the gmp-discuss mailing list