amalthea.decimal

Undocumented in source.

Public Imports

amalthea.libcore
public import amalthea.libcore;
Undocumented in source.

Members

Aliases

D
alias D = Decimal

Short alias for main structure.

Classes

DecimalException
class DecimalException

Base exeption for this module

Functions

exp
Decimal exp(Decimal x)

Calculates e^x for Decimal.

getDefaultFixedPoint
size_t getDefaultFixedPoint()

Gets current value of fixed point position by default. If the value was not changed by setDefaultFixedPoint, the value is 18.

ln
real ln(real x)

Calculates the natural logarithm x (for real). The precision is 18 decimal places.

ln
Decimal ln(Decimal x)

Calculates the natural logarithm x of the Decimal type.

log
Decimal log(Decimal b, Decimal a)

Calculates the logarithm.

pow
Decimal pow(Decimal x, ulong y)

Returns the value of x raised to the power of y.

pow
Decimal pow(Decimal x, Decimal y)

Returns the value of x raised to the power of y.

setDefaultFixedPoint
void setDefaultFixedPoint(size_t fixedPoint)

Sets default value of fixed point positon for all new Decimal structures.

toDecimal
Decimal toDecimal(T value)

Transforms number or string to Decimal.

Structs

Decimal
struct Decimal

A struct representing a decimal fixed-point number.

Meta