gcalc/alg
A set of algebraic operations for Gleam programs
Types
Functions
pub fn factorial(n: Float) -> Result(Float, MathError)
Returns a result containing the factorial of the argument or an error if the argument is negative
Note: This function only supports non-negative values
pub fn pow(base: Float, power: Float) -> Float
Returns the exponentiation of the two arguments (i.e. the first argument raised to the power of the second argument)
pub fn sqrt(n: Float) -> Result(Float, MathError)
Returns a result containing the square root of the argument or an error if the argument is negative
Note: This function only supports non-negative values and returns the floor of the result (i.e. the largest integer less than or equal to the result)