jax
5a74ebf2 - Add experimental precision doubling transform (#3465)

Commit
6 years ago
Add experimental precision doubling transform (#3465) This PR adds an experimental precision doubling transform, following the basic approach outlined in Dekker 1971 ([pdf](http://csclub.uwaterloo.ca/~pbarfuss/dekker1971.pdf)). When this transform is applied, the number of significant bits is approximately doubled compared to the base operation. Simple demo: ```python In [1]: import jax.numpy as jnp In [2]: from jax.experimental.doubledouble import doubledouble In [3]: def f(a, b): ...: return a + b - a ...: In [4]: f(1E20, 1.0) # float64 loses precision Out[4]: 0.0 In [5]: g = doubledouble(f)(1E20, 1.0) Out[5]: DeviceArray(1., dtype=float64) ``` This initial experiment supports basic arithmetic operators and inequalities.
Author
Parents
Loading