cmath-js 4.0.0 → 5.0.1

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 (50) hide show
  1. package/README.md +30 -20
  2. package/dist/index.d.ts +1 -1
  3. package/dist/internal/index.d.ts +2 -2
  4. package/dist/namespace-std/all-numbers/index.d.ts +2 -2
  5. package/dist/namespace-std/all-numbers/iota.js.map +1 -1
  6. package/dist/namespace-std/all-numbers/signbit.js.map +1 -1
  7. package/dist/namespace-std/doubles/copysign.js.map +1 -1
  8. package/dist/namespace-std/doubles/fabs.d.ts +1 -1
  9. package/dist/namespace-std/doubles/fabs.js.map +1 -1
  10. package/dist/namespace-std/doubles/frexp.d.ts +5 -1
  11. package/dist/namespace-std/doubles/frexp.js +14 -11
  12. package/dist/namespace-std/doubles/frexp.js.map +1 -1
  13. package/dist/namespace-std/doubles/index.d.ts +8 -8
  14. package/dist/namespace-std/doubles/index.js.map +1 -1
  15. package/dist/namespace-std/doubles/ldexp.js.map +1 -1
  16. package/dist/namespace-std/index.d.ts +3 -3
  17. package/dist/namespace-std/integers/count-left-or-right-bits/create_countr_zero.js +4 -1
  18. package/dist/namespace-std/integers/count-left-or-right-bits/create_countr_zero.js.map +1 -1
  19. package/dist/namespace-std/integers/count-left-or-right-bits/index.d.ts +4 -4
  20. package/dist/namespace-std/integers/div/div.d.ts +2 -2
  21. package/dist/namespace-std/integers/div/index.d.ts +3 -3
  22. package/dist/namespace-std/integers/gcd/gcd.js.map +1 -0
  23. package/dist/namespace-std/integers/gcd/gcd_bigint.js.map +1 -0
  24. package/dist/namespace-std/integers/gcd/gcd_number.js.map +1 -0
  25. package/dist/namespace-std/integers/index.d.ts +6 -6
  26. package/dist/namespace-std/integers/index.js +2 -2
  27. package/dist/namespace-std/integers/index.js.map +1 -1
  28. package/dist/namespace-std/integers/lcm/lcm.js.map +1 -0
  29. package/dist/namespace-std/integers/{lcm_bigint.js → lcm/lcm_bigint.js} +1 -1
  30. package/dist/namespace-std/integers/lcm/lcm_bigint.js.map +1 -0
  31. package/dist/namespace-std/integers/{lcm_number.js → lcm/lcm_number.js} +1 -1
  32. package/dist/namespace-std/integers/lcm/lcm_number.js.map +1 -0
  33. package/dist/numbers.d.ts +1 -1
  34. package/package.json +14 -18
  35. package/dist/namespace-std/integers/gcd.js.map +0 -1
  36. package/dist/namespace-std/integers/gcd_bigint.js.map +0 -1
  37. package/dist/namespace-std/integers/gcd_number.js.map +0 -1
  38. package/dist/namespace-std/integers/lcm.js.map +0 -1
  39. package/dist/namespace-std/integers/lcm_bigint.js.map +0 -1
  40. package/dist/namespace-std/integers/lcm_number.js.map +0 -1
  41. /package/dist/namespace-std/integers/{gcd.d.ts → gcd/gcd.d.ts} +0 -0
  42. /package/dist/namespace-std/integers/{gcd.js → gcd/gcd.js} +0 -0
  43. /package/dist/namespace-std/integers/{gcd_bigint.d.ts → gcd/gcd_bigint.d.ts} +0 -0
  44. /package/dist/namespace-std/integers/{gcd_bigint.js → gcd/gcd_bigint.js} +0 -0
  45. /package/dist/namespace-std/integers/{gcd_number.d.ts → gcd/gcd_number.d.ts} +0 -0
  46. /package/dist/namespace-std/integers/{gcd_number.js → gcd/gcd_number.js} +0 -0
  47. /package/dist/namespace-std/integers/{lcm.d.ts → lcm/lcm.d.ts} +0 -0
  48. /package/dist/namespace-std/integers/{lcm.js → lcm/lcm.js} +0 -0
  49. /package/dist/namespace-std/integers/{lcm_bigint.d.ts → lcm/lcm_bigint.d.ts} +0 -0
  50. /package/dist/namespace-std/integers/{lcm_number.d.ts → lcm/lcm_number.d.ts} +0 -0
package/README.md CHANGED
@@ -1,7 +1,9 @@
1
1
  # cmath-js
2
- Implementation of parts of C's & C++'s numerics libraries in TypeScript/JavaScript.
2
+
3
+ Implementation of parts of C++'s numerics libraries in TypeScript/JavaScript, including functions C++ inherits from C.
3
4
 
4
5
  ## Floating-point functions
6
+
5
7
  - [`copysign`](https://en.cppreference.com/w/c/numeric/math/copysign)
6
8
  - [`fabs`](https://en.cppreference.com/w/c/numeric/math/fabs)
7
9
  - [`frexp`](https://en.cppreference.com/w/c/numeric/math/frexp)
@@ -12,44 +14,52 @@ Implementation of parts of C's & C++'s numerics libraries in TypeScript/JavaScri
12
14
  - [`pow`](https://en.cppreference.com/w/c/numeric/math/pow)
13
15
 
14
16
  ## Integer functions
17
+
15
18
  These functions accept either a `bigint` or an integer `number`:
19
+
16
20
  - [`abs`](https://en.cppreference.com/w/c/numeric/math/abs)
17
21
  - [`countl_one`](https://en.cppreference.com/w/cpp/numeric/countl_one) as `create_countl_one`, which is used this way:
18
- ```ts
19
- import { create_countl_one } from "cmath-js";
20
- const countl_one_u16 = create_countl_one({ bits: 16 });
21
- const integer = 0xF0_00;
22
- // Prints "1111000000000000 has 4 leading zero bits."
23
- console.log(`${integer.toString(2).padStart(16, "0")} has ${countl_one_u16(integer)} leading one bits.`);
24
- ```
22
+ ```ts
23
+ import { create_countl_one } from "cmath-js";
24
+ const countl_one_u16 = create_countl_one({ bits: 16 });
25
+ const integer = 0xf0_00;
26
+ // Prints "1111000000000000 has 4 leading one bits."
27
+ console.log(
28
+ `${integer.toString(2).padStart(16, "0")} has ${countl_one_u16(integer)} leading one bits.`,
29
+ );
30
+ ```
25
31
  - [`countl_zero`](https://en.cppreference.com/w/cpp/numeric/countl_zero) as `create_countl_zero`
26
32
  - [`countr_one`](https://en.cppreference.com/w/cpp/numeric/countr_one) as `create_countr_one`
27
33
  - [`countr_zero`](https://en.cppreference.com/w/cpp/numeric/countr_zero) as `create_countr_zero`
28
34
  - [`div`](https://en.cppreference.com/w/cpp/numeric/math/div)
29
35
  - [`gcd`](https://en.cppreference.com/w/cpp/numeric/gcd). Example:
30
- ```ts
31
- import { gcd } from "cmath-js";
32
- // Prints "The greatest common divisor of 24 and 32 is 8."
33
- console.log(`The greatest common divisor of 24 and 32 is ${gcd(24, 32)}.`);
34
- ```
36
+ ```ts
37
+ import { gcd } from "cmath-js";
38
+ // Prints "The greatest common divisor of 24 and 32 is 8."
39
+ console.log(`The greatest common divisor of 24 and 32 is ${gcd(24, 32)}.`);
40
+ ```
35
41
  - [`lcm`](https://en.cppreference.com/w/cpp/numeric/lcm)
36
42
  - [`popcount`](https://en.cppreference.com/w/cpp/numeric/popcount)
37
43
 
38
44
  ## Functions for both floats and ints
45
+
39
46
  - [`iota`](https://en.cppreference.com/w/cpp/algorithm/iota)
40
47
  - [`signbit`](https://en.cppreference.com/w/c/numeric/math/signbit)
41
48
 
42
49
  ## Mathematical constants
43
- - Constants in [the `std::numbers` namespace](https://en.cppreference.com/w/cpp/numeric/constants) are available from the `numbers.js` subpath export. Example:
44
- ```ts
45
- import { sqrt3 } from "cmath-js/numbers.js";
46
- console.log(`The square root of 3 is ${sqrt3}.`);
47
- ```
50
+
51
+ - Constants in [the `std::numbers` namespace](https://en.cppreference.com/w/cpp/numeric/constants) are available from the `numbers` subpath export. Example:
52
+ ```ts
53
+ import { sqrt3 } from "cmath-js/numbers";
54
+ console.log(`The square root of 3 is ${sqrt3}.`);
55
+ ```
48
56
 
49
57
  ## Test coverage
58
+
50
59
  The test coverage is a perfect 100% and enforced by the publishing and pull request verification workflows.
51
60
 
52
61
  ## Contributing
53
- Contributions are welcomed! Feel free to make a pull request. Please add your name to `contributors` in `package.json` and run `npm run build-and-verify` before submitting your PR. By making a pull request you agree to license your contribution under [the CC0 license](https://creativecommons.org/publicdomain/zero/1.0/legalcode.en#legal-code-title) unless otherwise specified.
54
62
 
55
- ESLint is used to enforce code quality and consistent formatting (with the help of Prettier). If ESLint complains when you run `npm run build-and-verify`, you can run `npm run lint-fix` to apply automatic fixes and then fix the rest of the errors manually. I recommend configuring your IDE for ESLint and Prettier. If you are using Visual Studio Code, simply installing [Microsoft's ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) and [the official Prettier extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) takes care of that.
63
+ Contributions are welcomed! Feel free to make a pull request. Please add your name to `contributors` in `package.json` and run `npm run build-and-verify` before submitting your PR. By opening a pull request you agree to license your contribution under [the CC0 license](https://creativecommons.org/publicdomain/zero/1.0/legalcode.en#legal-code-title) unless you specify otherwise.
64
+
65
+ ESLint is used to enforce code quality and consistent formatting (with the help of Prettier). If ESLint complains when you run `npm run build-and-verify`, you can run `npm run lint-fix` to apply automatic fixes, and then fix the rest of the errors manually. It is recommend to configure your IDE for ESLint and Prettier. If you are using Visual Studio Code, simply installing [Microsoft's ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) and [the official Prettier extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) takes care of that.
package/dist/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from "./namespace-std/index.js";
1
+ export * from "./namespace-std/index.ts";
@@ -1,2 +1,2 @@
1
- export { floatFromBits } from "./floatFromBits.js";
2
- export { floatOctets } from "./floatOctets.js";
1
+ export { floatFromBits } from "./floatFromBits.ts";
2
+ export { floatOctets } from "./floatOctets.ts";
@@ -1,2 +1,2 @@
1
- export { iota } from "./iota.js";
2
- export { signbit } from "./signbit.js";
1
+ export { iota } from "./iota.ts";
2
+ export { signbit } from "./signbit.ts";
@@ -1 +1 @@
1
- {"version":3,"file":"iota.js","sourceRoot":"","sources":["../../../src/namespace-std/all-numbers/iota.ts"],"names":[],"mappings":"AAKA,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":"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 +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;AAGtD,MAAM,UAAU,OAAO,CAAC,GAAoB;IAC3C,OAAO,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;AAC1C,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;AAWtD,MAAM,UAAU,OAAO,CAAC,GAAoB;IAC3C,OAAO,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;AAC1C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"copysign.js","sourceRoot":"","sources":["../../../src/namespace-std/doubles/copysign.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAOtC,MAAM,UAAU,QAAQ,CAAY,GAAW,EAAa,IAAY;IACvE,OAAO,OAAO,CAAC,GAAG,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;AACpD,CAAC"}
1
+ {"version":3,"file":"copysign.js","sourceRoot":"","sources":["../../../src/namespace-std/doubles/copysign.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAWtC,MAAM,UAAU,QAAQ,CAAC,GAAW,EAAE,IAAY;IACjD,OAAO,OAAO,CAAC,GAAG,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;AACpD,CAAC"}
@@ -1 +1 @@
1
- export declare const fabs: (x: number) => number;
1
+ export declare const fabs: (number: number) => number;
@@ -1 +1 @@
1
- {"version":3,"file":"fabs.js","sourceRoot":"","sources":["../../../src/namespace-std/doubles/fabs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC"}
1
+ {"version":3,"file":"fabs.js","sourceRoot":"","sources":["../../../src/namespace-std/doubles/fabs.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,IAAI,GAA+B,IAAI,CAAC,GAAG,CAAC"}
@@ -1 +1,5 @@
1
- export declare function frexp(num: number): [fraction: number, exponent: number];
1
+ export interface FrexpResult {
2
+ exponent: number;
3
+ fraction: number;
4
+ }
5
+ export declare function frexp(num: number): FrexpResult;
@@ -1,21 +1,24 @@
1
1
  export function frexp(num) {
2
2
  if (num === 0 || !Number.isFinite(num)) {
3
- return [num, 0];
3
+ return { exponent: 0, fraction: num };
4
4
  }
5
5
  const absNum = Math.abs(num);
6
- let exp = Math.max(-1023, Math.floor(Math.log2(absNum)) + 1);
7
- let x = absNum * 2 ** -exp;
8
- while (x < 0.5) {
9
- x *= 2;
10
- --exp;
6
+ let exponent = Math.max(-1023, Math.floor(Math.log2(absNum)) + 1);
7
+ let fraction = absNum * 2 ** -exponent;
8
+ while (fraction < 0.5) {
9
+ fraction *= 2;
10
+ --exponent;
11
11
  }
12
- while (x >= 1) {
13
- x *= 0.5;
14
- ++exp;
12
+ while (fraction >= 1) {
13
+ fraction *= 0.5;
14
+ ++exponent;
15
15
  }
16
16
  if (num < 0) {
17
- x = -x;
17
+ fraction = -fraction;
18
18
  }
19
- return [x, exp];
19
+ return {
20
+ exponent,
21
+ fraction,
22
+ };
20
23
  }
21
24
  //# sourceMappingURL=frexp.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"frexp.js","sourceRoot":"","sources":["../../../src/namespace-std/doubles/frexp.ts"],"names":[],"mappings":"AAQA,MAAM,UAAU,KAAK,CACT,GAAW;IAEtB,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACxC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IACjB,CAAC;IAED,MAAM,MAAM,GAAW,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAErC,IAAI,GAAG,GAAW,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACrE,IAAI,CAAC,GAAW,MAAM,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC;IAInC,OAAO,CAAC,GAAG,GAAG,EAAE,CAAC;QAChB,CAAC,IAAI,CAAC,CAAC;QACP,EAAE,GAAG,CAAC;IACP,CAAC;IAGD,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACf,CAAC,IAAI,GAAG,CAAC;QACT,EAAE,GAAG,CAAC;IACP,CAAC;IAED,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;QACb,CAAC,GAAG,CAAC,CAAC,CAAC;IACR,CAAC;IAED,OAAO,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AACjB,CAAC"}
1
+ {"version":3,"file":"frexp.js","sourceRoot":"","sources":["../../../src/namespace-std/doubles/frexp.ts"],"names":[],"mappings":"AAiCA,MAAM,UAAU,KAAK,CAAC,GAAW;IAChC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACxC,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC;IACvC,CAAC;IAED,MAAM,MAAM,GAAW,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAErC,IAAI,QAAQ,GAAW,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1E,IAAI,QAAQ,GAAW,MAAM,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;IAI/C,OAAO,QAAQ,GAAG,GAAG,EAAE,CAAC;QACvB,QAAQ,IAAI,CAAC,CAAC;QACd,EAAE,QAAQ,CAAC;IACZ,CAAC;IAID,OAAO,QAAQ,IAAI,CAAC,EAAE,CAAC;QACtB,QAAQ,IAAI,GAAG,CAAC;QAChB,EAAE,QAAQ,CAAC;IACZ,CAAC;IAGD,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;QACb,QAAQ,GAAG,CAAC,QAAQ,CAAC;IACtB,CAAC;IAED,OAAO;QACN,QAAQ;QACR,QAAQ;KACR,CAAC;AACH,CAAC"}
@@ -1,8 +1,8 @@
1
- export { copysign } from "./copysign.js";
2
- export { fabs } from "./fabs.js";
3
- export { frexp } from "./frexp.js";
4
- export { hypot } from "./hypot.js";
5
- export { ldexp } from "./ldexp.js";
6
- export { nan } from "./nan.js";
7
- export { nextafter } from "./nextafter.js";
8
- export { pow } from "./pow.js";
1
+ export { copysign } from "./copysign.ts";
2
+ export { fabs } from "./fabs.ts";
3
+ export { frexp, type FrexpResult } from "./frexp.ts";
4
+ export { hypot } from "./hypot.ts";
5
+ export { ldexp } from "./ldexp.ts";
6
+ export { nan } from "./nan.ts";
7
+ export { nextafter } from "./nextafter.ts";
8
+ export { pow } from "./pow.ts";
@@ -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,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC"}
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,KAAK,EAAoB,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ldexp.js","sourceRoot":"","sources":["../../../src/namespace-std/doubles/ldexp.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,KAAK,CAAY,MAAc,EAAU,QAAgB;IACxE,MAAM,0BAA0B,GAAW,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,GAAG,CAAC,CAAC;IAC3E,OAAO,CACN,MAAM,GAAG,0BAA0B,GAAG,0BAA0B,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,CAC/F,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"ldexp.js","sourceRoot":"","sources":["../../../src/namespace-std/doubles/ldexp.ts"],"names":[],"mappings":"AAUA,MAAM,UAAU,KAAK,CAAY,MAAc,EAAU,QAAgB;IAGxE,MAAM,0BAA0B,GAAW,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,GAAG,CAAC,CAAC;IAC3E,OAAO,CACN,MAAM,GAAG,0BAA0B,GAAG,0BAA0B,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,CAC/F,CAAC;AACH,CAAC"}
@@ -1,3 +1,3 @@
1
- export * from "./all-numbers/index.js";
2
- export * from "./doubles/index.js";
3
- export * from "./integers/index.js";
1
+ export * from "./all-numbers/index.ts";
2
+ export * from "./doubles/index.ts";
3
+ export * from "./integers/index.ts";
@@ -3,9 +3,12 @@ export function create_countr_zero({ bits }) {
3
3
  const mask = (2 ** bits - 1) | 0;
4
4
  return (integer) => {
5
5
  const truncated = (typeof integer === "number" ? integer : Number(BigInt.asIntN(32, integer))) & mask;
6
+ if (truncated === 0) {
7
+ return bits;
8
+ }
6
9
  const zeroesAsOnes = truncated ^ (truncated - 1);
7
10
  const trailLength = 31 - Math.clz32(zeroesAsOnes);
8
- return truncated === 0 ? bits : trailLength;
11
+ return trailLength;
9
12
  };
10
13
  }
11
14
  return (integer) => {
@@ -1 +1 @@
1
- {"version":3,"file":"create_countr_zero.js","sourceRoot":"","sources":["../../../../src/namespace-std/integers/count-left-or-right-bits/create_countr_zero.ts"],"names":[],"mappings":"AAuBA,MAAM,UAAU,kBAAkB,CAAC,EAAE,IAAI,EAAoB;IAC5D,IAAI,IAAI,IAAI,EAAE,EAAE,CAAC;QAGhB,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;QACjC,OAAO,CAAC,OAAwB,EAAU,EAAE;YAC3C,MAAM,SAAS,GACd,CAAC,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;YAGrF,MAAM,YAAY,GAAG,SAAS,GAAG,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;YAEjD,MAAM,WAAW,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;YAClD,OAAO,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC;QAC7C,CAAC,CAAC;IACH,CAAC;IAID,OAAO,CAAC,OAAwB,EAAU,EAAE;QAC3C,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;QACxD,IAAI,SAAS,KAAK,EAAE,EAAE,CAAC;YACtB,OAAO,IAAI,CAAC;QACb,CAAC;QAED,MAAM,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QAErC,OAAO,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACpD,CAAC,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"create_countr_zero.js","sourceRoot":"","sources":["../../../../src/namespace-std/integers/count-left-or-right-bits/create_countr_zero.ts"],"names":[],"mappings":"AAuBA,MAAM,UAAU,kBAAkB,CAAC,EAAE,IAAI,EAAoB;IAC5D,IAAI,IAAI,IAAI,EAAE,EAAE,CAAC;QAGhB,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;QACjC,OAAO,CAAC,OAAwB,EAAU,EAAE;YAC3C,MAAM,SAAS,GACd,CAAC,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;YAErF,IAAI,SAAS,KAAK,CAAC,EAAE,CAAC;gBACrB,OAAO,IAAI,CAAC;YACb,CAAC;YAGD,MAAM,YAAY,GAAG,SAAS,GAAG,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;YAEjD,MAAM,WAAW,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;YAClD,OAAO,WAAW,CAAC;QACpB,CAAC,CAAC;IACH,CAAC;IAID,OAAO,CAAC,OAAwB,EAAU,EAAE;QAC3C,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;QACxD,IAAI,SAAS,KAAK,EAAE,EAAE,CAAC;YACtB,OAAO,IAAI,CAAC;QACb,CAAC;QAED,MAAM,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QAErC,OAAO,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACpD,CAAC,CAAC;AACH,CAAC"}
@@ -1,4 +1,4 @@
1
- export { create_countl_one, type countl_one_function } from "./create_countl_one.js";
2
- export { create_countl_zero, type countl_zero_function } from "./create_countl_zero.js";
3
- export { create_countr_one, type countr_one_function } from "./create_countr_one.js";
4
- export { create_countr_zero, type countr_zero_function } from "./create_countr_zero.js";
1
+ export { create_countl_one, type countl_one_function } from "./create_countl_one.ts";
2
+ export { create_countl_zero, type countl_zero_function } from "./create_countl_zero.ts";
3
+ export { create_countr_one, type countr_one_function } from "./create_countr_one.ts";
4
+ export { create_countr_zero, type countr_zero_function } from "./create_countr_zero.ts";
@@ -1,5 +1,5 @@
1
- import { type div_t_bigint } from "./div_bigint.js";
2
- import { type div_t_number } from "./div_number.js";
1
+ import { type div_t_bigint } from "./div_bigint.ts";
2
+ import { type div_t_number } from "./div_number.ts";
3
3
  type AnyInteger = bigint | number;
4
4
  export type div_t<NumType extends AnyInteger = AnyInteger> = (NumType extends bigint ? div_t_bigint : div_t_number) & (NumType extends number ? div_t_number : div_t_bigint);
5
5
  export declare function div(aInteger: bigint, bInteger: bigint): div_t_bigint;
@@ -1,3 +1,3 @@
1
- export { div, type div_t } from "./div.js";
2
- export { type div_t_bigint } from "./div_bigint.js";
3
- export { type div_t_number } from "./div_number.js";
1
+ export { div, type div_t } from "./div.ts";
2
+ export { type div_t_bigint } from "./div_bigint.ts";
3
+ export { type div_t_number } from "./div_number.ts";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gcd.js","sourceRoot":"","sources":["../../../../src/namespace-std/integers/gcd/gcd.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAI7C,MAAM,UAAU,GAAG,CAAC,QAAyB,EAAE,QAAyB;IACvE,OAAO,OAAO,QAAQ,KAAK,QAAQ;QAClC,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE,QAAkB,CAAC;QAC1C,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE,QAAkB,CAAC,CAAC;AAC7C,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gcd_bigint.js","sourceRoot":"","sources":["../../../../src/namespace-std/integers/gcd/gcd_bigint.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,UAAU,CAAC,QAAgB,EAAE,QAAgB;IAC5D,IAAI,CAAC,GAAG,QAAQ,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC7C,IAAI,CAAC,GAAG,QAAQ,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC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AQ,CAAC,EAAE,CAAC;QACxE,OAAO,CAAC,CAAC;IACV,CAAC;IAED,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC3B,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC3B,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;QACd,OAAO,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IAED,IAAI,iBAAiB,GAAG,CAAC,CAAC;IAC1B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;QACtB,CAAC,IAAI,CAAC,CAAC;QACP,iBAAiB,IAAI,CAAC,CAAC;IACxB,CAAC;IACD,IAAI,iBAAiB,GAAG,CAAC,CAAC;IAC1B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;QACtB,CAAC,IAAI,CAAC,CAAC;QACP,iBAAiB,IAAI,CAAC,CAAC;IACxB,CAAC;IAED,OAAO,IAAI,EAAE,CAAC;QACb,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YACX,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACjB,CAAC;QACD,CAAC,IAAI,CAAC,CAAC;QACP,IAAI,CAAC,CAAC,EAAE,CAAC;YACR,OAAO,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,CAAC;QAC5D,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;YACtB,CAAC,IAAI,CAAC,CAAC;QACR,CAAC;IACF,CAAC;AACF,CAAC"}
@@ -1,6 +1,6 @@
1
- export { abs } from "./abs.js";
2
- export * from "./count-left-or-right-bits/index.js";
3
- export { div, type div_t, type div_t_bigint, type div_t_number } from "./div/index.js";
4
- export { gcd } from "./gcd.js";
5
- export { lcm } from "./lcm.js";
6
- export { popcount } from "./popcount.js";
1
+ export { abs } from "./abs.ts";
2
+ export * from "./count-left-or-right-bits/index.ts";
3
+ export { div, type div_t, type div_t_bigint, type div_t_number } from "./div/index.ts";
4
+ export { gcd } from "./gcd/gcd.ts";
5
+ export { lcm } from "./lcm/lcm.ts";
6
+ export { popcount } from "./popcount.ts";
@@ -1,7 +1,7 @@
1
1
  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
- export { gcd } from "./gcd.js";
5
- export { lcm } from "./lcm.js";
4
+ export { gcd } from "./gcd/gcd.js";
5
+ export { lcm } from "./lcm/lcm.js";
6
6
  export { popcount } from "./popcount.js";
7
7
  //# 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,UAAU,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,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,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lcm.js","sourceRoot":"","sources":["../../../../src/namespace-std/integers/lcm/lcm.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAI7C,MAAM,UAAU,GAAG,CAAC,QAAyB,EAAE,QAAyB;IACvE,OAAO,OAAO,QAAQ,KAAK,QAAQ;QAClC,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE,QAAkB,CAAC;QAC1C,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE,QAAkB,CAAC,CAAC;AAC7C,CAAC"}
@@ -1,4 +1,4 @@
1
- import { gcd_bigint } from "./gcd_bigint.js";
1
+ import { gcd_bigint } from "../gcd/gcd_bigint.js";
2
2
  export function lcm_bigint(aInteger, bInteger) {
3
3
  const a = aInteger < 0n ? -aInteger : aInteger;
4
4
  const b = bInteger < 0n ? -bInteger : bInteger;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lcm_bigint.js","sourceRoot":"","sources":["../../../../src/namespace-std/integers/lcm/lcm_bigint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,MAAM,UAAU,UAAU,CAAC,QAAgB,EAAE,QAAgB;IAC5D,MAAM,CAAC,GAAG,QAAQ,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC/C,MAAM,CAAC,GAAG,QAAQ,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC/C,MAAM,OAAO,GAAG,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAEjC,IAAI,OAAO,KAAK,EAAE,EAAE,CAAC;QACpB,OAAO,EAAE,CAAC;IACX,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC;AAC1B,CAAC"}
@@ -1,4 +1,4 @@
1
- import { gcd_number } from "./gcd_number.js";
1
+ import { gcd_number } from "../gcd/gcd_number.js";
2
2
  export function lcm_number(aInteger, bInteger) {
3
3
  if (!Number.isSafeInteger(aInteger) || !Number.isSafeInteger(bInteger)) {
4
4
  return 0;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lcm_number.js","sourceRoot":"","sources":["../../../../src/namespace-std/integers/lcm/lcm_number.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,MAAM,UAAU,UAAU,CAAC,QAAgB,EAAE,QAAgB;IAC5D,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC;QACxE,OAAO,CAAC,CAAC;IACV,CAAC;IAED,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC7B,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAE7B,MAAM,OAAO,GAAG,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAEjC,IAAI,OAAO,KAAK,CAAC,EAAE,CAAC;QACnB,OAAO,CAAC,CAAC;IACV,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC;AAC1B,CAAC"}
package/dist/numbers.d.ts CHANGED
@@ -1 +1 @@
1
- export * from "./namespace-std-numbers/index.js";
1
+ export * from "./namespace-std-numbers/index.ts";
package/package.json CHANGED
@@ -5,13 +5,13 @@
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/oskarlh/cmath-js.git"
7
7
  },
8
- "version": "4.0.0",
8
+ "version": "5.0.1",
9
9
  "exports": {
10
10
  ".": {
11
11
  "default": "./dist/index.js",
12
12
  "types": "./dist/index.d.ts"
13
13
  },
14
- "./numbers.js": {
14
+ "./numbers": {
15
15
  "default": "./dist/numbers.js",
16
16
  "types": "./dist/numbers.d.js"
17
17
  }
@@ -57,29 +57,25 @@
57
57
  "TypeScript"
58
58
  ],
59
59
  "devDependencies": {
60
- "@swc/core": "^1",
61
- "@swc/jest": "^0.2",
62
- "@types/eslint__js": "^8.42.3",
63
- "@types/jest": "^29",
64
- "@types/node": "^22",
65
- "eslint": "^9",
66
- "eslint-config-prettier": "^9",
67
- "eslint-plugin-prettier": "^5",
68
- "jest": "^29",
60
+ "@eslint/js": "^10.0.1",
61
+ "@types/chai": "^5.2.3",
62
+ "@types/node": "^24",
63
+ "chai": "^6.2.2",
64
+ "eslint": "^10.0.2",
65
+ "eslint-config-prettier": "^10.1.8",
69
66
  "prettier": "^3",
70
- "ts-jest": "^29",
71
- "typescript": "~5.6",
72
- "typescript-eslint": "^8.8.0"
67
+ "typescript": "~5.9",
68
+ "typescript-eslint": "^8.53.1"
73
69
  },
74
70
  "scripts": {
75
71
  "build": "tsc --project tsconfig.build.json",
76
72
  "lint": "eslint .",
77
73
  "lint-fix": "eslint . --fix",
78
- "prepack": "npm run build",
79
- "test": "jest",
80
- "test-with-typechecking": "jest --config=jest.config.with-typechecking.js",
74
+ "prepack": "node --run build",
75
+ "test": "node --test --experimental-test-coverage",
76
+ "test-with-typechecking": "node --run typecheck && node --run test",
81
77
  "typecheck": "tsc --noEmit",
82
- "verify": "npm run test-with-typechecking --ci && npm run lint && npm run typecheck"
78
+ "verify": "node --run test -- --test-coverage-branches=100 --test-coverage-functions=100 --test-coverage-lines=100 && node --run lint && node --run typecheck"
83
79
  },
84
80
  "files": [
85
81
  "dist"
@@ -1 +0,0 @@
1
- {"version":3,"file":"gcd.js","sourceRoot":"","sources":["../../../src/namespace-std/integers/gcd.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAI7C,M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ACb,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YACX,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACjB,CAAC;QACD,CAAC,IAAI,CAAC,CAAC;QACP,IAAI,CAAC,CAAC,EAAE,CAAC;YACR,OAAO,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,CAAC;QAC5D,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;YACtB,CAAC,IAAI,CAAC,CAAC;QACR,CAAC;IACF,CAAC;AACF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"lcm.js","sourceRoot":"","sources":["../../../src/namespace-std/integers/lcm.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAI7C,MAAM,UAAU,GAAG,CAAC,QAAyB,EAAE,QAAyB;IACvE,OAAO,OAAO,QAAQ,KAAK,QAAQ;QAClC,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE,QAAkB,CAAC;QAC1C,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE,QAAkB,CAAC,CAAC;AAC7C,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"lcm_bigint.js","sourceRoot":"","sources":["../../../src/namespace-std/integers/lcm_bigint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,UAAU,UAAU,CAAC,QAAgB,EAAE,QAAgB;IAC5D,MAAM,CAAC,GAAG,QAAQ,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC/C,MAAM,CAAC,GAAG,QAAQ,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,QA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