|
1 |
| -////<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.10/dist/katex.min.css" integrity="sha384-wcIxkf4k558AjM3Yz3BBFQUbk/zgIYC2R0QpeeYb+TwlBVMrlgLqwRjRtGZiK7ww" crossorigin="anonymous"> |
2 |
| -////<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.10/dist/katex.min.js" integrity="sha384-hIoBPJpTUs74ddyc4bFZSM1TVlQDA60VBbJS0oA934VSz82sBx1X7kSx2ATBDIyd" crossorigin="anonymous"></script> |
3 |
| -////<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.10/dist/contrib/auto-render.min.js" integrity="sha384-43gviWU0YVjaDtb/GhzOouOXtZMP/7XUzwPTstBeZFe/+rCMvRwr4yROQP43s0Xk" crossorigin="anonymous"></script> |
| 1 | +////<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"> |
| 2 | +////<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.js" integrity="sha384-7zkQWkzuo3B5mTepMUcHkMB5jZaolc2xDwL6VFqjFALcbeS9Ggm/Yr2r3Dy4lfFg" crossorigin="anonymous"></script> |
| 3 | +////<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/contrib/auto-render.min.js" integrity="sha384-43gviWU0YVjaDtb/GhzOouOXtZMP/7XUzwPTstBeZFe/+rCMvRwr4yROQP43s0Xk" crossorigin="anonymous"></script> |
4 | 4 | ////<script>
|
5 | 5 | //// document.addEventListener("DOMContentLoaded", function() {
|
6 | 6 | //// renderMathInElement(document.body, {
|
7 | 7 | //// // customised options
|
8 | 8 | //// // • auto-render specific keys, e.g.:
|
9 | 9 | //// delimiters: [
|
10 | 10 | //// {left: '$$', right: '$$', display: false},
|
11 |
| -//// // {left: '$', right: '$', display: false}, |
12 |
| -//// // {left: '\\(', right: '\\)', display: false}, |
| 11 | +//// {left: '$', right: '$', display: false}, |
| 12 | +//// {left: '\\(', right: '\\)', display: false}, |
13 | 13 | //// {left: '\\[', right: '\\]', display: true}
|
14 | 14 | //// ],
|
15 | 15 | //// // • rendering keys, e.g.:
|
16 |
| -//// throwOnError : false |
| 16 | +//// throwOnError : true |
17 | 17 | //// });
|
18 | 18 | //// });
|
19 | 19 | ////</script>
|
@@ -58,8 +58,8 @@ import gleam_community/maths/piecewise
|
58 | 58 | /// </div>
|
59 | 59 | ///
|
60 | 60 | /// The function calculates the greatest common divisor of two integers
|
61 |
| -/// $$x, y \in \mathbb{Z}$$. The greatest common divisor is the largest positive |
62 |
| -/// integer that is divisible by both $$x$$ and $$y$$. |
| 61 | +/// \\(x, y \in \mathbb{Z}\\). The greatest common divisor is the largest positive |
| 62 | +/// integer that is divisible by both \\(x\\) and \\(y\\). |
63 | 63 | ///
|
64 | 64 | /// <details>
|
65 | 65 | /// <summary>Example:</summary>
|
@@ -108,15 +108,15 @@ fn do_gcd(x: Int, y: Int) -> Int {
|
108 | 108 | /// </div>
|
109 | 109 | ///
|
110 | 110 | ///
|
111 |
| -/// Given two integers, $$x$$ (dividend) and $$y$$ (divisor), the Euclidean modulo |
112 |
| -/// of $$x$$ by $$y$$, denoted as $$x \mod y$$, is the remainder $$r$$ of the |
113 |
| -/// division of $$x$$ by $$y$$, such that: |
| 111 | +/// Given two integers, \\(x\\) (dividend) and \\(y\\) (divisor), the Euclidean modulo |
| 112 | +/// of \\(x\\) by \\(y\\), denoted as \\(x \mod y\\), is the remainder \\(r\\) of the |
| 113 | +/// division of \\(x\\) by \\(y\\), such that: |
114 | 114 | ///
|
115 | 115 | /// \\[
|
116 | 116 | /// x = q \cdot y + r \quad \text{and} \quad 0 \leq r < |y|,
|
117 | 117 | /// \\]
|
118 | 118 | ///
|
119 |
| -/// where $$q$$ is an integer that represents the quotient of the division. |
| 119 | +/// where \\(q\\) is an integer that represents the quotient of the division. |
120 | 120 | ///
|
121 | 121 | /// The Euclidean modulo function of two numbers, is the remainder operation most
|
122 | 122 | /// commonly utilized in mathematics. This differs from the standard truncating
|
@@ -169,8 +169,8 @@ pub fn int_euclidean_modulo(x: Int, y: Int) -> Int {
|
169 | 169 | /// </div>
|
170 | 170 | ///
|
171 | 171 | /// The function calculates the least common multiple of two integers
|
172 |
| -/// $$x, y \in \mathbb{Z}$$. The least common multiple is the smallest positive |
173 |
| -/// integer that has both $$x$$ and $$y$$ as factors. |
| 172 | +/// \\(x, y \in \mathbb{Z}\\). The least common multiple is the smallest positive |
| 173 | +/// integer that has both \\(x\\) and \\(y\\) as factors. |
174 | 174 | ///
|
175 | 175 | /// <details>
|
176 | 176 | /// <summary>Example:</summary>
|
@@ -305,9 +305,9 @@ pub fn proper_divisors(n: Int) -> List(Int) {
|
305 | 305 | /// \sum_{i=1}^n w_i x_i
|
306 | 306 | /// \\]
|
307 | 307 | ///
|
308 |
| -/// In the formula, $$n$$ is the length of the list and $$x_i \in \mathbb{R}$$ is |
309 |
| -/// the value in the input list indexed by $$i$$, while the $$w_i \in \mathbb{R}$$ |
310 |
| -/// are corresponding weights ($$w_i = 1.0\\;\forall i=1...n$$ by default). |
| 308 | +/// In the formula, \\(n\\) is the length of the list and \\(x_i \in \mathbb{R}\\) is |
| 309 | +/// the value in the input list indexed by \\(i\\), while the \\(w_i \in \mathbb{R}\\) |
| 310 | +/// are corresponding weights (\\(w_i = 1.0\\;\forall i=1...n\\) by default). |
311 | 311 | ///
|
312 | 312 | /// <details>
|
313 | 313 | /// <summary>Example:</summary>
|
@@ -362,8 +362,8 @@ pub fn float_sum(arr: List(Float), weights: option.Option(List(Float))) -> Float
|
362 | 362 | /// \sum_{i=1}^n x_i
|
363 | 363 | /// \\]
|
364 | 364 | ///
|
365 |
| -/// In the formula, $$n$$ is the length of the list and $$x_i \in \mathbb{Z}$$ is |
366 |
| -/// the value in the input list indexed by $$i$$. |
| 365 | +/// In the formula, \\(n\\) is the length of the list and \\(x_i \in \mathbb{Z}\\) is |
| 366 | +/// the value in the input list indexed by \\(i\\). |
367 | 367 | ///
|
368 | 368 | /// <details>
|
369 | 369 | /// <summary>Example:</summary>
|
@@ -411,9 +411,9 @@ pub fn int_sum(arr: List(Int)) -> Int {
|
411 | 411 | /// \prod_{i=1}^n x_i^{w_i}
|
412 | 412 | /// \\]
|
413 | 413 | ///
|
414 |
| -/// In the formula, $$n$$ is the length of the list and $$x_i \in \mathbb{R}$$ is |
415 |
| -/// the value in the input list indexed by $$i$$, while the $$w_i \in \mathbb{R}$$ |
416 |
| -/// are corresponding weights ($$w_i = 1.0\\;\forall i=1...n$$ by default). |
| 414 | +/// In the formula, \\(n\\) is the length of the list and \\(x_i \in \mathbb{R}\\) is |
| 415 | +/// the value in the input list indexed by \\(i\\), while the \\(w_i \in \mathbb{R}\\) |
| 416 | +/// are corresponding weights (\\(w_i = 1.0\\;\forall i=1...n\\) by default). |
417 | 417 | ///
|
418 | 418 | /// <details>
|
419 | 419 | /// <summary>Example:</summary>
|
@@ -486,8 +486,8 @@ pub fn float_product(
|
486 | 486 | /// \prod_{i=1}^n x_i
|
487 | 487 | /// \\]
|
488 | 488 | ///
|
489 |
| -/// In the formula, $$n$$ is the length of the list and $$x_i \in \mathbb{Z}$$ is |
490 |
| -/// the value in the input list indexed by $$i$$. |
| 489 | +/// In the formula, \\(n\\) is the length of the list and \\(x_i \in \mathbb{Z}\\) is |
| 490 | +/// the value in the input list indexed by \\(i\\). |
491 | 491 | ///
|
492 | 492 | /// <details>
|
493 | 493 | /// <summary>Example:</summary>
|
@@ -535,10 +535,10 @@ pub fn int_product(arr: List(Int)) -> Int {
|
535 | 535 | /// v_j = \sum_{i=1}^j x_i \\;\\; \forall j = 1,\dots, n
|
536 | 536 | /// \\]
|
537 | 537 | ///
|
538 |
| -/// In the formula, $$v_j$$ is the $$j$$'th element in the cumulative sum of $$n$$ |
539 |
| -/// elements. That is, $$n$$ is the length of the list and $$x_i \in \mathbb{R}$$ |
540 |
| -/// is the value in the input list indexed by $$i$$. The value $$v_j$$ is thus the |
541 |
| -/// sum of the $$1$$ to $$j$$ first elements in the given list. |
| 538 | +/// In the formula, \\(v_j\\) is the \\(j\\)'th element in the cumulative sum of \\(n\\) |
| 539 | +/// elements. That is, \\(n\\) is the length of the list and \\(x_i \in \mathbb{R}\\) |
| 540 | +/// is the value in the input list indexed by \\(i\\). The value \\(v_j\\) is thus the |
| 541 | +/// sum of the \\(1\\) to \\(j\\) first elements in the given list. |
542 | 542 | ///
|
543 | 543 | /// <details>
|
544 | 544 | /// <summary>Example:</summary>
|
@@ -585,10 +585,10 @@ pub fn float_cumulative_sum(arr: List(Float)) -> List(Float) {
|
585 | 585 | /// v_j = \sum_{i=1}^j x_i \\;\\; \forall j = 1,\dots, n
|
586 | 586 | /// \\]
|
587 | 587 | ///
|
588 |
| -/// In the formula, $$v_j$$ is the $$j$$'th element in the cumulative sum of $$n$$ |
589 |
| -/// elements. That is, $$n$$ is the length of the list and $$x_i \in \mathbb{Z}$$ |
590 |
| -/// is the value in the input list indexed by $$i$$. The value $$v_j$$ is thus the |
591 |
| -/// sum of the $$1$$ to $$j$$ first elements in the given list. |
| 588 | +/// In the formula, \\(v_j\\) is the \\(j\\)'th element in the cumulative sum of \\(n\\) |
| 589 | +/// elements. That is, \\(n\\) is the length of the list and \\(x_i \in \mathbb{Z}\\) |
| 590 | +/// is the value in the input list indexed by \\(i\\). The value \\(v_j\\) is thus the |
| 591 | +/// sum of the \\(1\\) to \\(j\\) first elements in the given list. |
592 | 592 | ///
|
593 | 593 | /// <details>
|
594 | 594 | /// <summary>Example:</summary>
|
@@ -635,10 +635,10 @@ pub fn int_cumulative_sum(arr: List(Int)) -> List(Int) {
|
635 | 635 | /// v_j = \prod_{i=1}^j x_i \\;\\; \forall j = 1,\dots, n
|
636 | 636 | /// \\]
|
637 | 637 | ///
|
638 |
| -/// In the formula, $$v_j$$ is the $$j$$'th element in the cumulative product of |
639 |
| -/// $$n$$ elements. That is, $$n$$ is the length of the list and |
640 |
| -/// $$x_i \in \mathbb{R}$$ is the value in the input list indexed by $$i$$. The |
641 |
| -/// value $$v_j$$ is thus the sum of the $$1$$ to $$j$$ first elements in the |
| 638 | +/// In the formula, \\(v_j\\) is the \\(j\\)'th element in the cumulative product of |
| 639 | +/// \\(n\\) elements. That is, \\(n\\) is the length of the list and |
| 640 | +/// \\(x_i \in \mathbb{R}\\) is the value in the input list indexed by \\(i\\). The |
| 641 | +/// value \\(v_j\\) is thus the sum of the \\(1\\) to \\(j\\) first elements in the |
642 | 642 | /// given list.
|
643 | 643 | ///
|
644 | 644 | /// <details>
|
@@ -687,10 +687,10 @@ pub fn float_cumulative_product(arr: List(Float)) -> List(Float) {
|
687 | 687 | /// v_j = \prod_{i=1}^j x_i \\;\\; \forall j = 1,\dots, n
|
688 | 688 | /// \\]
|
689 | 689 | ///
|
690 |
| -/// In the formula, $$v_j$$ is the $$j$$'th element in the cumulative product of |
691 |
| -/// $$n$$ elements. That is, $$n$$ is the length of the list and |
692 |
| -/// $$x_i \in \mathbb{Z}$$ is the value in the input list indexed by $$i$$. The |
693 |
| -/// value $$v_j$$ is thus the product of the $$1$$ to $$j$$ first elements in the |
| 690 | +/// In the formula, \\(v_j\\) is the \\(j\\)'th element in the cumulative product of |
| 691 | +/// \\(n\\) elements. That is, \\(n\\) is the length of the list and |
| 692 | +/// \\(x_i \in \mathbb{Z}\\) is the value in the input list indexed by \\(i\\). The |
| 693 | +/// value \\(v_j\\) is thus the product of the \\(1\\) to \\(j\\) first elements in the |
694 | 694 | /// given list.
|
695 | 695 | ///
|
696 | 696 | /// <details>
|
|
0 commit comments