Jump to content

Kahan summation: Difference between revisions

m
→‎{{header|Perl 6}}: reduce the echo
(→‎{{header|Perl 6}}: Add Perl 6 example)
m (→‎{{header|Perl 6}}: reduce the echo)
Line 1,040:
=={{header|Perl 6}}==
{{trans|Python}}
Perl 6 does not offer a fixed precision decimal. It ''does have does'' have IEEE 754 floating point numbers so let's try implementing the arbitrary precision option as shown in Python. Need to explicitly specify scientific notation numbers to force floating point Nums.
 
<lang perl6>constant ε = (1e0, */2e0 … *+1e0==1e0)[*-1];
10,333

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.