What is the minimum precision allowed for floats.

Vincent Diepeveen diep at xs4all.nl
Mon Sep 29 14:57:22 CEST 2008


if i remember well, some GPU's are working internal in 40 bits  
precision;
32 bits for mantissa and the rest for 'zhe power'.

i'm sure they follow not many conventions, can you confirm that?
I assume 32 bits mantissa allows them to do 16 x 16 bits int  
calculations == 32 bits precision (integer).
Very bad for FFT type stuff.

Vincent

On Sep 29, 2008, at 2:35 PM, Vincent Diepeveen wrote:

> If i may ask, how can you reply before i see my own posting on the  
> list?
>
> Yeah it's maximum of factor 2.
>
> We don't do it in floating point of course which is 2 lousy  
> instructions a cycle.
> Let's do it in 64 bits integers @ 3 to 4 instructions a cycle :)
>
> Vincent
>
> On Sep 29, 2008, at 2:31 PM, Décio Luiz Gazzoni Filho wrote:
>
>>
>> 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.
>>
>> Décio
>



More information about the gmp-discuss mailing list