Dependency of nagios-plugins-nwc-health-8.0-1.1.src.rpm
Name: perl-Test-Number-Delta
Project: openSUSE_13.2
Repository: oss
Title: Compare the difference between numbers against a given tolerance
Description:
At some point or another, most programmers find they need to compare
floating-point numbers for equality. The typical idiom is to test if the
absolute value of the difference of the numbers is within a desired
tolerance, usually called epsilon. This module provides such a function for
use with the Test::More manpage. Usage is similar to other test functions
described in the Test::More manpage. Semantically, the 'delta_within'
function replaces this kind of construct:
ok ( abs($p - $q) < $epsilon, '$p is equal to $q' ) or
diag "$p is not equal to $q to within $epsilon";
While there's nothing wrong with that construct, it's painful to type it
repeatedly in a test script. This module does the same thing with a single
function call. The 'delta_ok' function is similar, but either uses a global
default value for epsilon or else calculates a 'relative' epsilon on the
fly so that epsilon is scaled automatically to the size of the arguments to
'delta_ok'. Both functions are exported automatically.
Because checking floating-point equality is not always reliable, it is not
possible to check the 'equal to' boundary of 'less than or equal to
epsilon'. Therefore, Test::Number::Delta only compares if the absolute
value of the difference is *less than* epsilon (for equality tests) or
*greater than* epsilon (for inequality tests).
Version: 1.04
Release: 2.1.3
Architecture: noarch
Size: 20.3 KB
Build Time: 2014-10-06 15:21:22 +0200 (over 9 years ago)
Provides
Symbol | Required by |
---|---|
perl(Test::Number::Delta) =... | |
perl-Test-Number-Delta = 1.... |
Requires
Symbol | Provided by |
---|---|
perl(:MODULE_COMPAT_5.20.1) | perl |