@dfinity/candid
Version:
JavaScript and TypeScript library to work with candid interfaces
14 lines • 487 B
TypeScript
/**
* Equivalent to `Math.log2(n)` with support for `BigInt` values
* @param n bigint or integer
* @returns integer
*/
export declare function ilog2(n: bigint | number): number;
/**
* Equivalent to `2 ** n` with support for `BigInt` values
* (necessary for browser preprocessors which replace the `**` operator with `Math.pow`)
* @param n bigint or integer
* @returns bigint
*/
export declare function iexp2(n: bigint | number): bigint;
//# sourceMappingURL=bigint-math.d.ts.map