Average Error: 0.2 → 0.0
Time: 24.4s
Precision: 64
Internal Precision: 128
\[\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(b \cdot b\right)\right) - 1\]
\[(4 \cdot \left(b \cdot b\right) + -1)_* + \left((2 \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot a\right)\right) + \left({b}^{4}\right))_* + {a}^{4}\right)\]

Error

Bits error versus a

Bits error versus b

Derivation

  1. Initial program 0.2

    \[\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(b \cdot b\right)\right) - 1\]
  2. Simplified0.2

    \[\leadsto \color{blue}{(\left((a \cdot a + \left(b \cdot b\right))_*\right) \cdot \left((a \cdot a + \left(b \cdot b\right))_*\right) + \left((4 \cdot \left(b \cdot b\right) + -1)_*\right))_*}\]
  3. Using strategy rm
  4. Applied fma-udef0.2

    \[\leadsto \color{blue}{(a \cdot a + \left(b \cdot b\right))_* \cdot (a \cdot a + \left(b \cdot b\right))_* + (4 \cdot \left(b \cdot b\right) + -1)_*}\]
  5. Taylor expanded around inf 0.0

    \[\leadsto \color{blue}{\left({b}^{4} + \left({a}^{4} + 2 \cdot \left({a}^{2} \cdot {b}^{2}\right)\right)\right)} + (4 \cdot \left(b \cdot b\right) + -1)_*\]
  6. Simplified0.0

    \[\leadsto \color{blue}{\left((2 \cdot \left(\left(a \cdot b\right) \cdot \left(a \cdot b\right)\right) + \left({b}^{4}\right))_* + {a}^{4}\right)} + (4 \cdot \left(b \cdot b\right) + -1)_*\]
  7. Final simplification0.0

    \[\leadsto (4 \cdot \left(b \cdot b\right) + -1)_* + \left((2 \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot a\right)\right) + \left({b}^{4}\right))_* + {a}^{4}\right)\]

Reproduce

herbie shell --seed 2019093 +o rules:numerics
(FPCore (a b)
  :name "Bouland and Aaronson, Equation (26)"
  (- (+ (pow (+ (* a a) (* b b)) 2) (* 4 (* b b))) 1))