Skip to content
perl library for numbers with built-in tolerances
Perl Perl6
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib/Number
t
Changes
LICENSE
MANIFEST
Makefile.PL
README

README

README for Number::Tolerant 1.601

Number::Tolerant creates a number-like object whose value refers to a range of
possible values, each equally acceptable. It overloads comparison operations to
reflect this.

 use Number::Tolerant;

 my $range  = tolerance(10 => to => 12);
 my $random = 10 + rand(2);

 die "I shouldn't die" unless $random == $range;

 print "This line will always print.\n";

I use this module to simplify the comparison of measurement results to
specified tolerances.

 foreach ($specification->attributes) {
   reject $product unless $product->$_ == $specification->$_;
 }
Something went wrong with that request. Please try again.