The OpenD Programming Language

core.math

Builtin mathematical intrinsics

Members

Aliases

cos
alias cos = llvm_cos!float

Returns cosine of x. x is in radians.

cos
alias cos = llvm_cos!double

Returns cosine of x. x is in radians.

cos
alias cos = llvm_cos!real

Returns cosine of x. x is in radians.

fabs
alias fabs = llvm_fabs!float

Compute the absolute value.

Special Values
xfabs(x)
±0.0+0.0
±∞+∞

It is implemented as a compiler intrinsic.

fabs
alias fabs = llvm_fabs!double

Compute the absolute value.

Special Values
xfabs(x)
±0.0+0.0
±∞+∞

It is implemented as a compiler intrinsic.

fabs
alias fabs = llvm_fabs!real

Compute the absolute value.

Special Values
xfabs(x)
±0.0+0.0
±∞+∞

It is implemented as a compiler intrinsic.

rint
alias rint = llvm_rint!float

Rounds x to the nearest integer value, using the current rounding mode. If the return value is not equal to x, the FE_INEXACT exception is raised. nearbyint performs the same operation, but does not set the FE_INEXACT exception.

rint
alias rint = llvm_rint!double

Rounds x to the nearest integer value, using the current rounding mode. If the return value is not equal to x, the FE_INEXACT exception is raised. nearbyint performs the same operation, but does not set the FE_INEXACT exception.

rint
alias rint = llvm_rint!real

Rounds x to the nearest integer value, using the current rounding mode. If the return value is not equal to x, the FE_INEXACT exception is raised. nearbyint performs the same operation, but does not set the FE_INEXACT exception.

rndtol
alias rndtol = llroundf

Returns x rounded to a long value using the current rounding mode. If the integer value of x is greater than long.max, the result is indeterminate.

rndtol
alias rndtol = llround

Returns x rounded to a long value using the current rounding mode. If the integer value of x is greater than long.max, the result is indeterminate.

rndtol
alias rndtol = llroundl

Returns x rounded to a long value using the current rounding mode. If the integer value of x is greater than long.max, the result is indeterminate.

sin
alias sin = llvm_sin!float

Returns sine of x. x is in radians.

sin
alias sin = llvm_sin!double

Returns sine of x. x is in radians.

sin
alias sin = llvm_sin!real

Returns sine of x. x is in radians.

Functions

ldexp
float ldexp(float n, int exp)

Compute n * 2exp References: frexp

ldexp
double ldexp(double n, int exp)

Compute n * 2exp References: frexp

rndtonl
deprecated real rndtonl(real x)

Returns x rounded to a long value using the FE_TONEAREST rounding mode. If the integer value of x is greater than long.max, the result is indeterminate.

sqrt
float sqrt(float x)

Compute square root of x.

sqrt
double sqrt(double x)

Compute square root of x.

sqrt
real sqrt(real x)

Compute square root of x.

toPrec
T toPrec(float f)
T toPrec(double f)
T toPrec(real f)

Round argument to a specific precision.

Meta

Authors

Walter Bright, Don Clugston