quaeratin
Version:
An extended precision floating point library (as per Shewchuk) - precision only limited by overflow / underflow
16 lines (15 loc) • 625 B
TypeScript
/**
* Returns 0 if a === b, a +tive value if a > b or a negative value if a < b.
*
* * see [Shewchuk](https://people.eecs.berkeley.edu/~jrs/papers/robustr.pdf)
*
* "The easiest way to compare two expansions is to subtract one from the other,
* and test the sign of the result. An expansion’s sign can be easily tested
* because of the nonoverlapping property; simply check the sign of the
* expansion's most significant nonzero component..."
*
* @param a a floating point expansion
* @param b another floating point expansion
*/
declare function eCompare(a: number[], b: number[]): number;
export { eCompare };