mirror of
https://github.com/sigmasternchen/gleam-community-maths
synced 2025-03-15 07:59:01 +00:00
Fix typos
This commit is contained in:
parent
2313363a9e
commit
d2485d4e88
3 changed files with 18 additions and 15 deletions
|
@ -307,7 +307,7 @@ pub fn proper_divisors(n: Int) -> List(Int) {
|
|||
///
|
||||
/// In the formula, $$n$$ is the length of the list and $$x_i \in \mathbb{R}$$ is
|
||||
/// the value in the input list indexed by $$i$$, while $$w_i \in \mathbb{R}$$ is
|
||||
/// a corresponding weight ($$w_i = 1.0\;\forall i=1...n$$ by default).
|
||||
/// a corresponding weight ($$w_i = 1.0\\;\forall i=1...n$$ by default).
|
||||
///
|
||||
/// <details>
|
||||
/// <summary>Example:</summary>
|
||||
|
@ -413,7 +413,7 @@ pub fn int_sum(arr: List(Int)) -> Int {
|
|||
///
|
||||
/// In the formula, $$n$$ is the length of the list and $$x_i \in \mathbb{R}$$ is
|
||||
/// the value in the input list indexed by $$i$$, while $$w_i \in \mathbb{R}$$ is
|
||||
/// a corresponding weight ($$w_i = 1.0\;\forall i=1...n$$ by default).
|
||||
/// a corresponding weight ($$w_i = 1.0\\;\forall i=1...n$$ by default).
|
||||
///
|
||||
/// <details>
|
||||
/// <summary>Example:</summary>
|
||||
|
|
|
@ -130,7 +130,7 @@ fn validate_weights(warr: List(Float)) -> Result(Bool, String) {
|
|||
///
|
||||
/// In the formula, $$n$$ is the length of the list and $$x_i$$ is the value in
|
||||
/// the input list indexed by $$i$$, while $$w_i \in \mathbb{R}_{+}$$ is
|
||||
/// a corresponding positive weight ($$w_i = 1.0\;\forall i=1...n$$ by default).
|
||||
/// a corresponding positive weight ($$w_i = 1.0\\;\forall i=1...n$$ by default).
|
||||
///
|
||||
/// <details>
|
||||
/// <summary>Example:</summary>
|
||||
|
@ -245,7 +245,7 @@ pub fn norm(
|
|||
/// In the formula, $$n$$ is the length of the two lists and $$x_i, y_i$$ are the
|
||||
/// values in the respective input lists indexed by $$i$$, while
|
||||
/// $$w_i \in \mathbb{R}_{+}$$ is a corresponding positive weight
|
||||
/// ($$w_i = 1.0\;\forall i=1...n$$ by default).
|
||||
/// ($$w_i = 1.0\\;\forall i=1...n$$ by default).
|
||||
///
|
||||
/// <details>
|
||||
/// <summary>Example:</summary>
|
||||
|
@ -305,7 +305,7 @@ pub fn manhattan_distance(
|
|||
/// In the formula, $$p >= 1$$ is the order, $$n$$ is the length of the two lists
|
||||
/// and $$x_i, y_i$$ are the values in the respective input lists indexed by $$i$$.
|
||||
/// $$w_i \in \mathbb{R}_{+}$$ is a corresponding positive weight
|
||||
/// ($$w_i = 1.0\;\forall i=1...n$$ by default).
|
||||
/// ($$w_i = 1.0\\;\forall i=1...n$$ by default).
|
||||
///
|
||||
/// The Minkowski distance is a generalization of both the Euclidean distance
|
||||
/// ($$p=2$$) and the Manhattan distance ($$p = 1$$).
|
||||
|
@ -395,7 +395,7 @@ pub fn minkowski_distance(
|
|||
/// In the formula, $$n$$ is the length of the two lists and $$x_i, y_i$$ are the
|
||||
/// values in the respective input lists indexed by $$i$$, while
|
||||
/// $$w_i \in \mathbb{R}_{+}$$ is a corresponding positive weight
|
||||
/// ($$w_i = 1.0\;\forall i=1...n$$ by default).
|
||||
/// ($$w_i = 1.0\\;\forall i=1...n$$ by default).
|
||||
///
|
||||
/// <details>
|
||||
/// <summary>Example:</summary>
|
||||
|
@ -1034,17 +1034,17 @@ pub fn overlap_coefficient(xset: set.Set(a), yset: set.Set(a)) -> Float {
|
|||
/// vectors):
|
||||
///
|
||||
/// \\[
|
||||
/// \frac{\sum_{i=1}^n w_i \cdot x_i \cdot y_i}
|
||||
/// {\left(\sum_{i=1}^n x_i^2\right)^{\frac{1}{2}}
|
||||
/// \frac{\sum_{i=1}^n w_{i} \cdot x_i \cdot y_i}
|
||||
/// {\left(\sum_{i=1}^n w_{i} \cdot x_i^2\right)^{\frac{1}{2}}
|
||||
/// \cdot
|
||||
/// \left(\sum_{i=1}^n w_i y_i^2\right)^{\frac{1}{2}}}
|
||||
/// \left(\sum_{i=1}^n w_{i} \cdot y_i^2\right)^{\frac{1}{2}}}
|
||||
/// \\; \in \\; \left[-1, 1\right]
|
||||
/// \\]
|
||||
///
|
||||
/// In the formula, $$n$$ is the length of the two lists and $$x_i$$, $$y_i$$ are
|
||||
/// the values in the respective input lists indexed by $$i$$, while
|
||||
/// $$w_i \in \mathbb{R}_{+}$$ is a corresponding positive weight
|
||||
/// ($$w_i = 1.0\;\forall i=1...n$$ by default).
|
||||
/// ($$w_i = 1.0\\;\forall i=1...n$$ by default).
|
||||
///
|
||||
/// The cosine similarity provides a value between -1 and 1, where 1 means the
|
||||
/// vectors are in the same direction, -1 means they are in exactly opposite
|
||||
|
|
|
@ -490,7 +490,7 @@ fn do_ceiling(a: Float) -> Float
|
|||
/// The absolute value:
|
||||
///
|
||||
/// \\[
|
||||
/// \forall x, y \in \mathbb{R}, \\; |x| \in \mathbb{R}_{+}.
|
||||
/// \forall x \in \mathbb{R}, \\; |x| \in \mathbb{R}_{+}.
|
||||
/// \\]
|
||||
///
|
||||
/// The function takes an input $$x$$ and returns a positive float value.
|
||||
|
@ -519,7 +519,7 @@ pub fn float_absolute_value(x: Float) -> Float {
|
|||
/// The absolute value:
|
||||
///
|
||||
/// \\[
|
||||
/// \forall x, y \in \mathbb{Z}, \\; |x| \in \mathbb{Z}_{+}.
|
||||
/// \forall x \in \mathbb{Z}, \\; |x| \in \mathbb{Z}_{+}.
|
||||
/// \\]
|
||||
///
|
||||
/// The function takes an input $$x$$ and returns a positive integer value.
|
||||
|
@ -592,7 +592,8 @@ pub fn float_absolute_difference(a: Float, b: Float) -> Float {
|
|||
/// \forall x, y \in \mathbb{Z}, \\; |x - y| \in \mathbb{Z}_{+}.
|
||||
/// \\]
|
||||
///
|
||||
/// The function takes two inputs $$x$$ and $$y$$ and returns a positive integer value which is the the absolute difference of the inputs.
|
||||
/// The function takes two inputs $$x$$ and $$y$$ and returns a positive integer
|
||||
/// value which is the the absolute difference of the inputs.
|
||||
///
|
||||
/// <details>
|
||||
/// <summary>Example:</summary>
|
||||
|
@ -698,7 +699,8 @@ fn do_int_sign(a: Int) -> Int
|
|||
/// </a>
|
||||
/// </div>
|
||||
///
|
||||
/// The function takes two arguments $$x, y \in \mathbb{R}$$ and returns $$x$$ such that it has the same sign as $$y$$.
|
||||
/// The function takes two arguments $$x, y \in \mathbb{R}$$ and returns $$x$$
|
||||
/// such that it has the same sign as $$y$$.
|
||||
///
|
||||
/// <div style="text-align: right;">
|
||||
/// <a href="#">
|
||||
|
@ -723,7 +725,8 @@ pub fn float_copy_sign(x: Float, y: Float) -> Float {
|
|||
/// </a>
|
||||
/// </div>
|
||||
///
|
||||
/// The function takes two arguments $$x, y \in \mathbb{Z}$$ and returns $$x$$ such that it has the same sign as $$y$$.
|
||||
/// The function takes two arguments $$x, y \in \mathbb{Z}$$ and returns $$x$$
|
||||
/// such that it has the same sign as $$y$$.
|
||||
///
|
||||
/// <div style="text-align: right;">
|
||||
/// <a href="#">
|
||||
|
|
Loading…
Reference in a new issue