View source code
Display the source code in std/math/constants.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.constants

This is a submodule of std.math.

It contains several useful mathematical constants.

Manifest constants

NameTypeDescription
E e = 2.718281...
LN10 ln 10 = 2.302585...
LN2 ln 2 = 0.693147...
LOG10E log10e = 0.434294...
LOG2 log102 = 0.301029...
LOG2E log2e = 1.442695...
LOG2T log210 = 3.321928...
M_1_PI 1 / π = 0.318309...
M_2_PI 2 / π = 0.636619...
M_2_SQRTPI 2 / √π = 1.128379...
PI π = 3.141592...
PI_2 π / 2 = 1.570796...
PI_4 π / 4 = 0.785398...
SQRT1_2 √½ = 0.707106...
SQRT2 √2 = 1.414213...

Authors

Walter Bright, Don Clugston

License

Boost License 1.0.