cmath-js 5.3.3 → 5.3.5

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.
package/README.md CHANGED
@@ -4,25 +4,25 @@ Implementation of parts of C++'s numerics libraries in TypeScript/JavaScript, in
4
4
 
5
5
  ## Floating-point functions
6
6
 
7
- - [`copysign`](https://en.cppreference.com/w/c/numeric/math/copysign)
8
- - [`fabs`](https://en.cppreference.com/w/c/numeric/math/fabs)
7
+ - [`copysign`](https://en.cppreference.com/c/numeric/math/copysign)
8
+ - [`fabs`](https://en.cppreference.com/c/numeric/math/fabs)
9
9
  - [`fpclassify`](https://en.cppreference.com/c/numeric/math/fpclassify)
10
- - [`frexp`](https://en.cppreference.com/w/c/numeric/math/frexp)
11
- - [`hypot`](https://en.cppreference.com/w/cpp/numeric/math/hypot)
10
+ - [`frexp`](https://en.cppreference.com/c/numeric/math/frexp)
11
+ - [`hypot`](https://en.cppreference.com/cpp/numeric/math/hypot)
12
12
  - [`iscanonical`](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3096.pdf#subsection.7.12.3)
13
13
  - [`isfinite`](https://en.cppreference.com/c/numeric/math/isfinite)
14
- - [`isinf`](https://en.cppreference.com/w/c/numeric/math/isinf)
15
- - [`ldexp`](https://en.cppreference.com/w/c/numeric/math/ldexp)
16
- - [`nan`](https://en.cppreference.com/w/c/numeric/math/nan)
17
- - [`nextafter`](https://en.cppreference.com/w/c/numeric/math/nextafter)
18
- - [`pow`](https://en.cppreference.com/w/c/numeric/math/pow)
14
+ - [`isinf`](https://en.cppreference.com/c/numeric/math/isinf)
15
+ - [`ldexp`](https://en.cppreference.com/c/numeric/math/ldexp)
16
+ - [`nan`](https://en.cppreference.com/c/numeric/math/nan)
17
+ - [`nextafter`](https://en.cppreference.com/c/numeric/math/nextafter)
18
+ - [`pow`](https://en.cppreference.com/c/numeric/math/pow)
19
19
 
20
20
  ## Integer functions
21
21
 
22
22
  These functions accept either a `bigint` or an integer `number`:
23
23
 
24
- - [`abs`](https://en.cppreference.com/w/c/numeric/math/abs)
25
- - [`countl_one`](https://en.cppreference.com/w/cpp/numeric/countl_one) as `create_countl_one`, which is used this way:
24
+ - [`abs`](https://en.cppreference.com/c/numeric/math/abs)
25
+ - [`countl_one`](https://en.cppreference.com/cpp/numeric/countl_one) as `create_countl_one`, which is used this way:
26
26
  ```ts
27
27
  import { create_countl_one } from "cmath-js";
28
28
  const countl_one_u16 = create_countl_one({ bits: 16 });
@@ -32,27 +32,27 @@ These functions accept either a `bigint` or an integer `number`:
32
32
  `${integer.toString(2).padStart(16, "0")} has ${countl_one_u16(integer)} leading one bits.`,
33
33
  );
34
34
  ```
35
- - [`countl_zero`](https://en.cppreference.com/w/cpp/numeric/countl_zero) as `create_countl_zero`
36
- - [`countr_one`](https://en.cppreference.com/w/cpp/numeric/countr_one) as `create_countr_one`
37
- - [`countr_zero`](https://en.cppreference.com/w/cpp/numeric/countr_zero) as `create_countr_zero`
38
- - [`div`](https://en.cppreference.com/w/cpp/numeric/math/div)
39
- - [`gcd`](https://en.cppreference.com/w/cpp/numeric/gcd). Example:
35
+ - [`countl_zero`](https://en.cppreference.com/cpp/numeric/countl_zero) as `create_countl_zero`
36
+ - [`countr_one`](https://en.cppreference.com/cpp/numeric/countr_one) as `create_countr_one`
37
+ - [`countr_zero`](https://en.cppreference.com/cpp/numeric/countr_zero) as `create_countr_zero`
38
+ - [`div`](https://en.cppreference.com/cpp/numeric/math/div)
39
+ - [`gcd`](https://en.cppreference.com/cpp/numeric/gcd). Example:
40
40
  ```ts
41
41
  import { gcd } from "cmath-js";
42
42
  // Prints "The greatest common divisor of 24 and 32 is 8."
43
43
  console.log(`The greatest common divisor of 24 and 32 is ${gcd(24, 32)}.`);
44
44
  ```
45
- - [`lcm`](https://en.cppreference.com/w/cpp/numeric/lcm)
46
- - [`popcount`](https://en.cppreference.com/w/cpp/numeric/popcount)
45
+ - [`lcm`](https://en.cppreference.com/cpp/numeric/lcm)
46
+ - [`popcount`](https://en.cppreference.com/cpp/numeric/popcount)
47
47
 
48
48
  ## Functions for both floats and ints
49
49
 
50
- - [`iota`](https://en.cppreference.com/w/cpp/algorithm/iota)
51
- - [`signbit`](https://en.cppreference.com/w/c/numeric/math/signbit)
50
+ - [`iota`](https://en.cppreference.com/cpp/algorithm/iota)
51
+ - [`signbit`](https://en.cppreference.com/c/numeric/math/signbit)
52
52
 
53
53
  ## Mathematical constants
54
54
 
55
- - Constants in [the `std::numbers` namespace](https://en.cppreference.com/w/cpp/numeric/constants) are available from the `numbers` subpath export. Example:
55
+ - Constants in [the `std::numbers` namespace](https://en.cppreference.com/cpp/numeric/constants) are available from the `numbers` subpath export. Example:
56
56
  ```ts
57
57
  import { sqrt3 } from "cmath-js/numbers";
58
58
  console.log(`The square root of 3 is ${sqrt3}.`);
@@ -1 +1 @@
1
- {"version":3,"file":"iota.js","sourceRoot":"","sources":["../../../src/namespace-std/all-numbers/iota.ts"],"names":[],"mappings":"AAQA,MAAM,UAAU,IAAI,CAAC,eAAoC,EAAE,UAA2B;IACrF,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACjC,IAAI,KAAK,GAAG,UAAU,CAAC;IACvB,KAAK,MAAM,KAAK,IAAI,eAAe,CAAC,IAAI,EAAE,EAAE,CAAC;QAC5C,eAAe,CAAC,KAAK,CAAC,GAAG,KAAK,EAAE,CAAC;IAClC,CAAC;AACF,CAAC"}
1
+ {"version":3,"file":"iota.js","sourceRoot":"","sources":["../../../src/namespace-std/all-numbers/iota.ts"],"names":[],"mappings":"AASA,MAAM,UAAU,IAAI,CAAC,eAAoC,EAAE,UAA2B;IACrF,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACjC,IAAI,KAAK,GAAG,UAAU,CAAC;IACvB,KAAK,MAAM,KAAK,IAAI,eAAe,CAAC,IAAI,EAAE,EAAE,CAAC;QAC5C,eAAe,CAAC,KAAK,CAAC,GAAG,KAAK,EAAE,CAAC;IAClC,CAAC;AACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"signbit.js","sourceRoot":"","sources":["../../../src/namespace-std/all-numbers/signbit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAWtD,MAAM,UAAU,OAAO,CAAC,GAAoB;IAC3C,OAAO,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,GAAG,CAAC;AAC9C,CAAC"}
1
+ {"version":3,"file":"signbit.js","sourceRoot":"","sources":["../../../src/namespace-std/all-numbers/signbit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAYtD,MAAM,UAAU,OAAO,CAAC,GAAoB;IAC3C,OAAO,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,GAAG,CAAC;AAC9C,CAAC"}
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/oskarlh/cmath-js.git"
7
7
  },
8
- "version": "5.3.3",
8
+ "version": "5.3.5",
9
9
  "exports": {
10
10
  ".": {
11
11
  "types": "./dist/index.d.ts",