Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1 @@
|
|||
say 0.1 + 0.2 + 0.3 + 0.4 === 1.0000000000000000000000000000000000000000000000000000000000000000000000000; # True
|
||||
22
Task/Approximate-equality/Raku/approximate-equality-2.raku
Normal file
22
Task/Approximate-equality/Raku/approximate-equality-2.raku
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
for
|
||||
100000000000000.01, 100000000000000.011,
|
||||
100.01, 100.011,
|
||||
10000000000000.001 / 10000.0, 1000000000.0000001000,
|
||||
0.001, 0.0010000001,
|
||||
0.000000000000000000000101, 0.0,
|
||||
sqrt(2) * sqrt(2), 2.0,
|
||||
-sqrt(2) * sqrt(2), -2.0,
|
||||
100000000000000003.0, 100000000000000004.0,
|
||||
3.14159265358979323846, 3.14159265358979324
|
||||
|
||||
-> $a, $b {
|
||||
say "$a ≅ $b: ", $a ≅ $b;
|
||||
}
|
||||
|
||||
say "\nTolerance may be adjusted.";
|
||||
|
||||
say 22/7, " ≅ ", π, ": ", 22/7 ≅ π;
|
||||
{ # Localize the tolerance to only this block
|
||||
my $*TOLERANCE = .001;
|
||||
say 22/7, " ≅ ", π, ": ", 22/7 ≅ π;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue