Exact and mid-point rounding cases of power(x,y)

Abstract : Correct rounding of the power function is currently based on an iterative process computing more and more accurate intermediate approximations to x^y until rounding correctly becomes possible. It terminates iff the value of the function is not exactly a floating-point number or an midpoint of two floating-point numbers of the format. For other elementary functions such as exp(x), arguments for which f(x) is such an exact case are, few. They can be filtered out by simple tests. The power function has at least 2^35 such arguments. Simple tests on x and y do not suffice here. This article presents an algorithm for performing such an exact case test. It is combined with an approach that allows for fast rejection of cases that are not exact or mid-point. The correctness is completely proven. It makes no usage of costly operations such as divisions, remainders or square roots as previous approaches do. The algorithm yields a speed-up of 1.8 on average in comparison to another implementation for the same final target format. It reduces also the percentage of average time needed for the exactness test from 38% at each call to 31% under unlikely conditions. The algorithm is given for double precision but adapts and scales perfectly for higher precisions such as double-extended and quad precision. Its complexity is linear in the precision.
Document type :
Preprints, Working Papers, ...
Complete list of metadatas

Cited literature [14 references]  Display  Hide  Download

https://hal-ens-lyon.archives-ouvertes.fr/ensl-00117433
Contributor : Christoph Lauter <>
Submitted on : Friday, December 1, 2006 - 3:51:53 PM
Last modification on : Tuesday, April 24, 2018 - 1:52:47 PM
Long-term archiving on : Tuesday, April 6, 2010 - 8:18:08 PM

File

pow.lip.pdf
Files produced by the author(s)

Identifiers

  • HAL Id : ensl-00117433, version 1

Collections

Citation

Christoph Lauter. Exact and mid-point rounding cases of power(x,y). 2006. ⟨ensl-00117433⟩

Share

Metrics

Record views

307

Files downloads

199