How are math libraries implemented with infinite precision?

So, I know about floating point precision (and how things like 1.1 cannot be expressed exactly in binary form), and all this, but I wonder: how then do math libraries implement infinite accuracy? In other words, how would you accurately represent, for example, 1.1 in binary format? Just a brief description would be great, I can figure out the details myself. Thank you. :)

+3
source share
6 answers

There are no endless precision libraries, but precision precision libraries exist. Learn more about how they are implemented, read the documentation : -)

1.1 , , . , (1) , (.1) - , . , (11/10) , , .

+4

, :

  • . , "" ( , ). , . , Haskell, , , . base 2 -1, 0, 1. , , , 1, , 0 0.999... 1 1.000...

  • . , , .. , , .

+3

. . 1/3 , . , pi e, - .

, . , .

+1

, , , CGAL, , "" . , , .

:

  • .

  • , . . . GMP. , 1.1 = 11/10, (11, 10).

  • , .

+1

. , ​​ . - - . `` '', -.

- BCMath PHP.

+1

Pax , , , , .
, .
, "0,0001" + "0,1", , int.
1:
0 + 0 = 0 → [0].
2:
0 + 1 = 1 → [1].
3:
iter > "0.1".lenght() → stop.

-1

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


All Articles