Ceiling (3) - Linux Manuals
Ceiling: basic rounding class
QuantLib::Rounding - basic rounding class
Inherited by CeilingTruncation, ClosestRounding, DownRounding, FloorTruncation, and UpRounding.
Public Member Functions
basic rounding class
- the correctness of the returned values is tested by checking them against known good results.
Member Enumeration Documentation
The rounding methods follow the OMG specification available at ftp://ftp.omg.org/pub/docs/formal/00-06-29.pdf
- the names of the Floor and Ceiling methods might be misleading. Check the provided reference.
- do not round: return the number unmodified
- the first decimal place past the precision will be rounded up. This differs from the OMG rule which rounds up only if the decimal to be rounded is greater than or equal to the rounding digit
- all decimal places past the precision will be truncated
- the first decimal place past the precision will be rounded up if greater than or equal to the rounding digit; this corresponds to the OMG round-up rule. When the rounding digit is 5, the result will be the one closest to the original number, hence the name.
- positive numbers will be rounded up and negative numbers will be rounded down using the OMG round up and round down rules
- positive numbers will be rounded down and negative numbers will be rounded up using the OMG round up and round down rules
Constructor & Destructor Documentation
Instances built through this constructor don't perform any rounding.
Generated automatically by Doxygen for QuantLib from the source code.