double-double
Version:
Pure double-double precision functions *with strict error bounds*.
15 lines (14 loc) • 567 B
TypeScript
/**
* Returns the lowest set bit of the given number's significand (where the lsb
* is bit 0 and the msb is bit 52). If no bit is set (input === 0 or +-inf or
* NaN) returns NaN.
* See https://stackoverflow.com/a/35190288/2010061
*/
declare function getLowestSetBit(a: number): number;
/**
* Returns the highest set bit of the given double. If no bit is set (input
* === 0 or +/-inf or NaN) returns NaN.
* See https://stackoverflow.com/a/35190288/2010061
*/
declare function getHighestSetBit(a: number): number;
export { getLowestSetBit, getHighestSetBit };