Crate xrust_calclib

Crate xrust_calclib 

Source
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 by b, returning an error if b is zero.
fact
Computes the factorial of a. Only defined for non‐negative integers.
mode
Computes a % b, returning an error if b is zero.
mul
Multiplies two floating‐point numbers.
pow
Raises a to the power of b.
sqrt
Computes the square root of a, or errors if a is negative.
sub
Subtracts b from a.