is_approx
ErrorsCollection

is_approx

Synthesised documentation from type/Test

From type/Test

See Original text in context

multi sub is_approx(Mu $gotMu $expected$desc = '')

NOTE: Deprecated as of version 6.d. Please use is-approx instead.

Checks if result and the expected value are approximately equal to a certain degree of tolerance, fixed to 1e-5 or one-millionth of the expected value is its value is less than that.

use Test;
is_approx(1e41e4-1e-6, "Real close"); # OUTPUT: «ok 1 - Real close␤» 

(This will print also a deprecation notice if you're using 6.d)