Expand description
xrust_calclib: A simple floating‐point calculator library.
Functions§
- abs
- Returns the absolute value of
a
. - add
- Adds two floating‐point numbers.
- div
- Divides
a
byb
, returning an error ifb
is zero. - fact
- Computes the factorial of
a
. Only defined for non‐negative integers. - mode
- Computes
a % b
, returning an error ifb
is zero. - mul
- Multiplies two floating‐point numbers.
- pow
- Raises
a
to the power ofb
. - sqrt
- Computes the square root of
a
, or errors ifa
is negative. - sub
- Subtracts
b
froma
.