cmath-js 5.7.0 → 5.9.0
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 +2 -0
- package/dist/namespace-std/doubles/index.d.ts +1 -0
- package/dist/namespace-std/doubles/index.js +1 -0
- package/dist/namespace-std/doubles/index.js.map +1 -1
- package/dist/namespace-std/doubles/issubnormal.d.ts +1 -0
- package/dist/namespace-std/doubles/issubnormal.js +6 -0
- package/dist/namespace-std/doubles/issubnormal.js.map +1 -0
- package/dist/namespace-std/integers/has_single_bit.d.ts +1 -0
- package/dist/namespace-std/integers/has_single_bit.js +7 -0
- package/dist/namespace-std/integers/has_single_bit.js.map +1 -0
- package/dist/namespace-std/integers/index.d.ts +1 -0
- package/dist/namespace-std/integers/index.js +1 -0
- package/dist/namespace-std/integers/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,6 +15,7 @@ Implementation of parts of C++'s numerics libraries in TypeScript/JavaScript, in
|
|
|
15
15
|
- [`isnan`](https://en.cppreference.com/c/numeric/math/isnan)
|
|
16
16
|
- [`isnormal`](https://en.cppreference.com/c/numeric/math/isnormal)
|
|
17
17
|
- [`issignaling`](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3096.pdf#subsubsection.7.12.3.8)
|
|
18
|
+
- [`issubnormal`](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3096.pdf#subsubsection.7.12.3.9)
|
|
18
19
|
- [`iszero`](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3096.pdf#subsubsection.7.12.3.10)
|
|
19
20
|
- [`ldexp`](https://en.cppreference.com/c/numeric/math/ldexp)
|
|
20
21
|
- [`nan`](https://en.cppreference.com/c/numeric/math/nan)
|
|
@@ -46,6 +47,7 @@ These functions accept either a `bigint` or an integer `number`:
|
|
|
46
47
|
// Prints "The greatest common divisor of 24 and 32 is 8."
|
|
47
48
|
console.log(`The greatest common divisor of 24 and 32 is ${gcd(24, 32)}.`);
|
|
48
49
|
```
|
|
50
|
+
- [`has_single_bit`](https://en.cppreference.com/cpp/numeric/has_single_bit)
|
|
49
51
|
- [`lcm`](https://en.cppreference.com/cpp/numeric/lcm)
|
|
50
52
|
- [`popcount`](https://en.cppreference.com/cpp/numeric/popcount)
|
|
51
53
|
|
|
@@ -9,6 +9,7 @@ export { isinf } from "./isinf.ts";
|
|
|
9
9
|
export { isnan } from "./isnan.ts";
|
|
10
10
|
export { isnormal } from "./isnormal.ts";
|
|
11
11
|
export { issignaling } from "./issignaling.ts";
|
|
12
|
+
export { issubnormal } from "./issubnormal.ts";
|
|
12
13
|
export { iszero } from "./iszero.ts";
|
|
13
14
|
export { ldexp } from "./ldexp.ts";
|
|
14
15
|
export * from "./macros.ts";
|
|
@@ -9,6 +9,7 @@ export { isinf } from "./isinf.js";
|
|
|
9
9
|
export { isnan } from "./isnan.js";
|
|
10
10
|
export { isnormal } from "./isnormal.js";
|
|
11
11
|
export { issignaling } from "./issignaling.js";
|
|
12
|
+
export { issubnormal } from "./issubnormal.js";
|
|
12
13
|
export { iszero } from "./iszero.js";
|
|
13
14
|
export { ldexp } from "./ldexp.js";
|
|
14
15
|
export * from "./macros.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/namespace-std/doubles/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAoB,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY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C5B,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function issubnormal(num: number): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issubnormal.js","sourceRoot":"","sources":["../../../src/namespace-std/doubles/issubnormal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAS3C,MAAM,UAAU,WAAW,CAAC,GAAW;IACtC,OAAO,UAAU,CAAC,GAAG,CAAC,KAAK,YAAY,CAAC;AACzC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function has_single_bit(integer: bigint | number): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"has_single_bit.js","sourceRoot":"","sources":["../../../src/namespace-std/integers/has_single_bit.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,cAAc,CAAC,OAAwB;IACtD,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;QAC/D,OAAO,KAAK,CAAC;IACd,CAAC;IAED,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -2,5 +2,6 @@ export { abs } from "./abs.ts";
|
|
|
2
2
|
export * from "./count-left-or-right-bits/index.ts";
|
|
3
3
|
export { div, type div_t, type div_t_bigint, type div_t_number } from "./div/index.ts";
|
|
4
4
|
export { gcd } from "./gcd/gcd.ts";
|
|
5
|
+
export { has_single_bit } from "./has_single_bit.ts";
|
|
5
6
|
export { lcm } from "./lcm/lcm.ts";
|
|
6
7
|
export { popcount } from "./popcount.ts";
|
|
@@ -2,6 +2,7 @@ export { abs } from "./abs.js";
|
|
|
2
2
|
export * from "./count-left-or-right-bits/index.js";
|
|
3
3
|
export { div } from "./div/index.js";
|
|
4
4
|
export { gcd } from "./gcd/gcd.js";
|
|
5
|
+
export { has_single_bit } from "./has_single_bit.js";
|
|
5
6
|
export { lcm } from "./lcm/lcm.js";
|
|
6
7
|
export { popcount } from "./popcount.js";
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/namespace-std/integers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,cAAc,qCAAqC,CAAC;AACpD,OAAO,EAAE,GAAG,EAAoD,MAAM,gBAAgB,CAAC;AACvF,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/namespace-std/integers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,cAAc,qCAAqC,CAAC;AACpD,OAAO,EAAE,GAAG,EAAoD,MAAM,gBAAgB,CAAC;AACvF,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC"}
|