|
QuantLib: a free/open-source library for quantitative finance
Reference manual - version 1.40
|
#include <ql/math/rounding.hpp>
Public Types | |
| enum | Type { None , Up , Down , Closest , Floor , Ceiling } |
| rounding methods More... | |
Public Member Functions | |
| Rounding ()=default | |
| default constructor | |
| Rounding (Integer precision, Type type=Closest, Integer digit=5) | |
| Decimal | operator() (Decimal value) const |
| perform rounding | |
Inspectors | |
| Integer | precision () const |
| Type | type () const |
| Integer | roundingDigit () const |
A basic rounding class that supports truncating up to 16 decimal places (input precision range in [0,16]) and depends on a precision of rounding number. Note that the class does not validate the input range; supplying an unsupported rounding value may result in undefined behavior.
| enum Type |
rounding methods
The rounding methods follow the OMG specification available at http://www.omg.org/cgi-bin/doc?formal/00-06-29.pdf.
|
default |
default constructor
Instances built through this constructor don't perform any rounding.