core.math

Builtin mathematical intrinsics

Source: core/_math.d

Functions 36

fnfloat cos(float x) @nogc nothrow @safe pureReturns cosine of x. x is in radians.
fndouble cos(double x) @nogc nothrow @safe pure
fnreal cos(real x) @nogc nothrow @safe pure
fnfloat sin(float x) @nogc nothrow @safe pureReturns sine of x. x is in radians.
fndouble sin(double x) @nogc nothrow @safe pure
fnreal sin(real x) @nogc nothrow @safe pure
fnlong rndtol(float x) @nogc nothrow @safe pureReturns 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.
fnlong rndtol(double x) @nogc nothrow @safe pure
fnlong rndtol(real x) @nogc nothrow @safe pure
fnfloat sqrt(float x) @nogc nothrow @safe pureCompute square root of x.
fndouble sqrt(double x) @nogc nothrow @safe pure
fnreal sqrt(real x) @nogc nothrow @safe pure
fnfloat ldexp(float n, int exp) @nogc nothrow @safe pureCompute n * 2exp References: frexp
fndouble ldexp(double n, int exp) @nogc nothrow @safe pure
fnreal ldexp(real n, int exp) @nogc nothrow @safe pure
fnfloat fabs(float x) @safe pure nothrow @nogcCompute the absolute value. x fabs(x 0.0 +0.0 + ) It is implemented as a compiler intrinsic. Params: x = floating point value Returns: |x| References: equivalent to `std.math....
fndouble fabs(double x) @safe pure nothrow @nogc
fnreal fabs(real x) @safe pure nothrow @nogc
fnfloat rint(float x) @nogc nothrow @safe pureRounds 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 no...
fndouble rint(double x) @nogc nothrow @safe pure
fnreal rint(real x) @nogc nothrow @safe pure
fnfloat yl2x(float x, float y) @nogc nothrow @safe pureBuilding block functions, they translate to a single x87 instruction.
fndouble yl2x(double x, double y) @nogc nothrow @safe pure
fnreal yl2x(real x, real y) @nogc nothrow @safe pure
fnfloat yl2xp1(float x, float y) @nogc nothrow @safe pure
fndouble yl2xp1(double x, double y) @nogc nothrow @safe pure
fnreal yl2xp1(real x, real y) @nogc nothrow @safe pure
fnT toPrec(T: float)(float f) @nogc nothrow @safe pureRound argument to a specific precision.
fnT toPrec(T: float)(double f) @nogc nothrow @safe pureditto
fnT toPrec(T: float)(real f) @nogc nothrow @safe pureditto
fnT toPrec(T: double)(float f) @nogc nothrow @safe pureditto
fnT toPrec(T: double)(double f) @nogc nothrow @safe pureditto
fnT toPrec(T: double)(real f) @nogc nothrow @safe pureditto
fnT toPrec(T: real)(float f) @nogc nothrow @safe pureditto
fnT toPrec(T: real)(double f) @nogc nothrow @safe pureditto
fnT toPrec(T: real)(real f) @nogc nothrow @safe pureditto