core.math

Builtin mathematical intrinsics

Source: core/_math.d

Functions 36

fnfloat cos(float x)Returns cosine of x. x is in radians.
fndouble cos(double x)
fnreal cos(real x)
fnfloat sin(float x)Returns sine of x. x is in radians.
fndouble sin(double x)
fnreal sin(real x)
fnlong rndtol(float x)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.
fnlong rndtol(double x)
fnlong rndtol(real x)
fnfloat sqrt(float x)Compute square root of x.
fndouble sqrt(double x)
fnreal sqrt(real x)
fnfloat ldexp(float n, int exp)Compute n * 2exp References: frexp
fndouble ldexp(double n, int exp)
fnreal ldexp(real n, int exp)
fnfloat fabs(float x)Compute 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)
fnreal fabs(real x)
fnfloat rint(float x)Rounds x to the nearest integer value, using the current rounding mode. If the return value is not equal to x, the FEINEXACT exception is raised. nearbyint performs the same operation, but does not...
fndouble rint(double x)
fnreal rint(real x)
fnfloat yl2x(float x, float y)Building block functions, they translate to a single x87 instruction.
fndouble yl2x(double x, double y)
fnreal yl2x(real x, real y)
fnfloat yl2xp1(float x, float y)
fndouble yl2xp1(double x, double y)
fnreal yl2xp1(real x, real y)
fnT toPrec(T: float)(float f)Round argument to a specific precision.
fnT toPrec(T: float)(double f)ditto
fnT toPrec(T: float)(real f)ditto
fnT toPrec(T: double)(float f)ditto
fnT toPrec(T: double)(double f)ditto
fnT toPrec(T: double)(real f)ditto
fnT toPrec(T: real)(float f)ditto
fnT toPrec(T: real)(double f)ditto
fnT toPrec(T: real)(real f)ditto