std.math.algebraic
This is a submodule of std.math.
It contains classical algebraic functions like abs, sqrt, and poly.
Copyright
Copyright The D Language Foundation 2000 - 2011.
enum PowType
Types 1
floor
ceil
Functions 20
fn
auto abs(Num)(Num x) if (isIntegral!Num || (is(typeof(Num.init >= 0)) && is(typeof(- Num.init)))) @nogc nothrow pureCalculates the absolute value of a number.fn
T hypot(T)(const T x, const T y) if (isFloatingPoint!T) @safe pure nothrow @nogcCalculates the length of the hypotenuse of a right-angled triangle with sides of length x and y. The hypotenuse is the value of the square root of the sums of the squares of x and y:fn
T hypot(T)(const T x, const T y, const T z) if (isFloatingPoint!T) @safe pure nothrow @nogcCalculates the distance of the point (x, y, z) from the origin (0, 0, 0) in three-dimensional space. The distance is the value of the square root of the sums of the squares of x, y, and z:fn
Unqual!(CommonType!(T1, T2)) poly(T1, T2)(T1 x, in T2[] A) if (isFloatingPoint!T1 && isFloatingPoint!T2) @trusted pure nothrow @nogcEvaluate polynomial A(x) = a + ax + ax + ax; ...fn
Unqual!(CommonType!(T1, T2)) poly(T1, T2, int N)(T1 x, ref const T2[N] A) if (isFloatingPoint!T1 && isFloatingPoint!T2 && N > 0 && N <= 10) @safe pure nothrow @nogcdittoprivate fn
Unqual!(CommonType!(T1, T2)) polyImplBase(T1, T2)(T1 x, in T2[] A) if (isFloatingPoint!T1 && isFloatingPoint!T2) @trusted pure nothrow @nogcfn
T nextPow2(T)(const T val) if (isIntegral!T)Gives the next power of two after `val`. `T` can be any built-in numerical type.fn
T truncPow2(T)(const T val) if (isIntegral!T)Gives the last power of two before `val`. can be any built-in numerical type.