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
abyb, returning an error ifbis zero. - fact
- Computes the factorial of
a. Only defined for non‐negative integers. - mode
- Computes
a % b, returning an error ifbis zero. - mul
- Multiplies two floating‐point numbers.
- pow
- Raises
ato the power ofb. - sqrt
- Computes the square root of
a, or errors ifais negative. - sub
- Subtracts
bfroma.