extra-math 1.3.6 → 1.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +26 -21
  2. package/index.d.ts +4 -2
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -7,6 +7,12 @@ This package includes some common statistics functions.<br>
7
7
 
8
8
  Mathematics is the classification and study of all possible patterns. [(1)]
9
9
 
10
+ This package is available in both *Node.js* and *Web* formats. The web format is
11
+ exposed as `extra_math` standalone variable and can be loaded from [jsDelivr CDN].
12
+
13
+ [(1)]: https://en.wikipedia.org/wiki/Walter_Warwick_Sawyer
14
+ [jsDelivr CDN]: https://cdn.jsdelivr.net/npm/extra-math.web/index.js
15
+
10
16
  > Stability: [Experimental](https://www.youtube.com/watch?v=L1j93RnIxEo).
11
17
 
12
18
  <br>
@@ -15,7 +21,7 @@ Mathematics is the classification and study of all possible patterns. [(1)]
15
21
  ```javascript
16
22
  const math = require('extra-math');
17
23
  // import * as math from "extra-math";
18
- // import * as math from "https://unpkg.com/extra-math@1.1.15/index.mjs"; (deno)
24
+ // import * as math from "https://unpkg.com/extra-math/index.mjs"; (deno)
19
25
 
20
26
  math.sum(1, 2, 3, 4);
21
27
  // 10
@@ -36,31 +42,31 @@ math.lcm(2, 3, 4);
36
42
 
37
43
  ## Index
38
44
 
39
- | Method | Action |
40
- | ------------- | ------------------------------------------------------------------- |
41
- | [sum] | Finds sum of numbers (Σ).
42
- | [product] | Finds product of numbers (∏).
43
- | [mean] | Finds average of numbers.
44
- | [median] | Finds the value separating the higher and lower halves of numbers.
45
- | [modes] | Finds the values that appear most often.
46
- | [range] | Finds the difference between the largest and smallest values.
47
- | [variance] | Finds the mean of squared deviation of numbers from its mean.
48
- | [erf] | Finds error function value of number (approximation).
49
- | [erfc] | Finds complementary error function value of number (approximation).
45
+ | Property | Description |
46
+ | ------ | ------- |
47
+ | [sum] | Finds sum of numbers (Σ). |
48
+ | [product] | Finds product of numbers (∏). |
49
+ | [mean] | Finds average of numbers. |
50
+ | [median] | Finds the value separating the higher and lower halves of numbers. |
51
+ | [modes] | Finds the values that appear most often. |
52
+ | [range] | Finds the difference between the largest and smallest values. |
53
+ | [variance] | Finds the mean of squared deviation of numbers from its mean. |
54
+ | [erf] | Finds error function value of number (approximation). |
55
+ | [erfc] | Finds complementary error function value of number (approximation). |
50
56
  | |
51
- | [rem] | Finds remainder of x/y with sign of x (truncated division).
52
- | [mod] | Finds remainder of x/y with sign of y (floored division).
53
- | [modp] | Finds remainder of x/y with +ve sign (euclidean division).
54
- | [gcd] | Finds greatest common divisor of numbers.
55
- | [lcm] | Finds least common multiple of numbers.
56
- | [binomial] | Finds ways to choose k elements from a set of n elements.
57
- | [multinomial] | Finds ways to put n objects in m bins (n=sum(ki)).
57
+ | [rem] | Finds remainder of x/y with sign of x (truncated division). |
58
+ | [mod] | Finds remainder of x/y with sign of y (floored division). |
59
+ | [modp] | Finds remainder of x/y with +ve sign (euclidean division). |
60
+ | [gcd] | Finds greatest common divisor of numbers. |
61
+ | [lcm] | Finds least common multiple of numbers. |
62
+ | [binomial] | Finds ways to choose k elements from a set of n elements. |
63
+ | [multinomial] | Finds ways to put n objects in m bins (n=sum(ki)). |
58
64
 
59
65
  <br>
60
66
  <br>
61
67
 
62
68
 
63
- ## Reference
69
+ ## References
64
70
 
65
71
  - [Yang, Z. H., & Tian, J. F. (2018). An accurate approximation formula for gamma function. Journal of inequalities and applications, 2018(1), 56.](https://doi.org/10.1186/s13660-018-1646-6)
66
72
  - [MathLib by @alawatthe](https://github.com/alawatthe/MathLib)
@@ -80,7 +86,6 @@ math.lcm(2, 3, 4);
80
86
  [![](https://img.youtube.com/vi/dW8Cy6WrO94/maxresdefault.jpg)](https://www.youtube.com/watch?v=dW8Cy6WrO94)
81
87
 
82
88
 
83
- [(1)]: https://en.wikipedia.org/wiki/Walter_Warwick_Sawyer
84
89
  [sum]: https://github.com/nodef/extra-math/wiki/sum
85
90
  [product]: https://github.com/nodef/extra-math/wiki/product
86
91
  [mean]: https://github.com/nodef/extra-math/wiki/mean
package/index.d.ts CHANGED
@@ -179,13 +179,15 @@ declare function gamma(x: number): number;
179
179
  */
180
180
  declare function lgamma(x: number): number;
181
181
  /**
182
- * TODO: Find error function value of number (approximation).
182
+ * Find error function value of number (approximation).
183
183
  * @param x a number
184
+ * @returns erf(x)
184
185
  */
185
186
  declare function erf(x: number): number;
186
187
  /**
187
- * TODO: Find the complementary error function value of number (approximation).
188
+ * Find the complementary error function value of number (approximation).
188
189
  * @param x a number
190
+ * @returns erfc(x)
189
191
  */
190
192
  declare function erfc(x: number): number;
191
193
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "extra-math",
3
- "version": "1.3.6",
3
+ "version": "1.3.9",
4
4
  "description": "Mathematics is the classification and study of all possible patterns.",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",