[fpc-devel] SSE in FPC

Thaddy thaddy at thaddy.com
Thu Dec 11 12:47:35 CET 2008


Alain Michaud wrote:
>
>
> Vinzent Höfler wrote:
>> Alain Michaud wrote:
>>> Hi,
>>>
>>>   Not exactly related to this thread, but worth mentioning:
>>>
>>>   Some time ago I was interested in (numerical) computing some 
>>> Bessel function to the highest precision!
>>>
>>>     I looked at MMX, SSE, SSE2, SSE3, SSE4, FP87, 3D-something  
>>> etc...   And all that jazz...
>>>
>>>    It turns out that only the "old" FP87 (FPU)  has the 80 bit 
>>> (extended) floating format!  Anything else, and you are limited to 
>>> the 64 bit (double) floating numbers.
>>>
>>>    I fell sorry to see that even 25 years after the original 8087, 
>>> modern CPUs are not even capable to have the same precision!
>>
>> If you need precision you have to do integer math anyway. Floating 
>> point numbers are always crude approximations, no matter how many 
>> bits they have. Considering that the numerical range of an 80-bit 
>> floating point number is larger than the relation between the 
>> diameter of an atom and the diameter of the known universe, this 
>> so-called "precision" is hardly ever needed. Or to express this a bit 
>> (pun intended) differently: How much of the universe do you expect to 
>> fit into 80 bits?
>>
>>
>> Vinzent.
>> _______________________________________________
>> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
>> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
> I think that high precision numerical computing is very useful in many 
> fields of science and technology:
>
> The Rydberg constant is defined using 13 digits.
>
> The second is measured using 15 digits
>
> Some laser spectroscopist make measurements using 18 digits.
>
> The Lamb shift in hydrogen has been measured using 13 digits. Right 
> now this measurement is more accurate than the theoretical evaluation:
>
> In order to evaluate this number (to 12 digits), the researchers had 
> to         make a long calculation involving the sum of about 2000 
> numerical integrals.
>
> You are right, they have used symbolic computation. However, in order 
> to make sure that the did not miss someting, they have also checked 
> every integral by performing a numerical integration a test!
>
> Therefore, I think that 64 bits is a limit !
>
> Alain
You are right, but scientific math libraries are for that reason alwas 
based on large integer calculations. SSE, MMX etc are designed for 
multimedia applications, not science.

However, there are dedicated units available that implement large scaled 
integers in hardware (really fpga's I believe, but not sure)  to speed 
up scientific processing (at a - very high - price, but at least up to 
1024 bit that I know of)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3309 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20081211/e3044429/attachment.bin>


More information about the fpc-devel mailing list