cmath-js 5.11.0 → 5.12.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 +1 -0
- package/dist/namespace-std/integers/bit_width.d.ts +1 -0
- package/dist/namespace-std/integers/bit_width.js +7 -0
- package/dist/namespace-std/integers/bit_width.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
|
@@ -29,6 +29,7 @@ These functions accept either a `bigint` or an integer `number`:
|
|
|
29
29
|
- [`abs`](https://en.cppreference.com/c/numeric/math/abs)
|
|
30
30
|
- [`bit_ceil`](https://en.cppreference.com/cpp/numeric/bit_ceil)
|
|
31
31
|
- [`bit_floor`](https://en.cppreference.com/cpp/numeric/bit_floor)
|
|
32
|
+
- [`bit_width`](https://en.cppreference.com/cpp/numeric/bit_width)
|
|
32
33
|
- [`countl_one`](https://en.cppreference.com/cpp/numeric/countl_one) as `create_countl_one`, which is used this way:
|
|
33
34
|
```ts
|
|
34
35
|
import { create_countl_one } from "cmath-js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function bit_width(integer: bigint | number): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bit_width.js","sourceRoot":"","sources":["../../../src/namespace-std/integers/bit_width.ts"],"names":[],"mappings":"AAQA,MAAM,UAAU,SAAS,CAAC,OAAwB;IACjD,IAAI,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,OAAO,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;QACpF,OAAO,CAAC,CAAC;IACV,CAAC;IAED,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AAC3C,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { abs } from "./abs.ts";
|
|
2
2
|
export { bit_ceil } from "./bit_ceil/bit_ceil.ts";
|
|
3
3
|
export { bit_floor } from "./bit_floor/bit_floor.ts";
|
|
4
|
+
export { bit_width } from "./bit_width.ts";
|
|
4
5
|
export * from "./count-left-or-right-bits/index.ts";
|
|
5
6
|
export { div, type div_t, type div_t_bigint, type div_t_number } from "./div/index.ts";
|
|
6
7
|
export { gcd } from "./gcd/gcd.ts";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { abs } from "./abs.js";
|
|
2
2
|
export { bit_ceil } from "./bit_ceil/bit_ceil.js";
|
|
3
3
|
export { bit_floor } from "./bit_floor/bit_floor.js";
|
|
4
|
+
export { bit_width } from "./bit_width.js";
|
|
4
5
|
export * from "./count-left-or-right-bits/index.js";
|
|
5
6
|
export { div } from "./div/index.js";
|
|
6
7
|
export { gcd } from "./gcd/gcd.js";
|
|
@@ -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,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,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"}
|
|
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,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,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"}
|