The OpenD Programming Language

mir.math.common

Common floating point math functions.

This module has generic LLVM-oriented API compatible with all D compilers.

Members

Aliases

fastmath
alias fastmath = ldc.attributes.fastmath

Functions attribute, an alias for ldc.attributes.fastmath .

fmamath
alias fmamath = AliasSeq!(ldc.attributes.llvmFastMathFlag("contract"))

Functions attribute, an alias for AliasSeq!(llvmFastMathFlag("contract"));.

optmath
alias optmath = AliasSeq!(ldc.attributes.llvmFastMathFlag("fast"))

Functions attribute, an alias for AliasSeq!(llvmFastMathFlag("fast")).

Functions

approxEqual
bool approxEqual(T lhs, T rhs, float maxRelDiff, float maxAbsDiff)
deprecated bool approxEqual(T lhs, T rhs, double maxRelDiff, double maxAbsDiff)

Computes whether two values are approximately equal, admitting a maximum relative difference, and a maximum absolute difference.

approxEqual
bool approxEqual(T lhs, T rhs, T maxRelDiff, T maxAbsDiff)
deprecated bool approxEqual(T lhs, T rhs, real maxRelDiff, real maxAbsDiff)

Computes whether two values are approximately equal, admitting a maximum relative difference, and a maximum absolute difference.

ceil
T ceil(T x)
ceil
T ceil(T x)
ceil
T ceil(T x)
copysign
T copysign(T x, T sgn)
copysign
T copysign(T mag, T sgn)
copysign
T copysign(T mag, T sgn)
cos
T cos(T x)
cos
T cos(T x)
cos
T cos(T x)
exp
T exp(T x)
exp
T exp(T x)
exp
T exp(T x)
exp2
T exp2(T x)
exp2
T exp2(T x)
exp2
T exp2(T x)
fabs
T fabs(T x)
fabs
T fabs(T x)
fabs
T fabs(T x)
fabs
auto fabs(T x)

Overload for cdouble, cfloat and creal

floor
T floor(T x)
floor
T floor(T x)
floor
T floor(T x)
fmax
T fmax(T x, T y)
fmax
T fmax(T x, T y)
fmax
T fmax(T x, T y)
fmin
T fmin(T x, T y)
fmin
T fmin(T x, T y)
fmin
T fmin(T x, T y)
fmuladd
T fmuladd(T a, T b, T c)
fmuladd
T fmuladd(T a, T b, T c)
fmuladd
T fmuladd(T a, T b, T c)
log
T log(T x)
log
T log(T x)
log
T log(T x)
log10
T log10(T x)
log10
T log10(T x)
log10
T log10(T x)
log2
T log2(T x)
log2
T log2(T x)
log2
T log2(T x)
nearbyint
T nearbyint(T x)
nearbyint
T nearbyint(T x)
nearbyint
T nearbyint(T x)
pow
T pow(T x, T power)
pow
T pow(T x, T power)
pow
T pow(T x, T power)
powi
T powi(T x, int power)
powi
T powi(T x, int power)
powi
T powi(T x, int power)
rint
T rint(T x)
rint
T rint(T x)
rint
T rint(T x)
round
T round(T x)
round
T round(T x)
round
T round(T x)
sin
T sin(T x)
sin
T sin(T x)
sin
T sin(T x)
sqrt
T sqrt(T x)
sqrt
T sqrt(T x)
sqrt
T sqrt(T x)
trunc
T trunc(T x)
trunc
T trunc(T x)
trunc
T trunc(T x)

Meta

Authors

Ilia Ki, Phobos Team