Average Error: 0.2 → 1.3
Time: 1.9m
Precision: 64
Internal Precision: 576
\[\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(b \cdot b\right)\right) - 1\]
\[\begin{array}{l} \mathbf{if}\;b \cdot b \le 0.022713646521774204:\\ \;\;\;\;\left(4 \cdot {b}^{2} + \left({a}^{4} + 2 \cdot \left({b}^{2} \cdot {a}^{2}\right)\right)\right) - 1\\ \mathbf{else}:\\ \;\;\;\;\left({b}^{4} + 4 \cdot \left(b \cdot b\right)\right) - 1\\ \end{array}\]

Error

Bits error versus a

Bits error versus b

Derivation

  1. Split input into 2 regimes
  2. if (* b b) < 0.022713646521774204

    1. Initial program 0.1

      \[\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(b \cdot b\right)\right) - 1\]
    2. Taylor expanded around 0 0.2

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

    if 0.022713646521774204 < (* b b)

    1. Initial program 0.5

      \[\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(b \cdot b\right)\right) - 1\]
    2. Taylor expanded around 0 6.2

      \[\leadsto \left(\color{blue}{{b}^{4}} + 4 \cdot \left(b \cdot b\right)\right) - 1\]
  3. Recombined 2 regimes into one program.

Runtime

Time bar (total: 1.9m)Debug logProfile

herbie shell --seed '#(1071373924 2949776965 1885069702 3247780810 90874544 2263903749)' 
(FPCore (a b)
  :name "Bouland and Aaronson, Equation (26)"
  (- (+ (pow (+ (* a a) (* b b)) 2) (* 4 (* b b))) 1))