Average Error: 0.2 → 0.2
Time: 59.4s
Precision: 64
\[\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(\left(a \cdot a\right) \cdot \left(1 + a\right) + \left(b \cdot b\right) \cdot \left(1 - 3 \cdot a\right)\right)\right) - 1\]
\[\left(\left(\left(1 - 3 \cdot a\right) \cdot \left(b \cdot b\right) + \left(a \cdot a\right) \cdot \left(1 + a\right)\right) \cdot 4 + \left(a \cdot \left(a \cdot \left(a \cdot a\right)\right) + \left(b \cdot b\right) \cdot \left(\left(a \cdot a\right) \cdot 2 + b \cdot b\right)\right)\right) - 1\]

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(\left(a \cdot a\right) \cdot \left(1 + a\right) + \left(b \cdot b\right) \cdot \left(1 - 3 \cdot a\right)\right)\right) - 1\]
  2. Taylor expanded around 0 0.0

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

    \[\leadsto \left(\color{blue}{\left(\left(a \cdot a\right) \cdot \left(a \cdot a\right) + \left(2 \cdot \left(a \cdot a\right) + b \cdot b\right) \cdot \left(b \cdot b\right)\right)} + 4 \cdot \left(\left(a \cdot a\right) \cdot \left(1 + a\right) + \left(b \cdot b\right) \cdot \left(1 - 3 \cdot a\right)\right)\right) - 1\]
  4. Using strategy rm
  5. Applied associate-*l*0.2

    \[\leadsto \left(\left(\color{blue}{a \cdot \left(a \cdot \left(a \cdot a\right)\right)} + \left(2 \cdot \left(a \cdot a\right) + b \cdot b\right) \cdot \left(b \cdot b\right)\right) + 4 \cdot \left(\left(a \cdot a\right) \cdot \left(1 + a\right) + \left(b \cdot b\right) \cdot \left(1 - 3 \cdot a\right)\right)\right) - 1\]
  6. Final simplification0.2

    \[\leadsto \left(\left(\left(1 - 3 \cdot a\right) \cdot \left(b \cdot b\right) + \left(a \cdot a\right) \cdot \left(1 + a\right)\right) \cdot 4 + \left(a \cdot \left(a \cdot \left(a \cdot a\right)\right) + \left(b \cdot b\right) \cdot \left(\left(a \cdot a\right) \cdot 2 + b \cdot b\right)\right)\right) - 1\]

Reproduce

herbie shell --seed 2019100 
(FPCore (a b)
  :name "Bouland and Aaronson, Equation (25)"
  (- (+ (pow (+ (* a a) (* b b)) 2) (* 4 (+ (* (* a a) (+ 1 a)) (* (* b b) (- 1 (* 3 a)))))) 1))