Bouland and Aaronson, Equation (25)

Percentage Accurate: 74.4% → 98.2%
Time: 11.0s
Alternatives: 13
Speedup: TODO×

Specification

?
\[\begin{array}{l} t_0 := a \cdot a\\ t_1 := b \cdot b\\ \left({\left(t_0 + t_1\right)}^{2} + 4 \cdot \left(t_0 \cdot \left(1 + a\right) + t_1 \cdot \left(1 - 3 \cdot a\right)\right)\right) - 1 \end{array} \]

Your Program's Arguments

Results

Enter valid numbers for all inputs

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 13 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Alternative 1?

\[\begin{array}{l} t_0 := {\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(\left(a \cdot a\right) \cdot \left(a + 1\right) + \left(b \cdot b\right) \cdot \left(1 - a \cdot 3\right)\right)\\ \mathbf{if}\;t_0 \leq \infty:\\ \;\;\;\;-1 + t_0\\ \mathbf{else}:\\ \;\;\;\;-1 + \left({a}^{4} + 4 \cdot \left(a \cdot a\right)\right)\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (pow.f64 (+.f64 (*.f64 a a) (*.f64 b b)) 2) (*.f64 4 (+.f64 (*.f64 (*.f64 a a) (+.f64 1 a)) (*.f64 (*.f64 b b) (-.f64 1 (*.f64 3 a)))))) < +inf.0

    1. Initial program 99.8%

      \[\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 \]

    if +inf.0 < (+.f64 (pow.f64 (+.f64 (*.f64 a a) (*.f64 b b)) 2) (*.f64 4 (+.f64 (*.f64 (*.f64 a a) (+.f64 1 a)) (*.f64 (*.f64 b b) (-.f64 1 (*.f64 3 a))))))

    1. Initial program 0.0%

      \[\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 in b around 0 32.0%

      \[\leadsto \color{blue}{\left({a}^{4} + 4 \cdot \left({a}^{2} \cdot \left(1 + a\right)\right)\right)} - 1 \]
    3. Step-by-step derivation
      1. unpow232.0%

        \[\leadsto \left({a}^{4} + 4 \cdot \left(\color{blue}{\left(a \cdot a\right)} \cdot \left(1 + a\right)\right)\right) - 1 \]
    4. Simplified32.0%

      \[\leadsto \color{blue}{\left({a}^{4} + 4 \cdot \left(\left(a \cdot a\right) \cdot \left(1 + a\right)\right)\right)} - 1 \]
    5. Taylor expanded in a around 0 93.7%

      \[\leadsto \left({a}^{4} + 4 \cdot \color{blue}{{a}^{2}}\right) - 1 \]
    6. Step-by-step derivation
      1. unpow293.7%

        \[\leadsto \left({a}^{4} + 4 \cdot \color{blue}{\left(a \cdot a\right)}\right) - 1 \]
    7. Simplified93.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;{\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(\left(a \cdot a\right) \cdot \left(a + 1\right) + \left(b \cdot b\right) \cdot \left(1 - a \cdot 3\right)\right) \leq \infty:\\ \;\;\;\;-1 + \left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(\left(a \cdot a\right) \cdot \left(a + 1\right) + \left(b \cdot b\right) \cdot \left(1 - a \cdot 3\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-1 + \left({a}^{4} + 4 \cdot \left(a \cdot a\right)\right)\\ \end{array} \]

Alternative 2?

\[\left({b}^{4} + {a}^{4}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + a \cdot -12\right), -1\right) \]
Derivation
  1. Initial program 76.4%

    \[\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. Step-by-step derivation
    1. associate--l+76.4%

      \[\leadsto \color{blue}{{\left(a \cdot a + b \cdot b\right)}^{2} + \left(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) - 1\right)} \]
  3. Simplified78.1%

    \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(a, b\right)\right)}^{4} + \mathsf{fma}\left(4, \mathsf{fma}\left(a, \mathsf{fma}\left(a, a, a\right), \left(b \cdot b\right) \cdot \mathsf{fma}\left(a, -3, 1\right)\right), -1\right)} \]
  4. Taylor expanded in b around 0 83.2%

    \[\leadsto \color{blue}{\left(\left(4 \cdot \left(-3 \cdot a + 1\right) + 2 \cdot {a}^{2}\right) \cdot {b}^{2} + \left({b}^{4} + \left({a}^{4} + 4 \cdot \left(a \cdot \left(a + {a}^{2}\right)\right)\right)\right)\right) - 1} \]
  5. Step-by-step derivation
    1. +-commutative83.2%

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

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

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

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

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

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

      \[\leadsto \left({b}^{4} + \left(4 \cdot \color{blue}{\mathsf{fma}\left(a, a, {a}^{3}\right)} + {a}^{4}\right)\right) + \left(\left(4 \cdot \left(-3 \cdot a + 1\right) + 2 \cdot {a}^{2}\right) \cdot {b}^{2} - 1\right) \]
    8. fma-def83.2%

      \[\leadsto \left({b}^{4} + \color{blue}{\mathsf{fma}\left(4, \mathsf{fma}\left(a, a, {a}^{3}\right), {a}^{4}\right)}\right) + \left(\left(4 \cdot \left(-3 \cdot a + 1\right) + 2 \cdot {a}^{2}\right) \cdot {b}^{2} - 1\right) \]
  6. Simplified85.2%

    \[\leadsto \color{blue}{\left({b}^{4} + \mathsf{fma}\left(4, \mathsf{fma}\left(a, a, {a}^{3}\right), {a}^{4}\right)\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right)} \]
  7. Taylor expanded in a around inf 98.3%

    \[\leadsto \left({b}^{4} + \color{blue}{{a}^{4}}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
  8. Final simplification98.3%

    \[\leadsto \left({b}^{4} + {a}^{4}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + a \cdot -12\right), -1\right) \]

Alternative 3?

\[\begin{array}{l} \mathbf{if}\;b \cdot b \leq 2 \cdot 10^{+20}:\\ \;\;\;\;-1 + \left({a}^{4} + 4 \cdot \left(a \cdot a\right)\right)\\ \mathbf{elif}\;b \cdot b \leq 2 \cdot 10^{+153}:\\ \;\;\;\;\left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + 2 \cdot \left(\left(a \cdot a\right) \cdot \left(b \cdot b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;{b}^{4}\\ \end{array} \]
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b b) < 2e20

    1. Initial program 85.8%

      \[\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 in b around 0 84.5%

      \[\leadsto \color{blue}{\left({a}^{4} + 4 \cdot \left({a}^{2} \cdot \left(1 + a\right)\right)\right)} - 1 \]
    3. Step-by-step derivation
      1. unpow284.5%

        \[\leadsto \left({a}^{4} + 4 \cdot \left(\color{blue}{\left(a \cdot a\right)} \cdot \left(1 + a\right)\right)\right) - 1 \]
    4. Simplified84.5%

      \[\leadsto \color{blue}{\left({a}^{4} + 4 \cdot \left(\left(a \cdot a\right) \cdot \left(1 + a\right)\right)\right)} - 1 \]
    5. Taylor expanded in a around 0 95.8%

      \[\leadsto \left({a}^{4} + 4 \cdot \color{blue}{{a}^{2}}\right) - 1 \]
    6. Step-by-step derivation
      1. unpow295.8%

        \[\leadsto \left({a}^{4} + 4 \cdot \color{blue}{\left(a \cdot a\right)}\right) - 1 \]
    7. Simplified95.8%

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

    if 2e20 < (*.f64 b b) < 2e153

    1. Initial program 63.0%

      \[\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. Step-by-step derivation
      1. associate--l+63.0%

        \[\leadsto \color{blue}{{\left(a \cdot a + b \cdot b\right)}^{2} + \left(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) - 1\right)} \]
    3. Simplified63.3%

      \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(a, b\right)\right)}^{4} + \mathsf{fma}\left(4, \mathsf{fma}\left(a, \mathsf{fma}\left(a, a, a\right), \left(b \cdot b\right) \cdot \mathsf{fma}\left(a, -3, 1\right)\right), -1\right)} \]
    4. Taylor expanded in b around 0 76.7%

      \[\leadsto \color{blue}{\left(\left(4 \cdot \left(-3 \cdot a + 1\right) + 2 \cdot {a}^{2}\right) \cdot {b}^{2} + \left({b}^{4} + \left({a}^{4} + 4 \cdot \left(a \cdot \left(a + {a}^{2}\right)\right)\right)\right)\right) - 1} \]
    5. Step-by-step derivation
      1. +-commutative76.7%

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

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

        \[\leadsto \left({b}^{4} + \color{blue}{\left(4 \cdot \left(a \cdot \left(a + {a}^{2}\right)\right) + {a}^{4}\right)}\right) + \left(\left(4 \cdot \left(-3 \cdot a + 1\right) + 2 \cdot {a}^{2}\right) \cdot {b}^{2} - 1\right) \]
      4. distribute-lft-in76.7%

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

        \[\leadsto \left({b}^{4} + \left(4 \cdot \left(a \cdot a + a \cdot \color{blue}{\left(a \cdot a\right)}\right) + {a}^{4}\right)\right) + \left(\left(4 \cdot \left(-3 \cdot a + 1\right) + 2 \cdot {a}^{2}\right) \cdot {b}^{2} - 1\right) \]
      6. cube-mult76.7%

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

        \[\leadsto \left({b}^{4} + \left(4 \cdot \color{blue}{\mathsf{fma}\left(a, a, {a}^{3}\right)} + {a}^{4}\right)\right) + \left(\left(4 \cdot \left(-3 \cdot a + 1\right) + 2 \cdot {a}^{2}\right) \cdot {b}^{2} - 1\right) \]
      8. fma-def76.7%

        \[\leadsto \left({b}^{4} + \color{blue}{\mathsf{fma}\left(4, \mathsf{fma}\left(a, a, {a}^{3}\right), {a}^{4}\right)}\right) + \left(\left(4 \cdot \left(-3 \cdot a + 1\right) + 2 \cdot {a}^{2}\right) \cdot {b}^{2} - 1\right) \]
    6. Simplified76.7%

      \[\leadsto \color{blue}{\left({b}^{4} + \mathsf{fma}\left(4, \mathsf{fma}\left(a, a, {a}^{3}\right), {a}^{4}\right)\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right)} \]
    7. Taylor expanded in a around 0 95.9%

      \[\leadsto \left({b}^{4} + \color{blue}{4 \cdot {a}^{2}}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
    8. Step-by-step derivation
      1. *-commutative95.9%

        \[\leadsto \left({b}^{4} + \color{blue}{{a}^{2} \cdot 4}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
      2. unpow295.9%

        \[\leadsto \left({b}^{4} + \color{blue}{\left(a \cdot a\right)} \cdot 4\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
      3. associate-*l*95.9%

        \[\leadsto \left({b}^{4} + \color{blue}{a \cdot \left(a \cdot 4\right)}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
      4. *-commutative95.9%

        \[\leadsto \left({b}^{4} + a \cdot \color{blue}{\left(4 \cdot a\right)}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
    9. Simplified95.9%

      \[\leadsto \left({b}^{4} + \color{blue}{a \cdot \left(4 \cdot a\right)}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
    10. Taylor expanded in a around inf 95.9%

      \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \color{blue}{2 \cdot \left({a}^{2} \cdot {b}^{2}\right)} \]
    11. Step-by-step derivation
      1. unpow295.9%

        \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + 2 \cdot \left(\color{blue}{\left(a \cdot a\right)} \cdot {b}^{2}\right) \]
      2. unpow295.9%

        \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + 2 \cdot \left(\left(a \cdot a\right) \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
    12. Simplified95.9%

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

    if 2e153 < (*.f64 b b)

    1. Initial program 67.0%

      \[\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. Step-by-step derivation
      1. associate--l+67.0%

        \[\leadsto \color{blue}{{\left(a \cdot a + b \cdot b\right)}^{2} + \left(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) - 1\right)} \]
    3. Simplified71.4%

      \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(a, b\right)\right)}^{4} + \mathsf{fma}\left(4, \mathsf{fma}\left(a, \mathsf{fma}\left(a, a, a\right), \left(b \cdot b\right) \cdot \mathsf{fma}\left(a, -3, 1\right)\right), -1\right)} \]
    4. Taylor expanded in b around inf 100.0%

      \[\leadsto \color{blue}{{b}^{4}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification97.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot b \leq 2 \cdot 10^{+20}:\\ \;\;\;\;-1 + \left({a}^{4} + 4 \cdot \left(a \cdot a\right)\right)\\ \mathbf{elif}\;b \cdot b \leq 2 \cdot 10^{+153}:\\ \;\;\;\;\left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + 2 \cdot \left(\left(a \cdot a\right) \cdot \left(b \cdot b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;{b}^{4}\\ \end{array} \]

Alternative 4?

\[\begin{array}{l} \mathbf{if}\;a \leq -1.12 \cdot 10^{+30}:\\ \;\;\;\;{a}^{4}\\ \mathbf{elif}\;a \leq 2050000000:\\ \;\;\;\;{b}^{4} + \left(-1 + 4 \cdot \left(b \cdot b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-1 + \left({a}^{4} + 4 \cdot \left(\left(a \cdot a\right) \cdot \left(a + 1\right)\right)\right)\\ \end{array} \]
Derivation
  1. Split input into 3 regimes
  2. if a < -1.12e30

    1. Initial program 27.3%

      \[\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. Step-by-step derivation
      1. associate--l+27.3%

        \[\leadsto \color{blue}{{\left(a \cdot a + b \cdot b\right)}^{2} + \left(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) - 1\right)} \]
    3. Simplified35.3%

      \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(a, b\right)\right)}^{4} + \mathsf{fma}\left(4, \mathsf{fma}\left(a, \mathsf{fma}\left(a, a, a\right), \left(b \cdot b\right) \cdot \mathsf{fma}\left(a, -3, 1\right)\right), -1\right)} \]
    4. Taylor expanded in a around inf 100.0%

      \[\leadsto \color{blue}{{a}^{4}} \]

    if -1.12e30 < a < 2.05e9

    1. Initial program 98.5%

      \[\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. Step-by-step derivation
      1. associate--l+98.5%

        \[\leadsto \color{blue}{{\left(a \cdot a + b \cdot b\right)}^{2} + \left(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) - 1\right)} \]
    3. Simplified98.6%

      \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(a, b\right)\right)}^{4} + \mathsf{fma}\left(4, \mathsf{fma}\left(a, \mathsf{fma}\left(a, a, a\right), \left(b \cdot b\right) \cdot \mathsf{fma}\left(a, -3, 1\right)\right), -1\right)} \]
    4. Taylor expanded in a around 0 96.3%

      \[\leadsto \color{blue}{\left(4 \cdot {b}^{2} + {b}^{4}\right) - 1} \]
    5. Step-by-step derivation
      1. +-commutative96.3%

        \[\leadsto \color{blue}{\left({b}^{4} + 4 \cdot {b}^{2}\right)} - 1 \]
      2. associate--l+96.3%

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

        \[\leadsto {b}^{4} + \color{blue}{\mathsf{fma}\left(4, {b}^{2}, -1\right)} \]
      4. unpow296.3%

        \[\leadsto {b}^{4} + \mathsf{fma}\left(4, \color{blue}{b \cdot b}, -1\right) \]
      5. metadata-eval96.3%

        \[\leadsto {b}^{4} + \mathsf{fma}\left(4, b \cdot b, \color{blue}{-1}\right) \]
    6. Simplified96.3%

      \[\leadsto \color{blue}{{b}^{4} + \mathsf{fma}\left(4, b \cdot b, -1\right)} \]
    7. Step-by-step derivation
      1. fma-udef96.3%

        \[\leadsto {b}^{4} + \color{blue}{\left(4 \cdot \left(b \cdot b\right) + -1\right)} \]
    8. Applied egg-rr96.3%

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

    if 2.05e9 < a

    1. Initial program 63.7%

      \[\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 in b around 0 96.8%

      \[\leadsto \color{blue}{\left({a}^{4} + 4 \cdot \left({a}^{2} \cdot \left(1 + a\right)\right)\right)} - 1 \]
    3. Step-by-step derivation
      1. unpow296.8%

        \[\leadsto \left({a}^{4} + 4 \cdot \left(\color{blue}{\left(a \cdot a\right)} \cdot \left(1 + a\right)\right)\right) - 1 \]
    4. Simplified96.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.12 \cdot 10^{+30}:\\ \;\;\;\;{a}^{4}\\ \mathbf{elif}\;a \leq 2050000000:\\ \;\;\;\;{b}^{4} + \left(-1 + 4 \cdot \left(b \cdot b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-1 + \left({a}^{4} + 4 \cdot \left(\left(a \cdot a\right) \cdot \left(a + 1\right)\right)\right)\\ \end{array} \]

Alternative 5?

\[\begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{+22} \lor \neg \left(a \leq 500000000\right):\\ \;\;\;\;{a}^{4}\\ \mathbf{else}:\\ \;\;\;\;{b}^{4} + \left(-1 + 4 \cdot \left(b \cdot b\right)\right)\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if a < -1.4e22 or 5e8 < a

    1. Initial program 46.7%

      \[\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. Step-by-step derivation
      1. associate--l+46.7%

        \[\leadsto \color{blue}{{\left(a \cdot a + b \cdot b\right)}^{2} + \left(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) - 1\right)} \]
    3. Simplified50.5%

      \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(a, b\right)\right)}^{4} + \mathsf{fma}\left(4, \mathsf{fma}\left(a, \mathsf{fma}\left(a, a, a\right), \left(b \cdot b\right) \cdot \mathsf{fma}\left(a, -3, 1\right)\right), -1\right)} \]
    4. Taylor expanded in a around inf 98.2%

      \[\leadsto \color{blue}{{a}^{4}} \]

    if -1.4e22 < a < 5e8

    1. Initial program 98.5%

      \[\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. Step-by-step derivation
      1. associate--l+98.5%

        \[\leadsto \color{blue}{{\left(a \cdot a + b \cdot b\right)}^{2} + \left(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) - 1\right)} \]
    3. Simplified98.6%

      \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(a, b\right)\right)}^{4} + \mathsf{fma}\left(4, \mathsf{fma}\left(a, \mathsf{fma}\left(a, a, a\right), \left(b \cdot b\right) \cdot \mathsf{fma}\left(a, -3, 1\right)\right), -1\right)} \]
    4. Taylor expanded in a around 0 96.3%

      \[\leadsto \color{blue}{\left(4 \cdot {b}^{2} + {b}^{4}\right) - 1} \]
    5. Step-by-step derivation
      1. +-commutative96.3%

        \[\leadsto \color{blue}{\left({b}^{4} + 4 \cdot {b}^{2}\right)} - 1 \]
      2. associate--l+96.3%

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

        \[\leadsto {b}^{4} + \color{blue}{\mathsf{fma}\left(4, {b}^{2}, -1\right)} \]
      4. unpow296.3%

        \[\leadsto {b}^{4} + \mathsf{fma}\left(4, \color{blue}{b \cdot b}, -1\right) \]
      5. metadata-eval96.3%

        \[\leadsto {b}^{4} + \mathsf{fma}\left(4, b \cdot b, \color{blue}{-1}\right) \]
    6. Simplified96.3%

      \[\leadsto \color{blue}{{b}^{4} + \mathsf{fma}\left(4, b \cdot b, -1\right)} \]
    7. Step-by-step derivation
      1. fma-udef96.3%

        \[\leadsto {b}^{4} + \color{blue}{\left(4 \cdot \left(b \cdot b\right) + -1\right)} \]
    8. Applied egg-rr96.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{+22} \lor \neg \left(a \leq 500000000\right):\\ \;\;\;\;{a}^{4}\\ \mathbf{else}:\\ \;\;\;\;{b}^{4} + \left(-1 + 4 \cdot \left(b \cdot b\right)\right)\\ \end{array} \]

Alternative 6?

\[\begin{array}{l} t_0 := -1 + 4 \cdot \left(a \cdot a + b \cdot b\right)\\ \mathbf{if}\;a \leq -1.25 \cdot 10^{+22}:\\ \;\;\;\;{a}^{4}\\ \mathbf{elif}\;a \leq 4.3 \cdot 10^{-255}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-214}:\\ \;\;\;\;{b}^{4}\\ \mathbf{elif}\;a \leq 3900000000000:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;{a}^{4}\\ \end{array} \]
Derivation
  1. Split input into 3 regimes
  2. if a < -1.2499999999999999e22 or 3.9e12 < a

    1. Initial program 46.7%

      \[\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. Step-by-step derivation
      1. associate--l+46.7%

        \[\leadsto \color{blue}{{\left(a \cdot a + b \cdot b\right)}^{2} + \left(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) - 1\right)} \]
    3. Simplified50.5%

      \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(a, b\right)\right)}^{4} + \mathsf{fma}\left(4, \mathsf{fma}\left(a, \mathsf{fma}\left(a, a, a\right), \left(b \cdot b\right) \cdot \mathsf{fma}\left(a, -3, 1\right)\right), -1\right)} \]
    4. Taylor expanded in a around inf 98.2%

      \[\leadsto \color{blue}{{a}^{4}} \]

    if -1.2499999999999999e22 < a < 4.29999999999999989e-255 or 2.4999999999999999e-214 < a < 3.9e12

    1. Initial program 98.4%

      \[\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. Step-by-step derivation
      1. associate--l+98.4%

        \[\leadsto \color{blue}{{\left(a \cdot a + b \cdot b\right)}^{2} + \left(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) - 1\right)} \]
    3. Simplified98.5%

      \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(a, b\right)\right)}^{4} + \mathsf{fma}\left(4, \mathsf{fma}\left(a, \mathsf{fma}\left(a, a, a\right), \left(b \cdot b\right) \cdot \mathsf{fma}\left(a, -3, 1\right)\right), -1\right)} \]
    4. Taylor expanded in b around 0 99.2%

      \[\leadsto \color{blue}{\left(\left(4 \cdot \left(-3 \cdot a + 1\right) + 2 \cdot {a}^{2}\right) \cdot {b}^{2} + \left({b}^{4} + \left({a}^{4} + 4 \cdot \left(a \cdot \left(a + {a}^{2}\right)\right)\right)\right)\right) - 1} \]
    5. Step-by-step derivation
      1. +-commutative99.2%

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

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

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

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

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

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

        \[\leadsto \left({b}^{4} + \left(4 \cdot \color{blue}{\mathsf{fma}\left(a, a, {a}^{3}\right)} + {a}^{4}\right)\right) + \left(\left(4 \cdot \left(-3 \cdot a + 1\right) + 2 \cdot {a}^{2}\right) \cdot {b}^{2} - 1\right) \]
      8. fma-def99.2%

        \[\leadsto \left({b}^{4} + \color{blue}{\mathsf{fma}\left(4, \mathsf{fma}\left(a, a, {a}^{3}\right), {a}^{4}\right)}\right) + \left(\left(4 \cdot \left(-3 \cdot a + 1\right) + 2 \cdot {a}^{2}\right) \cdot {b}^{2} - 1\right) \]
    6. Simplified99.3%

      \[\leadsto \color{blue}{\left({b}^{4} + \mathsf{fma}\left(4, \mathsf{fma}\left(a, a, {a}^{3}\right), {a}^{4}\right)\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right)} \]
    7. Taylor expanded in a around 0 96.2%

      \[\leadsto \left({b}^{4} + \color{blue}{4 \cdot {a}^{2}}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
    8. Step-by-step derivation
      1. *-commutative96.2%

        \[\leadsto \left({b}^{4} + \color{blue}{{a}^{2} \cdot 4}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
      2. unpow296.2%

        \[\leadsto \left({b}^{4} + \color{blue}{\left(a \cdot a\right)} \cdot 4\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
      3. associate-*l*96.2%

        \[\leadsto \left({b}^{4} + \color{blue}{a \cdot \left(a \cdot 4\right)}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
      4. *-commutative96.2%

        \[\leadsto \left({b}^{4} + a \cdot \color{blue}{\left(4 \cdot a\right)}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
    9. Simplified96.2%

      \[\leadsto \left({b}^{4} + \color{blue}{a \cdot \left(4 \cdot a\right)}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
    10. Taylor expanded in a around 0 96.5%

      \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \color{blue}{\left(4 \cdot {b}^{2} - 1\right)} \]
    11. Step-by-step derivation
      1. unpow296.5%

        \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \left(4 \cdot \color{blue}{\left(b \cdot b\right)} - 1\right) \]
      2. associate-*r*96.5%

        \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \left(\color{blue}{\left(4 \cdot b\right) \cdot b} - 1\right) \]
      3. fma-neg96.5%

        \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \color{blue}{\mathsf{fma}\left(4 \cdot b, b, -1\right)} \]
      4. metadata-eval96.5%

        \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \mathsf{fma}\left(4 \cdot b, b, \color{blue}{-1}\right) \]
    12. Simplified96.5%

      \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \color{blue}{\mathsf{fma}\left(4 \cdot b, b, -1\right)} \]
    13. Taylor expanded in b around 0 78.1%

      \[\leadsto \color{blue}{\left(4 \cdot {a}^{2} + 4 \cdot {b}^{2}\right) - 1} \]
    14. Step-by-step derivation
      1. sub-neg78.1%

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

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

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

        \[\leadsto 4 \cdot \left(\color{blue}{a \cdot a} + b \cdot b\right) + \left(-1\right) \]
      5. metadata-eval78.1%

        \[\leadsto 4 \cdot \left(a \cdot a + b \cdot b\right) + \color{blue}{-1} \]
    15. Simplified78.1%

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

    if 4.29999999999999989e-255 < a < 2.4999999999999999e-214

    1. Initial program 99.8%

      \[\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. Step-by-step derivation
      1. associate--l+99.8%

        \[\leadsto \color{blue}{{\left(a \cdot a + b \cdot b\right)}^{2} + \left(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) - 1\right)} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(a, b\right)\right)}^{4} + \mathsf{fma}\left(4, \mathsf{fma}\left(a, \mathsf{fma}\left(a, a, a\right), \left(b \cdot b\right) \cdot \mathsf{fma}\left(a, -3, 1\right)\right), -1\right)} \]
    4. Taylor expanded in b around inf 100.0%

      \[\leadsto \color{blue}{{b}^{4}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification87.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.25 \cdot 10^{+22}:\\ \;\;\;\;{a}^{4}\\ \mathbf{elif}\;a \leq 4.3 \cdot 10^{-255}:\\ \;\;\;\;-1 + 4 \cdot \left(a \cdot a + b \cdot b\right)\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-214}:\\ \;\;\;\;{b}^{4}\\ \mathbf{elif}\;a \leq 3900000000000:\\ \;\;\;\;-1 + 4 \cdot \left(a \cdot a + b \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;{a}^{4}\\ \end{array} \]

Alternative 7?

\[\begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{+28}:\\ \;\;\;\;{a}^{4}\\ \mathbf{elif}\;a \leq 500000000:\\ \;\;\;\;{b}^{4} + -1\\ \mathbf{else}:\\ \;\;\;\;{a}^{4}\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if a < -2.29999999999999984e28 or 5e8 < a

    1. Initial program 46.7%

      \[\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. Step-by-step derivation
      1. associate--l+46.7%

        \[\leadsto \color{blue}{{\left(a \cdot a + b \cdot b\right)}^{2} + \left(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) - 1\right)} \]
    3. Simplified50.5%

      \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(a, b\right)\right)}^{4} + \mathsf{fma}\left(4, \mathsf{fma}\left(a, \mathsf{fma}\left(a, a, a\right), \left(b \cdot b\right) \cdot \mathsf{fma}\left(a, -3, 1\right)\right), -1\right)} \]
    4. Taylor expanded in a around inf 98.2%

      \[\leadsto \color{blue}{{a}^{4}} \]

    if -2.29999999999999984e28 < a < 5e8

    1. Initial program 98.5%

      \[\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. Step-by-step derivation
      1. associate--l+98.5%

        \[\leadsto \color{blue}{{\left(a \cdot a + b \cdot b\right)}^{2} + \left(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) - 1\right)} \]
    3. Simplified98.6%

      \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(a, b\right)\right)}^{4} + \mathsf{fma}\left(4, \mathsf{fma}\left(a, \mathsf{fma}\left(a, a, a\right), \left(b \cdot b\right) \cdot \mathsf{fma}\left(a, -3, 1\right)\right), -1\right)} \]
    4. Taylor expanded in a around 0 96.3%

      \[\leadsto \color{blue}{\left(4 \cdot {b}^{2} + {b}^{4}\right) - 1} \]
    5. Step-by-step derivation
      1. +-commutative96.3%

        \[\leadsto \color{blue}{\left({b}^{4} + 4 \cdot {b}^{2}\right)} - 1 \]
      2. associate--l+96.3%

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

        \[\leadsto {b}^{4} + \color{blue}{\mathsf{fma}\left(4, {b}^{2}, -1\right)} \]
      4. unpow296.3%

        \[\leadsto {b}^{4} + \mathsf{fma}\left(4, \color{blue}{b \cdot b}, -1\right) \]
      5. metadata-eval96.3%

        \[\leadsto {b}^{4} + \mathsf{fma}\left(4, b \cdot b, \color{blue}{-1}\right) \]
    6. Simplified96.3%

      \[\leadsto \color{blue}{{b}^{4} + \mathsf{fma}\left(4, b \cdot b, -1\right)} \]
    7. Taylor expanded in b around 0 94.8%

      \[\leadsto {b}^{4} + \color{blue}{-1} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification96.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{+28}:\\ \;\;\;\;{a}^{4}\\ \mathbf{elif}\;a \leq 500000000:\\ \;\;\;\;{b}^{4} + -1\\ \mathbf{else}:\\ \;\;\;\;{a}^{4}\\ \end{array} \]

Alternative 8?

\[\begin{array}{l} \mathbf{if}\;a \leq -1.25 \cdot 10^{+22}:\\ \;\;\;\;{a}^{4}\\ \mathbf{elif}\;a \leq 59000000000:\\ \;\;\;\;-1 + 4 \cdot \left(a \cdot a + b \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;{a}^{4}\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if a < -1.2499999999999999e22 or 5.9e10 < a

    1. Initial program 46.7%

      \[\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. Step-by-step derivation
      1. associate--l+46.7%

        \[\leadsto \color{blue}{{\left(a \cdot a + b \cdot b\right)}^{2} + \left(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) - 1\right)} \]
    3. Simplified50.5%

      \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(a, b\right)\right)}^{4} + \mathsf{fma}\left(4, \mathsf{fma}\left(a, \mathsf{fma}\left(a, a, a\right), \left(b \cdot b\right) \cdot \mathsf{fma}\left(a, -3, 1\right)\right), -1\right)} \]
    4. Taylor expanded in a around inf 98.2%

      \[\leadsto \color{blue}{{a}^{4}} \]

    if -1.2499999999999999e22 < a < 5.9e10

    1. Initial program 98.5%

      \[\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. Step-by-step derivation
      1. associate--l+98.5%

        \[\leadsto \color{blue}{{\left(a \cdot a + b \cdot b\right)}^{2} + \left(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) - 1\right)} \]
    3. Simplified98.6%

      \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(a, b\right)\right)}^{4} + \mathsf{fma}\left(4, \mathsf{fma}\left(a, \mathsf{fma}\left(a, a, a\right), \left(b \cdot b\right) \cdot \mathsf{fma}\left(a, -3, 1\right)\right), -1\right)} \]
    4. Taylor expanded in b around 0 99.3%

      \[\leadsto \color{blue}{\left(\left(4 \cdot \left(-3 \cdot a + 1\right) + 2 \cdot {a}^{2}\right) \cdot {b}^{2} + \left({b}^{4} + \left({a}^{4} + 4 \cdot \left(a \cdot \left(a + {a}^{2}\right)\right)\right)\right)\right) - 1} \]
    5. Step-by-step derivation
      1. +-commutative99.3%

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

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

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

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

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

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

        \[\leadsto \left({b}^{4} + \left(4 \cdot \color{blue}{\mathsf{fma}\left(a, a, {a}^{3}\right)} + {a}^{4}\right)\right) + \left(\left(4 \cdot \left(-3 \cdot a + 1\right) + 2 \cdot {a}^{2}\right) \cdot {b}^{2} - 1\right) \]
      8. fma-def99.3%

        \[\leadsto \left({b}^{4} + \color{blue}{\mathsf{fma}\left(4, \mathsf{fma}\left(a, a, {a}^{3}\right), {a}^{4}\right)}\right) + \left(\left(4 \cdot \left(-3 \cdot a + 1\right) + 2 \cdot {a}^{2}\right) \cdot {b}^{2} - 1\right) \]
    6. Simplified99.3%

      \[\leadsto \color{blue}{\left({b}^{4} + \mathsf{fma}\left(4, \mathsf{fma}\left(a, a, {a}^{3}\right), {a}^{4}\right)\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right)} \]
    7. Taylor expanded in a around 0 96.4%

      \[\leadsto \left({b}^{4} + \color{blue}{4 \cdot {a}^{2}}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
    8. Step-by-step derivation
      1. *-commutative96.4%

        \[\leadsto \left({b}^{4} + \color{blue}{{a}^{2} \cdot 4}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
      2. unpow296.4%

        \[\leadsto \left({b}^{4} + \color{blue}{\left(a \cdot a\right)} \cdot 4\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
      3. associate-*l*96.4%

        \[\leadsto \left({b}^{4} + \color{blue}{a \cdot \left(a \cdot 4\right)}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
      4. *-commutative96.4%

        \[\leadsto \left({b}^{4} + a \cdot \color{blue}{\left(4 \cdot a\right)}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
    9. Simplified96.4%

      \[\leadsto \left({b}^{4} + \color{blue}{a \cdot \left(4 \cdot a\right)}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
    10. Taylor expanded in a around 0 96.7%

      \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \color{blue}{\left(4 \cdot {b}^{2} - 1\right)} \]
    11. Step-by-step derivation
      1. unpow296.7%

        \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \left(4 \cdot \color{blue}{\left(b \cdot b\right)} - 1\right) \]
      2. associate-*r*96.7%

        \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \left(\color{blue}{\left(4 \cdot b\right) \cdot b} - 1\right) \]
      3. fma-neg96.7%

        \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \color{blue}{\mathsf{fma}\left(4 \cdot b, b, -1\right)} \]
      4. metadata-eval96.7%

        \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \mathsf{fma}\left(4 \cdot b, b, \color{blue}{-1}\right) \]
    12. Simplified96.7%

      \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \color{blue}{\mathsf{fma}\left(4 \cdot b, b, -1\right)} \]
    13. Taylor expanded in b around 0 76.1%

      \[\leadsto \color{blue}{\left(4 \cdot {a}^{2} + 4 \cdot {b}^{2}\right) - 1} \]
    14. Step-by-step derivation
      1. sub-neg76.1%

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

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

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

        \[\leadsto 4 \cdot \left(\color{blue}{a \cdot a} + b \cdot b\right) + \left(-1\right) \]
      5. metadata-eval76.1%

        \[\leadsto 4 \cdot \left(a \cdot a + b \cdot b\right) + \color{blue}{-1} \]
    15. Simplified76.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.25 \cdot 10^{+22}:\\ \;\;\;\;{a}^{4}\\ \mathbf{elif}\;a \leq 59000000000:\\ \;\;\;\;-1 + 4 \cdot \left(a \cdot a + b \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;{a}^{4}\\ \end{array} \]

Alternative 9?

\[\begin{array}{l} \mathbf{if}\;b \cdot b \leq 4.5 \cdot 10^{-22}:\\ \;\;\;\;-1\\ \mathbf{elif}\;b \cdot b \leq 5 \cdot 10^{+275}:\\ \;\;\;\;4 \cdot \left(a \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;4 \cdot \left(b \cdot b\right)\\ \end{array} \]
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b b) < 4.49999999999999987e-22

    1. Initial program 87.5%

      \[\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 in a around 0 51.2%

      \[\leadsto \color{blue}{\left(-12 \cdot \left(a \cdot {b}^{2}\right) + \left({b}^{4} + 4 \cdot {b}^{2}\right)\right)} - 1 \]
    3. Step-by-step derivation
      1. +-commutative51.2%

        \[\leadsto \color{blue}{\left(\left({b}^{4} + 4 \cdot {b}^{2}\right) + -12 \cdot \left(a \cdot {b}^{2}\right)\right)} - 1 \]
      2. associate-+l+51.2%

        \[\leadsto \color{blue}{\left({b}^{4} + \left(4 \cdot {b}^{2} + -12 \cdot \left(a \cdot {b}^{2}\right)\right)\right)} - 1 \]
      3. associate-*r*51.2%

        \[\leadsto \left({b}^{4} + \left(4 \cdot {b}^{2} + \color{blue}{\left(-12 \cdot a\right) \cdot {b}^{2}}\right)\right) - 1 \]
      4. distribute-rgt-out51.2%

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

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

      \[\leadsto \color{blue}{\left({b}^{4} + \left(b \cdot b\right) \cdot \left(4 + -12 \cdot a\right)\right)} - 1 \]
    5. Taylor expanded in b around 0 51.2%

      \[\leadsto \color{blue}{-1} \]

    if 4.49999999999999987e-22 < (*.f64 b b) < 5.0000000000000003e275

    1. Initial program 65.5%

      \[\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. Step-by-step derivation
      1. associate--l+65.4%

        \[\leadsto \color{blue}{{\left(a \cdot a + b \cdot b\right)}^{2} + \left(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) - 1\right)} \]
    3. Simplified68.5%

      \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(a, b\right)\right)}^{4} + \mathsf{fma}\left(4, \mathsf{fma}\left(a, \mathsf{fma}\left(a, a, a\right), \left(b \cdot b\right) \cdot \mathsf{fma}\left(a, -3, 1\right)\right), -1\right)} \]
    4. Taylor expanded in b around 0 79.9%

      \[\leadsto \color{blue}{\left(\left(4 \cdot \left(-3 \cdot a + 1\right) + 2 \cdot {a}^{2}\right) \cdot {b}^{2} + \left({b}^{4} + \left({a}^{4} + 4 \cdot \left(a \cdot \left(a + {a}^{2}\right)\right)\right)\right)\right) - 1} \]
    5. Step-by-step derivation
      1. +-commutative79.9%

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

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

        \[\leadsto \left({b}^{4} + \color{blue}{\left(4 \cdot \left(a \cdot \left(a + {a}^{2}\right)\right) + {a}^{4}\right)}\right) + \left(\left(4 \cdot \left(-3 \cdot a + 1\right) + 2 \cdot {a}^{2}\right) \cdot {b}^{2} - 1\right) \]
      4. distribute-lft-in79.9%

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

        \[\leadsto \left({b}^{4} + \left(4 \cdot \left(a \cdot a + a \cdot \color{blue}{\left(a \cdot a\right)}\right) + {a}^{4}\right)\right) + \left(\left(4 \cdot \left(-3 \cdot a + 1\right) + 2 \cdot {a}^{2}\right) \cdot {b}^{2} - 1\right) \]
      6. cube-mult79.9%

        \[\leadsto \left({b}^{4} + \left(4 \cdot \left(a \cdot a + \color{blue}{{a}^{3}}\right) + {a}^{4}\right)\right) + \left(\left(4 \cdot \left(-3 \cdot a + 1\right) + 2 \cdot {a}^{2}\right) \cdot {b}^{2} - 1\right) \]
      7. fma-udef79.9%

        \[\leadsto \left({b}^{4} + \left(4 \cdot \color{blue}{\mathsf{fma}\left(a, a, {a}^{3}\right)} + {a}^{4}\right)\right) + \left(\left(4 \cdot \left(-3 \cdot a + 1\right) + 2 \cdot {a}^{2}\right) \cdot {b}^{2} - 1\right) \]
      8. fma-def79.9%

        \[\leadsto \left({b}^{4} + \color{blue}{\mathsf{fma}\left(4, \mathsf{fma}\left(a, a, {a}^{3}\right), {a}^{4}\right)}\right) + \left(\left(4 \cdot \left(-3 \cdot a + 1\right) + 2 \cdot {a}^{2}\right) \cdot {b}^{2} - 1\right) \]
    6. Simplified80.0%

      \[\leadsto \color{blue}{\left({b}^{4} + \mathsf{fma}\left(4, \mathsf{fma}\left(a, a, {a}^{3}\right), {a}^{4}\right)\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right)} \]
    7. Taylor expanded in a around 0 90.1%

      \[\leadsto \left({b}^{4} + \color{blue}{4 \cdot {a}^{2}}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
    8. Step-by-step derivation
      1. *-commutative90.1%

        \[\leadsto \left({b}^{4} + \color{blue}{{a}^{2} \cdot 4}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
      2. unpow290.1%

        \[\leadsto \left({b}^{4} + \color{blue}{\left(a \cdot a\right)} \cdot 4\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
      3. associate-*l*90.1%

        \[\leadsto \left({b}^{4} + \color{blue}{a \cdot \left(a \cdot 4\right)}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
      4. *-commutative90.1%

        \[\leadsto \left({b}^{4} + a \cdot \color{blue}{\left(4 \cdot a\right)}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
    9. Simplified90.1%

      \[\leadsto \left({b}^{4} + \color{blue}{a \cdot \left(4 \cdot a\right)}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
    10. Taylor expanded in a around 0 86.7%

      \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \color{blue}{\left(4 \cdot {b}^{2} - 1\right)} \]
    11. Step-by-step derivation
      1. unpow286.7%

        \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \left(4 \cdot \color{blue}{\left(b \cdot b\right)} - 1\right) \]
      2. associate-*r*86.7%

        \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \left(\color{blue}{\left(4 \cdot b\right) \cdot b} - 1\right) \]
      3. fma-neg86.8%

        \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \color{blue}{\mathsf{fma}\left(4 \cdot b, b, -1\right)} \]
      4. metadata-eval86.8%

        \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \mathsf{fma}\left(4 \cdot b, b, \color{blue}{-1}\right) \]
    12. Simplified86.8%

      \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \color{blue}{\mathsf{fma}\left(4 \cdot b, b, -1\right)} \]
    13. Taylor expanded in a around inf 34.0%

      \[\leadsto \color{blue}{4 \cdot {a}^{2}} \]
    14. Step-by-step derivation
      1. unpow234.0%

        \[\leadsto 4 \cdot \color{blue}{\left(a \cdot a\right)} \]
    15. Simplified34.0%

      \[\leadsto \color{blue}{4 \cdot \left(a \cdot a\right)} \]

    if 5.0000000000000003e275 < (*.f64 b b)

    1. Initial program 67.7%

      \[\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. Step-by-step derivation
      1. associate--l+67.7%

        \[\leadsto \color{blue}{{\left(a \cdot a + b \cdot b\right)}^{2} + \left(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) - 1\right)} \]
    3. Simplified70.8%

      \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(a, b\right)\right)}^{4} + \mathsf{fma}\left(4, \mathsf{fma}\left(a, \mathsf{fma}\left(a, a, a\right), \left(b \cdot b\right) \cdot \mathsf{fma}\left(a, -3, 1\right)\right), -1\right)} \]
    4. Taylor expanded in a around 0 100.0%

      \[\leadsto \color{blue}{\left(4 \cdot {b}^{2} + {b}^{4}\right) - 1} \]
    5. Step-by-step derivation
      1. +-commutative100.0%

        \[\leadsto \color{blue}{\left({b}^{4} + 4 \cdot {b}^{2}\right)} - 1 \]
      2. associate--l+100.0%

        \[\leadsto \color{blue}{{b}^{4} + \left(4 \cdot {b}^{2} - 1\right)} \]
      3. fma-neg100.0%

        \[\leadsto {b}^{4} + \color{blue}{\mathsf{fma}\left(4, {b}^{2}, -1\right)} \]
      4. unpow2100.0%

        \[\leadsto {b}^{4} + \mathsf{fma}\left(4, \color{blue}{b \cdot b}, -1\right) \]
      5. metadata-eval100.0%

        \[\leadsto {b}^{4} + \mathsf{fma}\left(4, b \cdot b, \color{blue}{-1}\right) \]
    6. Simplified100.0%

      \[\leadsto \color{blue}{{b}^{4} + \mathsf{fma}\left(4, b \cdot b, -1\right)} \]
    7. Taylor expanded in b around inf 100.0%

      \[\leadsto {b}^{4} + \color{blue}{4 \cdot {b}^{2}} \]
    8. Step-by-step derivation
      1. unpow2100.0%

        \[\leadsto {b}^{4} + 4 \cdot \color{blue}{\left(b \cdot b\right)} \]
    9. Simplified100.0%

      \[\leadsto {b}^{4} + \color{blue}{4 \cdot \left(b \cdot b\right)} \]
    10. Taylor expanded in b around 0 98.6%

      \[\leadsto \color{blue}{4 \cdot {b}^{2}} \]
    11. Step-by-step derivation
      1. unpow298.6%

        \[\leadsto 4 \cdot \color{blue}{\left(b \cdot b\right)} \]
    12. Simplified98.6%

      \[\leadsto \color{blue}{4 \cdot \left(b \cdot b\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification58.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot b \leq 4.5 \cdot 10^{-22}:\\ \;\;\;\;-1\\ \mathbf{elif}\;b \cdot b \leq 5 \cdot 10^{+275}:\\ \;\;\;\;4 \cdot \left(a \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;4 \cdot \left(b \cdot b\right)\\ \end{array} \]

Alternative 10?

\[\begin{array}{l} \mathbf{if}\;b \cdot b \leq 1.8 \cdot 10^{+275}:\\ \;\;\;\;-1 + 4 \cdot \left(a \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;4 \cdot \left(b \cdot b\right)\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b b) < 1.7999999999999999e275

    1. Initial program 79.4%

      \[\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 in b around 0 67.8%

      \[\leadsto \color{blue}{\left({a}^{4} + 4 \cdot \left({a}^{2} \cdot \left(1 + a\right)\right)\right)} - 1 \]
    3. Step-by-step derivation
      1. unpow267.8%

        \[\leadsto \left({a}^{4} + 4 \cdot \left(\color{blue}{\left(a \cdot a\right)} \cdot \left(1 + a\right)\right)\right) - 1 \]
    4. Simplified67.8%

      \[\leadsto \color{blue}{\left({a}^{4} + 4 \cdot \left(\left(a \cdot a\right) \cdot \left(1 + a\right)\right)\right)} - 1 \]
    5. Taylor expanded in a around 0 81.5%

      \[\leadsto \left({a}^{4} + 4 \cdot \color{blue}{{a}^{2}}\right) - 1 \]
    6. Step-by-step derivation
      1. unpow281.5%

        \[\leadsto \left({a}^{4} + 4 \cdot \color{blue}{\left(a \cdot a\right)}\right) - 1 \]
    7. Simplified81.5%

      \[\leadsto \left({a}^{4} + 4 \cdot \color{blue}{\left(a \cdot a\right)}\right) - 1 \]
    8. Taylor expanded in a around 0 61.8%

      \[\leadsto \color{blue}{4 \cdot {a}^{2}} - 1 \]
    9. Step-by-step derivation
      1. unpow261.8%

        \[\leadsto 4 \cdot \color{blue}{\left(a \cdot a\right)} - 1 \]
    10. Simplified61.8%

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

    if 1.7999999999999999e275 < (*.f64 b b)

    1. Initial program 67.7%

      \[\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. Step-by-step derivation
      1. associate--l+67.7%

        \[\leadsto \color{blue}{{\left(a \cdot a + b \cdot b\right)}^{2} + \left(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) - 1\right)} \]
    3. Simplified70.8%

      \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(a, b\right)\right)}^{4} + \mathsf{fma}\left(4, \mathsf{fma}\left(a, \mathsf{fma}\left(a, a, a\right), \left(b \cdot b\right) \cdot \mathsf{fma}\left(a, -3, 1\right)\right), -1\right)} \]
    4. Taylor expanded in a around 0 100.0%

      \[\leadsto \color{blue}{\left(4 \cdot {b}^{2} + {b}^{4}\right) - 1} \]
    5. Step-by-step derivation
      1. +-commutative100.0%

        \[\leadsto \color{blue}{\left({b}^{4} + 4 \cdot {b}^{2}\right)} - 1 \]
      2. associate--l+100.0%

        \[\leadsto \color{blue}{{b}^{4} + \left(4 \cdot {b}^{2} - 1\right)} \]
      3. fma-neg100.0%

        \[\leadsto {b}^{4} + \color{blue}{\mathsf{fma}\left(4, {b}^{2}, -1\right)} \]
      4. unpow2100.0%

        \[\leadsto {b}^{4} + \mathsf{fma}\left(4, \color{blue}{b \cdot b}, -1\right) \]
      5. metadata-eval100.0%

        \[\leadsto {b}^{4} + \mathsf{fma}\left(4, b \cdot b, \color{blue}{-1}\right) \]
    6. Simplified100.0%

      \[\leadsto \color{blue}{{b}^{4} + \mathsf{fma}\left(4, b \cdot b, -1\right)} \]
    7. Taylor expanded in b around inf 100.0%

      \[\leadsto {b}^{4} + \color{blue}{4 \cdot {b}^{2}} \]
    8. Step-by-step derivation
      1. unpow2100.0%

        \[\leadsto {b}^{4} + 4 \cdot \color{blue}{\left(b \cdot b\right)} \]
    9. Simplified100.0%

      \[\leadsto {b}^{4} + \color{blue}{4 \cdot \left(b \cdot b\right)} \]
    10. Taylor expanded in b around 0 98.6%

      \[\leadsto \color{blue}{4 \cdot {b}^{2}} \]
    11. Step-by-step derivation
      1. unpow298.6%

        \[\leadsto 4 \cdot \color{blue}{\left(b \cdot b\right)} \]
    12. Simplified98.6%

      \[\leadsto \color{blue}{4 \cdot \left(b \cdot b\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification71.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot b \leq 1.8 \cdot 10^{+275}:\\ \;\;\;\;-1 + 4 \cdot \left(a \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;4 \cdot \left(b \cdot b\right)\\ \end{array} \]

Alternative 11?

\[-1 + 4 \cdot \left(a \cdot a + b \cdot b\right) \]
Derivation
  1. Initial program 76.4%

    \[\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. Step-by-step derivation
    1. associate--l+76.4%

      \[\leadsto \color{blue}{{\left(a \cdot a + b \cdot b\right)}^{2} + \left(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) - 1\right)} \]
  3. Simplified78.1%

    \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(a, b\right)\right)}^{4} + \mathsf{fma}\left(4, \mathsf{fma}\left(a, \mathsf{fma}\left(a, a, a\right), \left(b \cdot b\right) \cdot \mathsf{fma}\left(a, -3, 1\right)\right), -1\right)} \]
  4. Taylor expanded in b around 0 83.2%

    \[\leadsto \color{blue}{\left(\left(4 \cdot \left(-3 \cdot a + 1\right) + 2 \cdot {a}^{2}\right) \cdot {b}^{2} + \left({b}^{4} + \left({a}^{4} + 4 \cdot \left(a \cdot \left(a + {a}^{2}\right)\right)\right)\right)\right) - 1} \]
  5. Step-by-step derivation
    1. +-commutative83.2%

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

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

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

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

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

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

      \[\leadsto \left({b}^{4} + \left(4 \cdot \color{blue}{\mathsf{fma}\left(a, a, {a}^{3}\right)} + {a}^{4}\right)\right) + \left(\left(4 \cdot \left(-3 \cdot a + 1\right) + 2 \cdot {a}^{2}\right) \cdot {b}^{2} - 1\right) \]
    8. fma-def83.2%

      \[\leadsto \left({b}^{4} + \color{blue}{\mathsf{fma}\left(4, \mathsf{fma}\left(a, a, {a}^{3}\right), {a}^{4}\right)}\right) + \left(\left(4 \cdot \left(-3 \cdot a + 1\right) + 2 \cdot {a}^{2}\right) \cdot {b}^{2} - 1\right) \]
  6. Simplified85.2%

    \[\leadsto \color{blue}{\left({b}^{4} + \mathsf{fma}\left(4, \mathsf{fma}\left(a, a, {a}^{3}\right), {a}^{4}\right)\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right)} \]
  7. Taylor expanded in a around 0 85.8%

    \[\leadsto \left({b}^{4} + \color{blue}{4 \cdot {a}^{2}}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
  8. Step-by-step derivation
    1. *-commutative85.8%

      \[\leadsto \left({b}^{4} + \color{blue}{{a}^{2} \cdot 4}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
    2. unpow285.8%

      \[\leadsto \left({b}^{4} + \color{blue}{\left(a \cdot a\right)} \cdot 4\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
    3. associate-*l*85.8%

      \[\leadsto \left({b}^{4} + \color{blue}{a \cdot \left(a \cdot 4\right)}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
    4. *-commutative85.8%

      \[\leadsto \left({b}^{4} + a \cdot \color{blue}{\left(4 \cdot a\right)}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
  9. Simplified85.8%

    \[\leadsto \left({b}^{4} + \color{blue}{a \cdot \left(4 \cdot a\right)}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
  10. Taylor expanded in a around 0 85.3%

    \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \color{blue}{\left(4 \cdot {b}^{2} - 1\right)} \]
  11. Step-by-step derivation
    1. unpow285.3%

      \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \left(4 \cdot \color{blue}{\left(b \cdot b\right)} - 1\right) \]
    2. associate-*r*85.3%

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

      \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \color{blue}{\mathsf{fma}\left(4 \cdot b, b, -1\right)} \]
    4. metadata-eval85.3%

      \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \mathsf{fma}\left(4 \cdot b, b, \color{blue}{-1}\right) \]
  12. Simplified85.3%

    \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \color{blue}{\mathsf{fma}\left(4 \cdot b, b, -1\right)} \]
  13. Taylor expanded in b around 0 72.1%

    \[\leadsto \color{blue}{\left(4 \cdot {a}^{2} + 4 \cdot {b}^{2}\right) - 1} \]
  14. Step-by-step derivation
    1. sub-neg72.1%

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

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

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

      \[\leadsto 4 \cdot \left(\color{blue}{a \cdot a} + b \cdot b\right) + \left(-1\right) \]
    5. metadata-eval72.1%

      \[\leadsto 4 \cdot \left(a \cdot a + b \cdot b\right) + \color{blue}{-1} \]
  15. Simplified72.1%

    \[\leadsto \color{blue}{4 \cdot \left(a \cdot a + b \cdot b\right) + -1} \]
  16. Final simplification72.1%

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

Alternative 12?

\[\begin{array}{l} \mathbf{if}\;a \leq -2.45 \lor \neg \left(a \leq 0.41\right):\\ \;\;\;\;4 \cdot \left(a \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;-1\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if a < -2.4500000000000002 or 0.409999999999999976 < a

    1. Initial program 49.9%

      \[\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. Step-by-step derivation
      1. associate--l+49.9%

        \[\leadsto \color{blue}{{\left(a \cdot a + b \cdot b\right)}^{2} + \left(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) - 1\right)} \]
    3. Simplified53.3%

      \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(a, b\right)\right)}^{4} + \mathsf{fma}\left(4, \mathsf{fma}\left(a, \mathsf{fma}\left(a, a, a\right), \left(b \cdot b\right) \cdot \mathsf{fma}\left(a, -3, 1\right)\right), -1\right)} \]
    4. Taylor expanded in b around 0 64.2%

      \[\leadsto \color{blue}{\left(\left(4 \cdot \left(-3 \cdot a + 1\right) + 2 \cdot {a}^{2}\right) \cdot {b}^{2} + \left({b}^{4} + \left({a}^{4} + 4 \cdot \left(a \cdot \left(a + {a}^{2}\right)\right)\right)\right)\right) - 1} \]
    5. Step-by-step derivation
      1. +-commutative64.2%

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

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

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

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

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

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

        \[\leadsto \left({b}^{4} + \left(4 \cdot \color{blue}{\mathsf{fma}\left(a, a, {a}^{3}\right)} + {a}^{4}\right)\right) + \left(\left(4 \cdot \left(-3 \cdot a + 1\right) + 2 \cdot {a}^{2}\right) \cdot {b}^{2} - 1\right) \]
      8. fma-def64.2%

        \[\leadsto \left({b}^{4} + \color{blue}{\mathsf{fma}\left(4, \mathsf{fma}\left(a, a, {a}^{3}\right), {a}^{4}\right)}\right) + \left(\left(4 \cdot \left(-3 \cdot a + 1\right) + 2 \cdot {a}^{2}\right) \cdot {b}^{2} - 1\right) \]
    6. Simplified68.3%

      \[\leadsto \color{blue}{\left({b}^{4} + \mathsf{fma}\left(4, \mathsf{fma}\left(a, a, {a}^{3}\right), {a}^{4}\right)\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right)} \]
    7. Taylor expanded in a around 0 70.9%

      \[\leadsto \left({b}^{4} + \color{blue}{4 \cdot {a}^{2}}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
    8. Step-by-step derivation
      1. *-commutative70.9%

        \[\leadsto \left({b}^{4} + \color{blue}{{a}^{2} \cdot 4}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
      2. unpow270.9%

        \[\leadsto \left({b}^{4} + \color{blue}{\left(a \cdot a\right)} \cdot 4\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
      3. associate-*l*70.9%

        \[\leadsto \left({b}^{4} + \color{blue}{a \cdot \left(a \cdot 4\right)}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
      4. *-commutative70.9%

        \[\leadsto \left({b}^{4} + a \cdot \color{blue}{\left(4 \cdot a\right)}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
    9. Simplified70.9%

      \[\leadsto \left({b}^{4} + \color{blue}{a \cdot \left(4 \cdot a\right)}\right) + \mathsf{fma}\left(b, b \cdot \mathsf{fma}\left(2, a \cdot a, 4 + -12 \cdot a\right), -1\right) \]
    10. Taylor expanded in a around 0 69.9%

      \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \color{blue}{\left(4 \cdot {b}^{2} - 1\right)} \]
    11. Step-by-step derivation
      1. unpow269.9%

        \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \left(4 \cdot \color{blue}{\left(b \cdot b\right)} - 1\right) \]
      2. associate-*r*69.9%

        \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \left(\color{blue}{\left(4 \cdot b\right) \cdot b} - 1\right) \]
      3. fma-neg69.9%

        \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \color{blue}{\mathsf{fma}\left(4 \cdot b, b, -1\right)} \]
      4. metadata-eval69.9%

        \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \mathsf{fma}\left(4 \cdot b, b, \color{blue}{-1}\right) \]
    12. Simplified69.9%

      \[\leadsto \left({b}^{4} + a \cdot \left(4 \cdot a\right)\right) + \color{blue}{\mathsf{fma}\left(4 \cdot b, b, -1\right)} \]
    13. Taylor expanded in a around inf 57.1%

      \[\leadsto \color{blue}{4 \cdot {a}^{2}} \]
    14. Step-by-step derivation
      1. unpow257.1%

        \[\leadsto 4 \cdot \color{blue}{\left(a \cdot a\right)} \]
    15. Simplified57.1%

      \[\leadsto \color{blue}{4 \cdot \left(a \cdot a\right)} \]

    if -2.4500000000000002 < a < 0.409999999999999976

    1. Initial program 99.9%

      \[\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 in a around 0 81.1%

      \[\leadsto \color{blue}{\left(-12 \cdot \left(a \cdot {b}^{2}\right) + \left({b}^{4} + 4 \cdot {b}^{2}\right)\right)} - 1 \]
    3. Step-by-step derivation
      1. +-commutative81.1%

        \[\leadsto \color{blue}{\left(\left({b}^{4} + 4 \cdot {b}^{2}\right) + -12 \cdot \left(a \cdot {b}^{2}\right)\right)} - 1 \]
      2. associate-+l+81.1%

        \[\leadsto \color{blue}{\left({b}^{4} + \left(4 \cdot {b}^{2} + -12 \cdot \left(a \cdot {b}^{2}\right)\right)\right)} - 1 \]
      3. associate-*r*81.1%

        \[\leadsto \left({b}^{4} + \left(4 \cdot {b}^{2} + \color{blue}{\left(-12 \cdot a\right) \cdot {b}^{2}}\right)\right) - 1 \]
      4. distribute-rgt-out98.7%

        \[\leadsto \left({b}^{4} + \color{blue}{{b}^{2} \cdot \left(4 + -12 \cdot a\right)}\right) - 1 \]
      5. unpow298.7%

        \[\leadsto \left({b}^{4} + \color{blue}{\left(b \cdot b\right)} \cdot \left(4 + -12 \cdot a\right)\right) - 1 \]
    4. Simplified98.7%

      \[\leadsto \color{blue}{\left({b}^{4} + \left(b \cdot b\right) \cdot \left(4 + -12 \cdot a\right)\right)} - 1 \]
    5. Taylor expanded in b around 0 47.1%

      \[\leadsto \color{blue}{-1} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification51.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.45 \lor \neg \left(a \leq 0.41\right):\\ \;\;\;\;4 \cdot \left(a \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;-1\\ \end{array} \]

Alternative 13?

\[-1 \]
Derivation
  1. Initial program 76.4%

    \[\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 in a around 0 51.5%

    \[\leadsto \color{blue}{\left(-12 \cdot \left(a \cdot {b}^{2}\right) + \left({b}^{4} + 4 \cdot {b}^{2}\right)\right)} - 1 \]
  3. Step-by-step derivation
    1. +-commutative51.5%

      \[\leadsto \color{blue}{\left(\left({b}^{4} + 4 \cdot {b}^{2}\right) + -12 \cdot \left(a \cdot {b}^{2}\right)\right)} - 1 \]
    2. associate-+l+51.5%

      \[\leadsto \color{blue}{\left({b}^{4} + \left(4 \cdot {b}^{2} + -12 \cdot \left(a \cdot {b}^{2}\right)\right)\right)} - 1 \]
    3. associate-*r*51.5%

      \[\leadsto \left({b}^{4} + \left(4 \cdot {b}^{2} + \color{blue}{\left(-12 \cdot a\right) \cdot {b}^{2}}\right)\right) - 1 \]
    4. distribute-rgt-out60.9%

      \[\leadsto \left({b}^{4} + \color{blue}{{b}^{2} \cdot \left(4 + -12 \cdot a\right)}\right) - 1 \]
    5. unpow260.9%

      \[\leadsto \left({b}^{4} + \color{blue}{\left(b \cdot b\right)} \cdot \left(4 + -12 \cdot a\right)\right) - 1 \]
  4. Simplified60.9%

    \[\leadsto \color{blue}{\left({b}^{4} + \left(b \cdot b\right) \cdot \left(4 + -12 \cdot a\right)\right)} - 1 \]
  5. Taylor expanded in b around 0 25.4%

    \[\leadsto \color{blue}{-1} \]
  6. Final simplification25.4%

    \[\leadsto -1 \]

Reproduce

?
herbie shell --seed 2023166 
(FPCore (a b)
  :name "Bouland and Aaronson, Equation (25)"
  :precision binary64
  (- (+ (pow (+ (* a a) (* b b)) 2.0) (* 4.0 (+ (* (* a a) (+ 1.0 a)) (* (* b b) (- 1.0 (* 3.0 a)))))) 1.0))