View source code
Display the source code in std/math/algebraic.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Module std.math.algebraic

This is a submodule of std.math.

It contains classical algebraic functions like abs, sqrt, and poly.

Functions

NameDescription
abs(x) Calculates the absolute value of a number.
cbrt(x) Calculates the cube root of x.
fabs(x) Returns |x|
hypot(x, y) Calculates 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:
hypot(x, y, z) Calculates 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:
nextPow2(val) Gives the next power of two after val. T can be any built-in numerical type.
poly(x, A) Evaluate polynomial A(x) = a0 + a1x + a2x2 + a3x3; ...
sqrt(x) Compute square root of x.
truncPow2(val) Gives the last power of two before val. <> can be any built-in numerical type.

Authors

Walter Bright, Don Clugston, Conversion of CEPHES math library to D by Iain Buclaw and David Nadlinger

License

Boost License 1.0.