Is a 128-bit long float useful?

The other day, I realized that the most common lisp has 128-bit long-floats. As a result, the most positive long float is:

8.8080652584198167656 * 10^646456992 

while the most positive double float is 1.7976931348623157 * 10^308 , which is already quite large.

I wanted to know if anyone needed more than 1.7976931348623157 * 10^308 , and if so, in what condition?

Do you find the default programming language useful?

In some cases, the accuracy of a 64-bit double float is not enough? I would like to hear use cases.

+6
source share
2 answers

Scientists use such things - and sometimes randomly measure integers / floats / decimals.

A 32-bit or 64-bit version is usually sufficient for you.


See also:

http://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic

+3
source

I believe that the advantage of long floats is not only that they can cover huge ranges that can be useful or can be useful, they probably also have a much larger mantissa (I refuse to use the word โ€œmeaningโ€ for this) than double, giving your numbers higher accuracy.

But, as someone said, scientists love these types. Probably for this reason. Please note that libraries are often called libraries of arbitrary precision.

+5
source

Source: https://habr.com/ru/post/893483/


All Articles