quaeratin
Version:
An extended precision floating point library (as per Shewchuk) - precision only limited by overflow / underflow
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 };