Approximate equality: Difference between revisions

m
→‎{{header|Wren}}: Changed to Wren S/H
m (→‎{{header|Wren}}: Changed to Wren S/H)
 
(8 intermediate revisions by one other user not shown)
Line 1,303:
 
=={{header|Processing}}==
<syntaxhighlight lang="Processingprocessing"></syntaxhighlight>double epsilon = 1e-18D;
<pre>
double epsilon = 1e-18D;
 
void setup() {
Line 1,332 ⟶ 1,330:
println("False. ", num1, "is not close to", num2);
}
}</syntaxhighlight>
}
</pre>
 
 
{{Output}}
<pre>
Results
True. 1.0000000000000002E14 is close to 1.0000000000000002E14
False. 100.01 is not close to 100.011
Line 2,108 ⟶ 2,104:
 
=={{header|Wren}}==
<syntaxhighlight lang="ecmascriptwren">var tol = 1e-16
var pairs = [
[100000000000000.01, 100000000000000.011],
9,476

edits