UNPKG

quaeratin

Version:

An extended precision floating point library (as per Shewchuk) - precision only limited by overflow / underflow

18 lines (14 loc) 435 B
/** * Returns the sign of the given expansion. * * * see [Shewchuk](https://people.eecs.berkeley.edu/~jrs/papers/robustr.pdf) * * From Shewchuk: "A nonoverlapping expansion is desirable because it is easy to * determine its sign (take the sign of the largest component) ... " * * @param e A floating point expansion with zeroes eliminated. */ function eSign(e: number[]) { return e[e.length-1]; } export { eSign }