Approximate equality: Difference between revisions

(→‎{{header|Perl 6}}: Expand explanation a bit, add another comparison)
Line 32:
=={{header|Perl 6}}==
{{works with|Rakudo|2019.07.1}}
Is approximately equal to is a built-in operator in Perl 6. Unicode ≅, or the ASCII equivalent: =~=. By default it uses a tolerance of 1e-15 times the order of magnitude of the larger comparand, though that is adjustable by setting the dynamic variable $*TOLERANCE to the desired value. Probably a good idea to localize the changed $*TOLERANCE as it will affect all comparisons within its scope.
 
<lang perl6>for
10,327

edits