D implementations of exp, expm1, exp2, log, log10, log1p, and log2 functions are based on the CEPHES math library, which is Copyright (C) 2001 Stephen L. Moshier <steve@moshier.net> and are incorporated herein by permission of the author. The author reserves the right to distribute this material elsewhere under different copying permissions. These modifications are distributed here under the following terms:
std.math.exponential
This is a submodule of std.math.
It contains several exponential and logarithm functions.
Copyright
Copyright The D Language Foundation 2000 - 2011.
tmpl LogCoeffs
Functions 65
fn
Unqual!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 integerfn
typeof(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.fn
real pow(I, F)(I x, F y) if (isIntegral!I && isFloatingPoint!F) @nogc @trusted pure nothrowComputes integer to floating point powers.fn
Unqual!(Largest!(F, G)) pow(F, G)(F x, G y) if (isFloatingPoint!(F) && isFloatingPoint!(G)) @nogc @trusted pure nothrowCalculates xy.fn
Unqual!(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`.fn
real expm1(real x) @trusted pure nothrow @nogcCalculates the value of the natural logarithm base (e) raised to the power of x, minus 1.fn
T frexp(T)(const T value, out int exp) if (isFloatingPoint!T) @trusted pure nothrow @nogcSeparate floating point value into significand and exponent.fn
int ilogb(T)(const T x) if (isFloatingPoint!T) @trusted pure nothrow @nogcExtracts the exponent of x as a signed integral value.fn
real log(int x) @safe pure nothrow @nogcdeprecated `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.
fn
real log(uint x) @safe pure nothrow @nogcdeprecated `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.
fn
real log(long x) @safe pure nothrow @nogcdeprecated `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.
fn
real log(ulong x) @safe pure nothrow @nogcdeprecated `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.
fn
real log10(int x) @safe pure nothrow @nogcdeprecated `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.
fn
real log10(uint x) @safe pure nothrow @nogcdeprecated `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.
fn
real log10(long x) @safe pure nothrow @nogcdeprecated `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.
fn
real log10(ulong x) @safe pure nothrow @nogcdeprecated `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.
fn
real log1p(int x) @safe pure nothrow @nogcdeprecated `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.
fn
real log1p(uint x) @safe pure nothrow @nogcdeprecated `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.
fn
real log1p(long x) @safe pure nothrow @nogcdeprecated `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.
fn
real log1p(ulong x) @safe pure nothrow @nogcdeprecated `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.
fn
real log2(int x) @safe pure nothrow @nogcdeprecated `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.
fn
real log2(uint x) @safe pure nothrow @nogcdeprecated `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.
fn
real log2(long x) @safe pure nothrow @nogcdeprecated `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.
fn
real log2(ulong x) @safe pure nothrow @nogcdeprecated `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.
fn
real logb(real x) @trusted pure nothrow @nogcExtracts the exponent of x as a signed integral value.Templates 1
tmplLogCoeffs(T)