std.math.exponential

This is a submodule of std.math.

It contains several exponential and logarithm functions.

Types 2

Special return values of ilogb.

Functions 65

fnUnqual!F pow(F, G)(F x, G n) if (isFloatingPoint!(F) && isIntegral!(G)) @nogc @trusted pure nothrowCompute the value of x n, where n is an integer
fntypeof(Unqual!(F).init * Unqual!(G).init) pow(F, G)(F x, G n) if (isIntegral!(F) && isIntegral!(G)) @nogc @safe pure nothrowCompute the power of two integral numbers.
fnreal pow(I, F)(I x, F y) if (isIntegral!I && isFloatingPoint!F) @nogc @trusted pure nothrowComputes integer to floating point powers.
fnUnqual!(Largest!(F, G)) pow(F, G)(F x, G y) if (isFloatingPoint!(F) && isFloatingPoint!(G)) @nogc @trusted pure nothrowCalculates xy.
private fnreal _powImpl(real x, real y) @safe @nogc pure nothrow
fnUnqual!(Largest!(F, H)) powmod(F, G, H)(F x, G n, H m) if (isUnsigned!F && isUnsigned!G && isUnsigned!H)Computes the value of a positive integer `x`, raised to the power `n`, modulo `m`.
fnreal exp(real x) @trusted pure nothrow @nogcCalculates ex.
fndouble exp(double x) @safe pure nothrow @nogcditto
fnfloat exp(float x) @safe pure nothrow @nogcditto
private fnT expImpl(T)(T x) @safe pure nothrow @nogc
fnreal expm1(real x) @trusted pure nothrow @nogcCalculates the value of the natural logarithm base (e) raised to the power of x, minus 1.
fndouble expm1(double x) @safe pure nothrow @nogcditto
fnfloat expm1(float x) @safe pure nothrow @nogcditto
private fnT expm1Impl(T)(T x) @safe pure nothrow @nogc
fnreal exp2(real x) @nogc @trusted pure nothrowCalculates 2x.
fndouble exp2(double x) @nogc @safe pure nothrowditto
fnfloat exp2(float x) @nogc @safe pure nothrowditto
private fnT exp2Impl(T)(T x) @nogc @safe pure nothrow
fnT frexp(T)(const T value, out int exp) if (isFloatingPoint!T) @trusted pure nothrow @nogcSeparate floating point value into significand and exponent.
fnint ilogb(T)(const T x) if (isFloatingPoint!T) @trusted pure nothrow @nogcExtracts the exponent of x as a signed integral value.
fnint ilogb(T)(const T x) if (isIntegral!T && isUnsigned!T) @safe pure nothrow @nogcditto
fnint ilogb(T)(const T x) if (isIntegral!T && isSigned!T) @safe pure nothrow @nogcditto
fnreal ldexp(real n, int exp) @safe pure nothrow @nogcCompute n * 2exp References: frexp
fndouble ldexp(double n, int exp) @safe pure nothrow @nogcditto
fnfloat ldexp(float n, int exp) @safe pure nothrow @nogcditto
fnreal log(real x) @safe pure nothrow @nogcCalculate the natural logarithm of x.
fndouble log(double x) @safe pure nothrow @nogcditto
fnfloat log(float x) @safe pure nothrow @nogcditto
fnreal log(int x) @safe pure nothrow @nogc
deprecated `std.math.exponential.log` called with argument types `(int)` matches both " ~ "`log(real)`, `log(double)`, and `log(float)`. Cast argument to floating point type instead.
fnreal log(uint x) @safe pure nothrow @nogc
deprecated `std.math.exponential.log` called with argument types `(uint)` matches both " ~ "`log(real)`, `log(double)`, and `log(float)`. Cast argument to floating point type instead.
fnreal log(long x) @safe pure nothrow @nogc
deprecated `std.math.exponential.log` called with argument types `(long)` matches both " ~ "`log(real)`, `log(double)`, and `log(float)`. Cast argument to floating point type instead.
fnreal log(ulong x) @safe pure nothrow @nogc
deprecated `std.math.exponential.log` called with argument types `(ulong)` matches both " ~ "`log(real)`, `log(double)`, and `log(float)`. Cast argument to floating point type instead.
private fnT logImpl(T, bool LOG1P = false)(T x) @safe pure nothrow @nogc
fnreal log10(real x) @safe pure nothrow @nogcCalculate the base-10 logarithm of x.
fndouble log10(double x) @safe pure nothrow @nogcditto
fnfloat log10(float x) @safe pure nothrow @nogcditto
fnreal log10(int x) @safe pure nothrow @nogc
deprecated `std.math.exponential.log10` called with argument types `(int)` matches both " ~ "`log10(real)`, `log10(double)`, and `log10(float)`. Cast argument to floating point type instead.
fnreal log10(uint x) @safe pure nothrow @nogc
deprecated `std.math.exponential.log10` called with argument types `(uint)` matches both " ~ "`log10(real)`, `log10(double)`, and `log10(float)`. Cast argument to floating point type instead.
fnreal log10(long x) @safe pure nothrow @nogc
deprecated `std.math.exponential.log10` called with argument types `(long)` matches both " ~ "`log10(real)`, `log10(double)`, and `log10(float)`. Cast argument to floating point type instead.
fnreal log10(ulong x) @safe pure nothrow @nogc
deprecated `std.math.exponential.log10` called with argument types `(ulong)` matches both " ~ "`log10(real)`, `log10(double)`, and `log10(float)`. Cast argument to floating point type instead.
private fnT log10Impl(T)(T x) @safe pure nothrow @nogc
fnreal log1p(real x) @safe pure nothrow @nogcCalculates the natural logarithm of 1 + x.
fndouble log1p(double x) @safe pure nothrow @nogcditto
fnfloat log1p(float x) @safe pure nothrow @nogcditto
fnreal log1p(int x) @safe pure nothrow @nogc
deprecated `std.math.exponential.log1p` called with argument types `(int)` matches both " ~ "`log1p(real)`, `log1p(double)`, and `log1p(float)`. Cast argument to floating point type instead.
fnreal log1p(uint x) @safe pure nothrow @nogc
deprecated `std.math.exponential.log1p` called with argument types `(uint)` matches both " ~ "`log1p(real)`, `log1p(double)`, and `log1p(float)`. Cast argument to floating point type instead.
fnreal log1p(long x) @safe pure nothrow @nogc
deprecated `std.math.exponential.log1p` called with argument types `(long)` matches both " ~ "`log1p(real)`, `log1p(double)`, and `log1p(float)`. Cast argument to floating point type instead.
fnreal log1p(ulong x) @safe pure nothrow @nogc
deprecated `std.math.exponential.log1p` called with argument types `(ulong)` matches both " ~ "`log1p(real)`, `log1p(double)`, and `log1p(float)`. Cast argument to floating point type instead.
private fnT log1pImpl(T)(T x) @safe pure nothrow @nogc
fnreal log2(real x) @safe pure nothrow @nogcCalculates the base-2 logarithm of x: logx
fndouble log2(double x) @safe pure nothrow @nogcditto
fnfloat log2(float x) @safe pure nothrow @nogcditto
fnreal log2(int x) @safe pure nothrow @nogc
deprecated `std.math.exponential.log2` called with argument types `(int)` matches both " ~ "`log2(real)`, `log2(double)`, and `log2(float)`. Cast argument to floating point type instead.
fnreal log2(uint x) @safe pure nothrow @nogc
deprecated `std.math.exponential.log2` called with argument types `(uint)` matches both " ~ "`log2(real)`, `log2(double)`, and `log2(float)`. Cast argument to floating point type instead.
fnreal log2(long x) @safe pure nothrow @nogc
deprecated `std.math.exponential.log2` called with argument types `(long)` matches both " ~ "`log2(real)`, `log2(double)`, and `log2(float)`. Cast argument to floating point type instead.
fnreal log2(ulong x) @safe pure nothrow @nogc
deprecated `std.math.exponential.log2` called with argument types `(ulong)` matches both " ~ "`log2(real)`, `log2(double)`, and `log2(float)`. Cast argument to floating point type instead.
private fnT log2Impl(T)(T x) @safe pure nothrow @nogc
fnreal logb(real x) @trusted pure nothrow @nogcExtracts the exponent of x as a signed integral value.
fndouble logb(double x) @trusted pure nothrow @nogcditto
fnfloat logb(float x) @trusted pure nothrow @nogcditto
private fnT logbImpl(T)(T x) @trusted pure nothrow @nogc
fnreal scalbn(real x, int n) @safe pure nothrow @nogcEfficiently calculates x * 2n.
fndouble scalbn(double x, int n) @safe pure nothrow @nogcditto
fnfloat scalbn(float x, int n) @safe pure nothrow @nogcditto
private fnF _scalbn(F)(F x, int n)

Templates 1

tmplLogCoeffs(T)