sub is_approx

Documentation for sub is_approx assembled from the following types:

module Test

From Test

(Test) sub is_approx

Defined as:

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)