Name : perl-Math-Currency
| |
Version : 0.53
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp155.1.1
| Date : 2023-07-20 17:50:33
|
Group : Unspecified
| Source RPM : perl-Math-Currency-0.53-lp155.1.1.src.rpm
|
Size : 0.09 MB
| |
Packager : https://www_suse_com/
| |
Summary : Exact Currency Math with Formatting and Rounding
|
Description :
Currency math is actually more closely related to integer math than it is to floating point math. Rounding errors on addition and subtraction are not allowed and division/multiplication should never create more accuracy than the original values. All currency values should round to the closest cent or whatever the local equivalent should happen to be.
However, repeated mathematical operations on currency values can lead to inaccurate results, if rounding is performed at each intermediate step. In order to preserve appropriate accuracy, the Math::Currency values are stored with an additional two places of accuracy internally and only rounded to the \"correct\" precision when the value is displayed (either by the default stringification or through the use of as_float or as_int).
All common mathematical operations are overloaded, so once you initialize a currency variable, you can treat it like any number and the module will do the right thing. This module is a thin layer over Math::BigFloat which is itself a layer over Math::BigInt.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-M/15.5/noarch |