@chainsafe/eth2.0-utils
Version:
Utilities required across multiple lodestar packages
18 lines (17 loc) • 521 B
TypeScript
/**
* @module util/math
*/
/**
* Return the min number between two big numbers.
*/
export declare function bigIntMin(a: bigint, b: bigint): bigint;
/**
* Return the max number between two big numbers.
*/
export declare function bigIntMax(a: bigint, b: bigint): bigint;
export declare function intDiv(dividend: number, divisor: number): number;
/**
* Calculate the largest integer k such that k**2 <= n.
*/
export declare function intSqrt(n: number): number;
export declare function bigIntSqrt(n: bigint): bigint;