Index | index by Group | index by Distribution | index by Vendor | index by creation date | index by Name | Mirrors | Help | Search |
Name: perl-Test-Number-Delta | Distribution: SUSE Linux Enterprise 15 SP6 |
Version: 1.060000 | Vendor: openSUSE |
Release: bp156.3.1 | Build date: Sat Jul 22 11:25:31 2023 |
Group: Development/Libraries/Perl | Build host: goat43 |
Size: 47506 | Source RPM: perl-Test-Number-Delta-1.060000-bp156.3.1.src.rpm |
Packager: https://bugs.opensuse.org | |
Url: http://search.cpan.org/dist/Test-Number-Delta/ | |
Summary: Compare the difference between numbers against a given tolerance |
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).
Apache-2.0
* Thu Apr 23 2015 coolo@suse.com - extend version to 6 digits to avoid problems with > 1.034 * Tue Apr 14 2015 coolo@suse.com - updated to 1.06 see /usr/share/doc/packages/perl-Test-Number-Delta/Changes 1.06 2014-11-25 07:09:08-05:00 America/New_York [Fixed] - Make 0 and 0 compare equal with a relative epsilon [Documented] - Added SEE ALSO with Number::Tolerant and Test::Deep::NumberTolerant 1.05 2014-11-24 11:08:11-05:00 America/New_York [Fixed] - relative comparison of array reference elements now works as intended - diagnostics of delta_not_ok and delta_not_within clarified under relative comparison * Tue Nov 26 2013 coolo@suse.com - updated to 1.04 - Modernized distribution metadata and licensing - Distribution now managed with Dist::Zilla * Mon Jan 17 2011 coolo@novell.com - buildrequire perl-macros * Tue Nov 30 2010 coolo@novell.com - switch to perl_requires macro * Mon Nov 29 2010 coolo@novell.com - remove /var/adm/perl-modules * Sun Jul 25 2010 pascal.bleser@opensuse.org - initial version (1.03)
/usr/lib/perl5/vendor_perl/5.26.1/Test /usr/lib/perl5/vendor_perl/5.26.1/Test/Number /usr/lib/perl5/vendor_perl/5.26.1/Test/Number/Delta.pm /usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi /usr/share/doc/packages/perl-Test-Number-Delta /usr/share/doc/packages/perl-Test-Number-Delta/CONTRIBUTING.mkdn /usr/share/doc/packages/perl-Test-Number-Delta/Changes /usr/share/doc/packages/perl-Test-Number-Delta/LICENSE /usr/share/doc/packages/perl-Test-Number-Delta/README /usr/share/man/man3/Test::Number::Delta.3pm.gz
Generated by rpm2html 1.8.1
Fabrice Bellet, Tue Jul 9 19:58:50 2024