I understand that Perl 6 implements decimal numbers as rational, where possible, in order to avoid the floating point problems that are present in most other languages.
Did anyone benchmark or understand how this is done?
Does Perl 6 Boost the Use of Rational Numbers for Decimals
I think the most useful general answer is "no, not really, but let me elaborate."
, P6 , Rat s.
Rat
, P6 Rat, 64 , P6 Num ( P6 double float) .
Num
.
, , , , .
, 3.141592e0 / , Num/float literal.
3.141592e0
( Rat; FatRat class; Rational role), 100% , .
FatRat
Rational
wikipedia .
- , ?
, , . # perl6. :
'decimal'
""
'float'
'
, .
, Perl 6 (Rakudo Star 2017.07), , , , .
script, CSV SVG, , , . , , , script src/core/Rational.Str, ( 6000ms 11000 ). Num ( , ).
, script, , , , -, , .
Source: https://habr.com/ru/post/1687840/More articles:Создайте список, вычитая значение nth + 1 из n-го значения другого списка - pythonWhere are the main Entity Framework agreements? - c #R DT button for downloading files does not include mapping tables - rDo equal elements set their order in the insertion sorting algorithm? - javaLeast Multiple 1:20 - How Can I Do It Faster? - rSpring Initializr Initial Project Will Not - javaR - автоматически складывать каждый n-й столбец кадра данных и сохранять их как новые объекты - stackWebAPI и авторизация Basic - c#Calcinai xero-php pass config times - phpHow do you determine the development mode in Expo? - react-nativeAll Articles