QuantLib: Numeric types

A free/open-source library for quantitative finance Reference manual - version 1.12

Typedefs
Numeric types

## Typedefs
typedef QL_INTEGER | Integer
| integer number More...
typedef QL_BIG_INTEGER | BigInteger
| large integer number More...
typedef unsigned QL_INTEGER | Natural
| positive integer More...
typedef QL_REAL | Real
| real number More...
typedef Real | Decimal
| decimal number More...
typedef std::size_t | Size
| size of a container More...
typedef Real | Time
| continuous quantity with 1-year units More...
typedef Real | DiscountFactor
| discount factor between dates More...
typedef Real | Rate
| interest rates More...
typedef Real | Spread
| spreads on interest rates More...
typedef Real | Volatility
| volatility More...
typedef Real | Probability
| probability More...

## Detailed Description

A number of numeric types are defined in order to add clarity to function and method declarations.

## Typedef Documentation

## ◆ Integer

typedef QL_INTEGER Integer

integer number

Examples:
  BermudanSwaption.cpp, Bonds.cpp, CallableBonds.cpp, CDS.cpp, ConvertibleBonds.cpp, DiscreteHedging.cpp, EquityOption.cpp, FittedBondCurve.cpp, FRA.cpp, Replication.cpp, Repo.cpp, and swapvaluation.cpp.

## ◆ BigInteger

typedef QL_BIG_INTEGER BigInteger

large integer number

## ◆ Natural

typedef unsigned QL_INTEGER Natural

positive integer

Examples:
  Bonds.cpp, CallableBonds.cpp, and FittedBondCurve.cpp.

## ◆ Real

typedef QL_REAL Real

real number

Examples:
  BermudanSwaption.cpp, Bonds.cpp, CallableBonds.cpp, CDS.cpp, ConvertibleBonds.cpp, DiscreteHedging.cpp, EquityOption.cpp, FittedBondCurve.cpp, FRA.cpp, Replication.cpp, Repo.cpp, and swapvaluation.cpp.

## ◆ Decimal

typedef Real Decimal

decimal number

## ◆ Size

typedef std::size_t Size

size of a container

## ◆ Time

typedef Real Time

continuous quantity with 1-year units

Examples:
  ConvertibleBonds.cpp, DiscreteHedging.cpp, and FittedBondCurve.cpp.

## ◆ DiscountFactor

typedef Real DiscountFactor

discount factor between dates

Examples:
  DiscreteHedging.cpp.

## ◆ Rate

typedef Real Rate

interest rates

Examples:
  BermudanSwaption.cpp, Bonds.cpp, CallableBonds.cpp, ConvertibleBonds.cpp, DiscreteHedging.cpp, EquityOption.cpp, FittedBondCurve.cpp, FRA.cpp, Repo.cpp, and swapvaluation.cpp.

## ◆ Spread

typedef Real Spread

spreads on interest rates

Examples:
  ConvertibleBonds.cpp, EquityOption.cpp, and swapvaluation.cpp.

## ◆ Volatility

typedef Real Volatility

volatility

Examples:
  BermudanSwaption.cpp, Bonds.cpp, ConvertibleBonds.cpp, DiscreteHedging.cpp, and EquityOption.cpp.

## ◆ Probability

typedef Real Probability

probability