quaeratin
Version:
An extended precision floating point library (as per Shewchuk) - precision only limited by overflow / underflow
17 lines (16 loc) • 665 B
TypeScript
/**
* Returns the result of the given floating point expansion rounded to a double
* floating point number.
*
* The result is within 1 ulps of the actual value, e.g. imagine the worst case
* situation where we add (in 4dot4) 1111.1000 + 0.000011111111... The result
* will be 1111.1000 whereas as the correct result should be 1111.1001 and we
* thus lost 1 ulp of accuracy. It does not matter that the expansion contain
* several floats since none is overlapping.
*
* See Shewchuk https://people.eecs.berkeley.edu/~jrs/papers/robustr.pdf
*
* @param e a floating point expansion
*/
declare function eEstimate(e: number[]): number;
export { eEstimate };