Average Error: 0.2 → 1.3
Time: 54.4s
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}\;a \le -0.0004847051399758235 \lor \neg \left(a \le 0.002971013466325373\right):\\ \;\;\;\;\left(\left({a}^{4} + 4 \cdot {b}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {a}^{2}\right)\right) - 1\\ \mathbf{else}:\\ \;\;\;\;\left({b}^{4} + \left(b \cdot b\right) \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 a < -0.0004847051399758235 or 0.002971013466325373 < a

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

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

    if -0.0004847051399758235 < a < 0.002971013466325373

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \le -0.0004847051399758235 \lor \neg \left(a \le 0.002971013466325373\right):\\ \;\;\;\;\left(\left({a}^{4} + 4 \cdot {b}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {a}^{2}\right)\right) - 1\\ \mathbf{else}:\\ \;\;\;\;\left({b}^{4} + \left(b \cdot b\right) \cdot 4\right) - 1\\ \end{array}\]

Runtime

Time bar (total: 54.4s)Debug logProfile

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