std.math
The std.math module provides the constant pi and common floating-point
functions.
Source:
import std.math
actor main(env):
angle = std.math.pi / 4.0
print(std.math.sin(angle))
print(std.math.sqrt(9.0))
env.exit(0)
Import the module first with import math, then call its
functions as std.math.sqrt(...), std.math.sin(...),
and so on.
The module currently exposes:
pisqrt,exp,logsin,cos,tanasin,acos,atansinh,cosh,tanhasinh,acosh,atanhldexp(x, exp), which returnsx * 2**exp
All functions return float. ldexp also takes an int exponent.