diff --git a/src/gleam_community/maths/arithmetics.gleam b/src/gleam_community/maths/arithmetics.gleam index 6f9644c..6757c4b 100644 --- a/src/gleam_community/maths/arithmetics.gleam +++ b/src/gleam_community/maths/arithmetics.gleam @@ -86,7 +86,7 @@ pub fn gcd(x: Int, y: Int) -> Int { do_gcd(absx, absy) } -pub fn do_gcd(x: Int, y: Int) -> Int { +fn do_gcd(x: Int, y: Int) -> Int { case x == 0 { True -> y False -> { @@ -171,7 +171,7 @@ pub fn divisors(n: Int) -> List(Int) { find_divisors(n) } -pub fn find_divisors(n: Int) -> List(Int) { +fn find_divisors(n: Int) -> List(Int) { let nabs: Float = piecewise.float_absolute_value(conversion.int_to_float(n)) let assert Ok(sqrt_result) = elementary.square_root(nabs) let max: Int = conversion.float_to_int(sqrt_result) + 1 diff --git a/src/gleam_community/maths/metrics.gleam b/src/gleam_community/maths/metrics.gleam index a508748..1dab2b4 100644 --- a/src/gleam_community/maths/metrics.gleam +++ b/src/gleam_community/maths/metrics.gleam @@ -500,7 +500,7 @@ pub fn variance(arr: List(Float), ddof: Int) -> Result(Float, String) { /// /// Calculcate the sample standard deviation of the elements in a list: /// \\[ -/// s = \left(\frac{1}{n - d} \sum_{i=1}^{n}(x_i - \bar{x}))\right)^{\frac{1}{2}} +/// s = \left(\frac{1}{n - d} \sum_{i=1}^{n}(x_i - \bar{x})\right)^{\frac{1}{2}} /// \\] /// /// In the formula, $$n$$ is the sample size (the length of the list) and