The OpenD Programming Language

std.math.exponential

This is a submodule of std.math.

It contains several exponential and logarithm functions.

Members

Aliases

FP_ILOGB0
alias FP_ILOGB0 = core.stdc.math.FP_ILOGB0
FP_ILOGBNAN
alias FP_ILOGBNAN = core.stdc.math.FP_ILOGBNAN

Special return values of ilogb.

Functions

exp
real exp(real x)
double exp(double x)
float exp(float x)

Calculates ex.

exp2
real exp2(real x)
double exp2(double x)
float exp2(float x)

Calculates 2x.

expm1
real expm1(real x)
double expm1(double x)
float expm1(float x)

Calculates the value of the natural logarithm base (e) raised to the power of x, minus 1.

frexp
T frexp(T value, int exp)

Separate floating point value into significand and exponent.

ilogb
int ilogb(T x)

Extracts the exponent of x as a signed integral value.

ldexp
real ldexp(real n, int exp)
double ldexp(double n, int exp)
float ldexp(float n, int exp)

Compute n * 2exp References: frexp

log
real log(real x)
double log(double x)
float log(float x)

Calculate the natural logarithm of x.

log10
real log10(real x)
double log10(double x)
float log10(float x)

Calculate the base-10 logarithm of x.

log1p
real log1p(real x)
double log1p(double x)
float log1p(float x)

Calculates the natural logarithm of 1 + x.

log2
real log2(real x)
double log2(double x)
float log2(float x)

Calculates the base-2 logarithm of x: log2x

logb
real logb(real x)
double logb(double x)
float logb(float x)

Extracts the exponent of x as a signed integral value.

pow
Unqual!F pow(F x, G n)

Compute the value of x n, where n is an integer

pow
typeof(Unqual!(F).init * Unqual!(G).init) pow(F x, G n)

Compute the power of two integral numbers.

pow
real pow(I x, F y)

Computes integer to floating point powers.

pow
Unqual!(Largest!(F, G)) pow(F x, G y)

Calculates xy.

powmod
Unqual!(Largest!(F, H)) powmod(F x, G n, H m)

Computes the value of a positive integer x, raised to the power n, modulo m.

scalbn
real scalbn(real x, int n)
double scalbn(double x, int n)
float scalbn(float x, int n)

Efficiently calculates x * 2n.

Meta

Authors

Walter Bright, Don Clugston, Conversion of CEPHES math library to D by Iain Buclaw and David Nadlinger