Average Error: 0.2 → 1.8
Time: 1.2m
Precision: 64
Internal Precision: 320
\[\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 \le -118.38282236026332 \lor \neg \left(b \le 2.5969064672601682 \cdot 10^{-17}\right):\\ \;\;\;\;\left({b}^{4} + 4 \cdot \left(b \cdot b\right)\right) - 1\\ \mathbf{else}:\\ \;\;\;\;\left(\left({a}^{4} + \left({a}^{2} \cdot {b}^{2}\right) \cdot 2\right) + {b}^{2} \cdot 4\right) - 1\\ \end{array}\]

Error

Bits error versus a

Bits error versus b

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if b < -118.38282236026332 or 2.5969064672601682e-17 < 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 7.0

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

    if -118.38282236026332 < b < 2.5969064672601682e-17

    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.3

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

    \[\leadsto \color{blue}{\begin{array}{l} \mathbf{if}\;b \le -118.38282236026332 \lor \neg \left(b \le 2.5969064672601682 \cdot 10^{-17}\right):\\ \;\;\;\;\left({b}^{4} + 4 \cdot \left(b \cdot b\right)\right) - 1\\ \mathbf{else}:\\ \;\;\;\;\left(\left({a}^{4} + \left({a}^{2} \cdot {b}^{2}\right) \cdot 2\right) + {b}^{2} \cdot 4\right) - 1\\ \end{array}}\]

Runtime

Time bar (total: 1.2m)Debug logProfile

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