Bouland and Aaronson, Equation (25)

Percentage Accurate: 73.6% → 99.9%
Time: 10.2s
Alternatives: 12
Speedup: 8.6×

Specification

?
\[\begin{array}{l} \\ \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 \end{array} \]
(FPCore (a b)
 :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))
double code(double a, double b) {
	return (pow(((a * a) + (b * b)), 2.0) + (4.0 * (((a * a) * (1.0 + a)) + ((b * b) * (1.0 - (3.0 * a)))))) - 1.0;
}
real(8) function code(a, b)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = ((((a * a) + (b * b)) ** 2.0d0) + (4.0d0 * (((a * a) * (1.0d0 + a)) + ((b * b) * (1.0d0 - (3.0d0 * a)))))) - 1.0d0
end function
public static double code(double a, double b) {
	return (Math.pow(((a * a) + (b * b)), 2.0) + (4.0 * (((a * a) * (1.0 + a)) + ((b * b) * (1.0 - (3.0 * a)))))) - 1.0;
}
def code(a, b):
	return (math.pow(((a * a) + (b * b)), 2.0) + (4.0 * (((a * a) * (1.0 + a)) + ((b * b) * (1.0 - (3.0 * a)))))) - 1.0
function code(a, b)
	return Float64(Float64((Float64(Float64(a * a) + Float64(b * b)) ^ 2.0) + Float64(4.0 * Float64(Float64(Float64(a * a) * Float64(1.0 + a)) + Float64(Float64(b * b) * Float64(1.0 - Float64(3.0 * a)))))) - 1.0)
end
function tmp = code(a, b)
	tmp = ((((a * a) + (b * b)) ^ 2.0) + (4.0 * (((a * a) * (1.0 + a)) + ((b * b) * (1.0 - (3.0 * a)))))) - 1.0;
end
code[a_, b_] := N[(N[(N[Power[N[(N[(a * a), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[(4.0 * N[(N[(N[(a * a), $MachinePrecision] * N[(1.0 + a), $MachinePrecision]), $MachinePrecision] + N[(N[(b * b), $MachinePrecision] * N[(1.0 - N[(3.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]
\begin{array}{l}

\\
\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
\end{array}

Sampling outcomes in binary64 precision:

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

Initial Program: 73.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \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 \end{array} \]
(FPCore (a b)
 :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))
double code(double a, double b) {
	return (pow(((a * a) + (b * b)), 2.0) + (4.0 * (((a * a) * (1.0 + a)) + ((b * b) * (1.0 - (3.0 * a)))))) - 1.0;
}
real(8) function code(a, b)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = ((((a * a) + (b * b)) ** 2.0d0) + (4.0d0 * (((a * a) * (1.0d0 + a)) + ((b * b) * (1.0d0 - (3.0d0 * a)))))) - 1.0d0
end function
public static double code(double a, double b) {
	return (Math.pow(((a * a) + (b * b)), 2.0) + (4.0 * (((a * a) * (1.0 + a)) + ((b * b) * (1.0 - (3.0 * a)))))) - 1.0;
}
def code(a, b):
	return (math.pow(((a * a) + (b * b)), 2.0) + (4.0 * (((a * a) * (1.0 + a)) + ((b * b) * (1.0 - (3.0 * a)))))) - 1.0
function code(a, b)
	return Float64(Float64((Float64(Float64(a * a) + Float64(b * b)) ^ 2.0) + Float64(4.0 * Float64(Float64(Float64(a * a) * Float64(1.0 + a)) + Float64(Float64(b * b) * Float64(1.0 - Float64(3.0 * a)))))) - 1.0)
end
function tmp = code(a, b)
	tmp = ((((a * a) + (b * b)) ^ 2.0) + (4.0 * (((a * a) * (1.0 + a)) + ((b * b) * (1.0 - (3.0 * a)))))) - 1.0;
end
code[a_, b_] := N[(N[(N[Power[N[(N[(a * a), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[(4.0 * N[(N[(N[(a * a), $MachinePrecision] * N[(1.0 + a), $MachinePrecision]), $MachinePrecision] + N[(N[(b * b), $MachinePrecision] * N[(1.0 - N[(3.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]
\begin{array}{l}

\\
\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
\end{array}

Alternative 1: 99.9% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\\ \mathbf{if}\;{\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(\left(b \cdot b\right) \cdot \left(1 - a \cdot 3\right) + \left(a \cdot a\right) \cdot \left(a + 1\right)\right) \leq 2 \cdot 10^{+293}:\\ \;\;\;\;\mathsf{fma}\left(4, \mathsf{fma}\left(a, \mathsf{fma}\left(a, a, a\right), b \cdot \left(b \cdot \mathsf{fma}\left(a, -3, 1\right)\right)\right), t_0\right) + -1\\ \mathbf{else}:\\ \;\;\;\;\left(-1 + e^{\mathsf{log1p}\left(t_0\right)}\right) + \left(-1 + \left(b \cdot b\right) \cdot 4\right)\\ \end{array} \end{array} \]
(FPCore (a b)
 :precision binary64
 (let* ((t_0 (pow (hypot a b) 4.0)))
   (if (<=
        (+
         (pow (+ (* a a) (* b b)) 2.0)
         (* 4.0 (+ (* (* b b) (- 1.0 (* a 3.0))) (* (* a a) (+ a 1.0)))))
        2e+293)
     (+ (fma 4.0 (fma a (fma a a a) (* b (* b (fma a -3.0 1.0)))) t_0) -1.0)
     (+ (+ -1.0 (exp (log1p t_0))) (+ -1.0 (* (* b b) 4.0))))))
double code(double a, double b) {
	double t_0 = pow(hypot(a, b), 4.0);
	double tmp;
	if ((pow(((a * a) + (b * b)), 2.0) + (4.0 * (((b * b) * (1.0 - (a * 3.0))) + ((a * a) * (a + 1.0))))) <= 2e+293) {
		tmp = fma(4.0, fma(a, fma(a, a, a), (b * (b * fma(a, -3.0, 1.0)))), t_0) + -1.0;
	} else {
		tmp = (-1.0 + exp(log1p(t_0))) + (-1.0 + ((b * b) * 4.0));
	}
	return tmp;
}
function code(a, b)
	t_0 = hypot(a, b) ^ 4.0
	tmp = 0.0
	if (Float64((Float64(Float64(a * a) + Float64(b * b)) ^ 2.0) + Float64(4.0 * Float64(Float64(Float64(b * b) * Float64(1.0 - Float64(a * 3.0))) + Float64(Float64(a * a) * Float64(a + 1.0))))) <= 2e+293)
		tmp = Float64(fma(4.0, fma(a, fma(a, a, a), Float64(b * Float64(b * fma(a, -3.0, 1.0)))), t_0) + -1.0);
	else
		tmp = Float64(Float64(-1.0 + exp(log1p(t_0))) + Float64(-1.0 + Float64(Float64(b * b) * 4.0)));
	end
	return tmp
end
code[a_, b_] := Block[{t$95$0 = N[Power[N[Sqrt[a ^ 2 + b ^ 2], $MachinePrecision], 4.0], $MachinePrecision]}, If[LessEqual[N[(N[Power[N[(N[(a * a), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[(4.0 * N[(N[(N[(b * b), $MachinePrecision] * N[(1.0 - N[(a * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a * a), $MachinePrecision] * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+293], N[(N[(4.0 * N[(a * N[(a * a + a), $MachinePrecision] + N[(b * N[(b * N[(a * -3.0 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision] + -1.0), $MachinePrecision], N[(N[(-1.0 + N[Exp[N[Log[1 + t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(-1.0 + N[(N[(b * b), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\\
\mathbf{if}\;{\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(\left(b \cdot b\right) \cdot \left(1 - a \cdot 3\right) + \left(a \cdot a\right) \cdot \left(a + 1\right)\right) \leq 2 \cdot 10^{+293}:\\
\;\;\;\;\mathsf{fma}\left(4, \mathsf{fma}\left(a, \mathsf{fma}\left(a, a, a\right), b \cdot \left(b \cdot \mathsf{fma}\left(a, -3, 1\right)\right)\right), t_0\right) + -1\\

\mathbf{else}:\\
\;\;\;\;\left(-1 + e^{\mathsf{log1p}\left(t_0\right)}\right) + \left(-1 + \left(b \cdot b\right) \cdot 4\right)\\


\end{array}
\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)))))) < 1.9999999999999998e293

    1. Initial program 99.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. sub-neg99.7%

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

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

    if 1.9999999999999998e293 < (+.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 52.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+52.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)} \]
      2. fma-def52.7%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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. Simplified58.2%

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

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

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

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

        \[\leadsto {\left(\mathsf{hypot}\left(a, b\right) \cdot \color{blue}{\mathsf{hypot}\left(a, b\right)}\right)}^{2} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      5. pow-prod-down58.2%

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

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

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

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

        \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left({\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\right)} - 1\right)} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
    5. Applied egg-rr58.2%

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

      \[\leadsto \left(e^{\mathsf{log1p}\left({\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\right)} - 1\right) + \left(4 \cdot \color{blue}{{b}^{2}} - 1\right) \]
    7. Step-by-step derivation
      1. unpow2100.0%

        \[\leadsto \left(e^{\mathsf{log1p}\left({\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\right)} - 1\right) + \left(4 \cdot \color{blue}{\left(b \cdot b\right)} - 1\right) \]
    8. Simplified100.0%

      \[\leadsto \left(e^{\mathsf{log1p}\left({\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\right)} - 1\right) + \left(4 \cdot \color{blue}{\left(b \cdot b\right)} - 1\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification100.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;{\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(\left(b \cdot b\right) \cdot \left(1 - a \cdot 3\right) + \left(a \cdot a\right) \cdot \left(a + 1\right)\right) \leq 2 \cdot 10^{+293}:\\ \;\;\;\;\mathsf{fma}\left(4, \mathsf{fma}\left(a, \mathsf{fma}\left(a, a, a\right), b \cdot \left(b \cdot \mathsf{fma}\left(a, -3, 1\right)\right)\right), {\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\right) + -1\\ \mathbf{else}:\\ \;\;\;\;\left(-1 + e^{\mathsf{log1p}\left({\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\right)}\right) + \left(-1 + \left(b \cdot b\right) \cdot 4\right)\\ \end{array} \]

Alternative 2: 99.8% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(\left(b \cdot b\right) \cdot \left(1 - a \cdot 3\right) + \left(a \cdot a\right) \cdot \left(a + 1\right)\right)\\ \mathbf{if}\;t_0 \leq 2 \cdot 10^{+293}:\\ \;\;\;\;t_0 + -1\\ \mathbf{else}:\\ \;\;\;\;\left(-1 + e^{\mathsf{log1p}\left({\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\right)}\right) + \left(-1 + \left(b \cdot b\right) \cdot 4\right)\\ \end{array} \end{array} \]
(FPCore (a b)
 :precision binary64
 (let* ((t_0
         (+
          (pow (+ (* a a) (* b b)) 2.0)
          (* 4.0 (+ (* (* b b) (- 1.0 (* a 3.0))) (* (* a a) (+ a 1.0)))))))
   (if (<= t_0 2e+293)
     (+ t_0 -1.0)
     (+
      (+ -1.0 (exp (log1p (pow (hypot a b) 4.0))))
      (+ -1.0 (* (* b b) 4.0))))))
double code(double a, double b) {
	double t_0 = pow(((a * a) + (b * b)), 2.0) + (4.0 * (((b * b) * (1.0 - (a * 3.0))) + ((a * a) * (a + 1.0))));
	double tmp;
	if (t_0 <= 2e+293) {
		tmp = t_0 + -1.0;
	} else {
		tmp = (-1.0 + exp(log1p(pow(hypot(a, b), 4.0)))) + (-1.0 + ((b * b) * 4.0));
	}
	return tmp;
}
public static double code(double a, double b) {
	double t_0 = Math.pow(((a * a) + (b * b)), 2.0) + (4.0 * (((b * b) * (1.0 - (a * 3.0))) + ((a * a) * (a + 1.0))));
	double tmp;
	if (t_0 <= 2e+293) {
		tmp = t_0 + -1.0;
	} else {
		tmp = (-1.0 + Math.exp(Math.log1p(Math.pow(Math.hypot(a, b), 4.0)))) + (-1.0 + ((b * b) * 4.0));
	}
	return tmp;
}
def code(a, b):
	t_0 = math.pow(((a * a) + (b * b)), 2.0) + (4.0 * (((b * b) * (1.0 - (a * 3.0))) + ((a * a) * (a + 1.0))))
	tmp = 0
	if t_0 <= 2e+293:
		tmp = t_0 + -1.0
	else:
		tmp = (-1.0 + math.exp(math.log1p(math.pow(math.hypot(a, b), 4.0)))) + (-1.0 + ((b * b) * 4.0))
	return tmp
function code(a, b)
	t_0 = Float64((Float64(Float64(a * a) + Float64(b * b)) ^ 2.0) + Float64(4.0 * Float64(Float64(Float64(b * b) * Float64(1.0 - Float64(a * 3.0))) + Float64(Float64(a * a) * Float64(a + 1.0)))))
	tmp = 0.0
	if (t_0 <= 2e+293)
		tmp = Float64(t_0 + -1.0);
	else
		tmp = Float64(Float64(-1.0 + exp(log1p((hypot(a, b) ^ 4.0)))) + Float64(-1.0 + Float64(Float64(b * b) * 4.0)));
	end
	return tmp
end
code[a_, b_] := Block[{t$95$0 = N[(N[Power[N[(N[(a * a), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[(4.0 * N[(N[(N[(b * b), $MachinePrecision] * N[(1.0 - N[(a * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a * a), $MachinePrecision] * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 2e+293], N[(t$95$0 + -1.0), $MachinePrecision], N[(N[(-1.0 + N[Exp[N[Log[1 + N[Power[N[Sqrt[a ^ 2 + b ^ 2], $MachinePrecision], 4.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(-1.0 + N[(N[(b * b), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(\left(b \cdot b\right) \cdot \left(1 - a \cdot 3\right) + \left(a \cdot a\right) \cdot \left(a + 1\right)\right)\\
\mathbf{if}\;t_0 \leq 2 \cdot 10^{+293}:\\
\;\;\;\;t_0 + -1\\

\mathbf{else}:\\
\;\;\;\;\left(-1 + e^{\mathsf{log1p}\left({\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\right)}\right) + \left(-1 + \left(b \cdot b\right) \cdot 4\right)\\


\end{array}
\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)))))) < 1.9999999999999998e293

    1. Initial program 99.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 \]

    if 1.9999999999999998e293 < (+.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 52.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+52.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)} \]
      2. fma-def52.7%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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. Simplified58.2%

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

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

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

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

        \[\leadsto {\left(\mathsf{hypot}\left(a, b\right) \cdot \color{blue}{\mathsf{hypot}\left(a, b\right)}\right)}^{2} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      5. pow-prod-down58.2%

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

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

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

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

        \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left({\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\right)} - 1\right)} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
    5. Applied egg-rr58.2%

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

      \[\leadsto \left(e^{\mathsf{log1p}\left({\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\right)} - 1\right) + \left(4 \cdot \color{blue}{{b}^{2}} - 1\right) \]
    7. Step-by-step derivation
      1. unpow2100.0%

        \[\leadsto \left(e^{\mathsf{log1p}\left({\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\right)} - 1\right) + \left(4 \cdot \color{blue}{\left(b \cdot b\right)} - 1\right) \]
    8. Simplified100.0%

      \[\leadsto \left(e^{\mathsf{log1p}\left({\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\right)} - 1\right) + \left(4 \cdot \color{blue}{\left(b \cdot b\right)} - 1\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;{\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(\left(b \cdot b\right) \cdot \left(1 - a \cdot 3\right) + \left(a \cdot a\right) \cdot \left(a + 1\right)\right) \leq 2 \cdot 10^{+293}:\\ \;\;\;\;\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(\left(b \cdot b\right) \cdot \left(1 - a \cdot 3\right) + \left(a \cdot a\right) \cdot \left(a + 1\right)\right)\right) + -1\\ \mathbf{else}:\\ \;\;\;\;\left(-1 + e^{\mathsf{log1p}\left({\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\right)}\right) + \left(-1 + \left(b \cdot b\right) \cdot 4\right)\\ \end{array} \]

Alternative 3: 98.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(\left(b \cdot b\right) \cdot \left(1 - a \cdot 3\right) + \left(a \cdot a\right) \cdot \left(a + 1\right)\right)\\ \mathbf{if}\;t_0 \leq \infty:\\ \;\;\;\;t_0 + -1\\ \mathbf{else}:\\ \;\;\;\;{a}^{4}\\ \end{array} \end{array} \]
(FPCore (a b)
 :precision binary64
 (let* ((t_0
         (+
          (pow (+ (* a a) (* b b)) 2.0)
          (* 4.0 (+ (* (* b b) (- 1.0 (* a 3.0))) (* (* a a) (+ a 1.0)))))))
   (if (<= t_0 INFINITY) (+ t_0 -1.0) (pow a 4.0))))
double code(double a, double b) {
	double t_0 = pow(((a * a) + (b * b)), 2.0) + (4.0 * (((b * b) * (1.0 - (a * 3.0))) + ((a * a) * (a + 1.0))));
	double tmp;
	if (t_0 <= ((double) INFINITY)) {
		tmp = t_0 + -1.0;
	} else {
		tmp = pow(a, 4.0);
	}
	return tmp;
}
public static double code(double a, double b) {
	double t_0 = Math.pow(((a * a) + (b * b)), 2.0) + (4.0 * (((b * b) * (1.0 - (a * 3.0))) + ((a * a) * (a + 1.0))));
	double tmp;
	if (t_0 <= Double.POSITIVE_INFINITY) {
		tmp = t_0 + -1.0;
	} else {
		tmp = Math.pow(a, 4.0);
	}
	return tmp;
}
def code(a, b):
	t_0 = math.pow(((a * a) + (b * b)), 2.0) + (4.0 * (((b * b) * (1.0 - (a * 3.0))) + ((a * a) * (a + 1.0))))
	tmp = 0
	if t_0 <= math.inf:
		tmp = t_0 + -1.0
	else:
		tmp = math.pow(a, 4.0)
	return tmp
function code(a, b)
	t_0 = Float64((Float64(Float64(a * a) + Float64(b * b)) ^ 2.0) + Float64(4.0 * Float64(Float64(Float64(b * b) * Float64(1.0 - Float64(a * 3.0))) + Float64(Float64(a * a) * Float64(a + 1.0)))))
	tmp = 0.0
	if (t_0 <= Inf)
		tmp = Float64(t_0 + -1.0);
	else
		tmp = a ^ 4.0;
	end
	return tmp
end
function tmp_2 = code(a, b)
	t_0 = (((a * a) + (b * b)) ^ 2.0) + (4.0 * (((b * b) * (1.0 - (a * 3.0))) + ((a * a) * (a + 1.0))));
	tmp = 0.0;
	if (t_0 <= Inf)
		tmp = t_0 + -1.0;
	else
		tmp = a ^ 4.0;
	end
	tmp_2 = tmp;
end
code[a_, b_] := Block[{t$95$0 = N[(N[Power[N[(N[(a * a), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[(4.0 * N[(N[(N[(b * b), $MachinePrecision] * N[(1.0 - N[(a * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a * a), $MachinePrecision] * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, Infinity], N[(t$95$0 + -1.0), $MachinePrecision], N[Power[a, 4.0], $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(\left(b \cdot b\right) \cdot \left(1 - a \cdot 3\right) + \left(a \cdot a\right) \cdot \left(a + 1\right)\right)\\
\mathbf{if}\;t_0 \leq \infty:\\
\;\;\;\;t_0 + -1\\

\mathbf{else}:\\
\;\;\;\;{a}^{4}\\


\end{array}
\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. Step-by-step derivation
      1. associate--l+0.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)} \]
      2. fma-def0.0%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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. Simplified11.6%

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

      \[\leadsto \color{blue}{{a}^{4}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.1%

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

Alternative 4: 94.1% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1800000000 \lor \neg \left(a \leq 8.2 \cdot 10^{+21}\right):\\ \;\;\;\;{a}^{4}\\ \mathbf{else}:\\ \;\;\;\;\left(-1 + \left(b \cdot b\right) \cdot 4\right) + {b}^{4}\\ \end{array} \end{array} \]
(FPCore (a b)
 :precision binary64
 (if (or (<= a -1800000000.0) (not (<= a 8.2e+21)))
   (pow a 4.0)
   (+ (+ -1.0 (* (* b b) 4.0)) (pow b 4.0))))
double code(double a, double b) {
	double tmp;
	if ((a <= -1800000000.0) || !(a <= 8.2e+21)) {
		tmp = pow(a, 4.0);
	} else {
		tmp = (-1.0 + ((b * b) * 4.0)) + pow(b, 4.0);
	}
	return tmp;
}
real(8) function code(a, b)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if ((a <= (-1800000000.0d0)) .or. (.not. (a <= 8.2d+21))) then
        tmp = a ** 4.0d0
    else
        tmp = ((-1.0d0) + ((b * b) * 4.0d0)) + (b ** 4.0d0)
    end if
    code = tmp
end function
public static double code(double a, double b) {
	double tmp;
	if ((a <= -1800000000.0) || !(a <= 8.2e+21)) {
		tmp = Math.pow(a, 4.0);
	} else {
		tmp = (-1.0 + ((b * b) * 4.0)) + Math.pow(b, 4.0);
	}
	return tmp;
}
def code(a, b):
	tmp = 0
	if (a <= -1800000000.0) or not (a <= 8.2e+21):
		tmp = math.pow(a, 4.0)
	else:
		tmp = (-1.0 + ((b * b) * 4.0)) + math.pow(b, 4.0)
	return tmp
function code(a, b)
	tmp = 0.0
	if ((a <= -1800000000.0) || !(a <= 8.2e+21))
		tmp = a ^ 4.0;
	else
		tmp = Float64(Float64(-1.0 + Float64(Float64(b * b) * 4.0)) + (b ^ 4.0));
	end
	return tmp
end
function tmp_2 = code(a, b)
	tmp = 0.0;
	if ((a <= -1800000000.0) || ~((a <= 8.2e+21)))
		tmp = a ^ 4.0;
	else
		tmp = (-1.0 + ((b * b) * 4.0)) + (b ^ 4.0);
	end
	tmp_2 = tmp;
end
code[a_, b_] := If[Or[LessEqual[a, -1800000000.0], N[Not[LessEqual[a, 8.2e+21]], $MachinePrecision]], N[Power[a, 4.0], $MachinePrecision], N[(N[(-1.0 + N[(N[(b * b), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision] + N[Power[b, 4.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1800000000 \lor \neg \left(a \leq 8.2 \cdot 10^{+21}\right):\\
\;\;\;\;{a}^{4}\\

\mathbf{else}:\\
\;\;\;\;\left(-1 + \left(b \cdot b\right) \cdot 4\right) + {b}^{4}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.8e9 or 8.2e21 < a

    1. Initial program 47.6%

      \[\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+47.6%

        \[\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)} \]
      2. fma-def47.6%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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.7%

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

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

    if -1.8e9 < a < 8.2e21

    1. Initial program 99.1%

      \[\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.1%

        \[\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)} \]
      2. fma-def99.1%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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. Simplified99.1%

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

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

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

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

        \[\leadsto {\left(\mathsf{hypot}\left(a, b\right) \cdot \color{blue}{\mathsf{hypot}\left(a, b\right)}\right)}^{2} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      5. pow-prod-down99.1%

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

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

        \[\leadsto {\left(\mathsf{hypot}\left(a, b\right)\right)}^{\color{blue}{4}} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      8. expm1-log1p-u97.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\right)\right)} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      9. expm1-udef97.5%

        \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left({\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\right)} - 1\right)} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
    5. Applied egg-rr97.5%

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

      \[\leadsto \left(e^{\mathsf{log1p}\left({\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\right)} - 1\right) + \left(4 \cdot \color{blue}{{b}^{2}} - 1\right) \]
    7. Step-by-step derivation
      1. unpow297.6%

        \[\leadsto \left(e^{\mathsf{log1p}\left({\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\right)} - 1\right) + \left(4 \cdot \color{blue}{\left(b \cdot b\right)} - 1\right) \]
    8. Simplified97.6%

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

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

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

Alternative 5: 94.0% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1550000000 \lor \neg \left(a \leq 9.2 \cdot 10^{+26}\right):\\ \;\;\;\;{a}^{4}\\ \mathbf{else}:\\ \;\;\;\;-1 + \left(b \cdot b\right) \cdot \left(b \cdot b + 4\right)\\ \end{array} \end{array} \]
(FPCore (a b)
 :precision binary64
 (if (or (<= a -1550000000.0) (not (<= a 9.2e+26)))
   (pow a 4.0)
   (+ -1.0 (* (* b b) (+ (* b b) 4.0)))))
double code(double a, double b) {
	double tmp;
	if ((a <= -1550000000.0) || !(a <= 9.2e+26)) {
		tmp = pow(a, 4.0);
	} else {
		tmp = -1.0 + ((b * b) * ((b * b) + 4.0));
	}
	return tmp;
}
real(8) function code(a, b)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if ((a <= (-1550000000.0d0)) .or. (.not. (a <= 9.2d+26))) then
        tmp = a ** 4.0d0
    else
        tmp = (-1.0d0) + ((b * b) * ((b * b) + 4.0d0))
    end if
    code = tmp
end function
public static double code(double a, double b) {
	double tmp;
	if ((a <= -1550000000.0) || !(a <= 9.2e+26)) {
		tmp = Math.pow(a, 4.0);
	} else {
		tmp = -1.0 + ((b * b) * ((b * b) + 4.0));
	}
	return tmp;
}
def code(a, b):
	tmp = 0
	if (a <= -1550000000.0) or not (a <= 9.2e+26):
		tmp = math.pow(a, 4.0)
	else:
		tmp = -1.0 + ((b * b) * ((b * b) + 4.0))
	return tmp
function code(a, b)
	tmp = 0.0
	if ((a <= -1550000000.0) || !(a <= 9.2e+26))
		tmp = a ^ 4.0;
	else
		tmp = Float64(-1.0 + Float64(Float64(b * b) * Float64(Float64(b * b) + 4.0)));
	end
	return tmp
end
function tmp_2 = code(a, b)
	tmp = 0.0;
	if ((a <= -1550000000.0) || ~((a <= 9.2e+26)))
		tmp = a ^ 4.0;
	else
		tmp = -1.0 + ((b * b) * ((b * b) + 4.0));
	end
	tmp_2 = tmp;
end
code[a_, b_] := If[Or[LessEqual[a, -1550000000.0], N[Not[LessEqual[a, 9.2e+26]], $MachinePrecision]], N[Power[a, 4.0], $MachinePrecision], N[(-1.0 + N[(N[(b * b), $MachinePrecision] * N[(N[(b * b), $MachinePrecision] + 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1550000000 \lor \neg \left(a \leq 9.2 \cdot 10^{+26}\right):\\
\;\;\;\;{a}^{4}\\

\mathbf{else}:\\
\;\;\;\;-1 + \left(b \cdot b\right) \cdot \left(b \cdot b + 4\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.55e9 or 9.2000000000000002e26 < a

    1. Initial program 47.6%

      \[\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+47.6%

        \[\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)} \]
      2. fma-def47.6%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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.7%

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

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

    if -1.55e9 < a < 9.2000000000000002e26

    1. Initial program 99.1%

      \[\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.1%

        \[\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)} \]
      2. fma-def99.1%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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. Simplified99.1%

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

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

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

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

        \[\leadsto {\left(\mathsf{hypot}\left(a, b\right) \cdot \color{blue}{\mathsf{hypot}\left(a, b\right)}\right)}^{2} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      5. pow-prod-down99.1%

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

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

        \[\leadsto {\left(\mathsf{hypot}\left(a, b\right)\right)}^{\color{blue}{4}} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      8. expm1-log1p-u97.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\right)\right)} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      9. expm1-udef97.5%

        \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left({\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\right)} - 1\right)} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
    5. Applied egg-rr97.5%

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

      \[\leadsto \left(e^{\mathsf{log1p}\left({\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\right)} - 1\right) + \left(4 \cdot \color{blue}{{b}^{2}} - 1\right) \]
    7. Step-by-step derivation
      1. unpow297.6%

        \[\leadsto \left(e^{\mathsf{log1p}\left({\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\right)} - 1\right) + \left(4 \cdot \color{blue}{\left(b \cdot b\right)} - 1\right) \]
    8. Simplified97.6%

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

      \[\leadsto \color{blue}{{b}^{4}} + \left(4 \cdot \left(b \cdot b\right) - 1\right) \]
    10. Step-by-step derivation
      1. associate-+r-99.2%

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

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

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

        \[\leadsto \left(\color{blue}{\left(b \cdot b\right)} \cdot {b}^{\left(\frac{4}{2}\right)} + 4 \cdot \left(b \cdot b\right)\right) - 1 \]
      5. metadata-eval99.1%

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

        \[\leadsto \left(\left(b \cdot b\right) \cdot \color{blue}{\left(b \cdot b\right)} + 4 \cdot \left(b \cdot b\right)\right) - 1 \]
      7. distribute-rgt-out99.1%

        \[\leadsto \color{blue}{\left(b \cdot b\right) \cdot \left(b \cdot b + 4\right)} - 1 \]
    11. Applied egg-rr99.1%

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

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

Alternative 6: 58.8% accurate, 6.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(b \cdot b\right) \cdot 4\\ \mathbf{if}\;a \leq -2.5 \cdot 10^{+153}:\\ \;\;\;\;a \cdot \left(a \cdot 4\right)\\ \mathbf{elif}\;a \leq -5.1 \cdot 10^{-20}:\\ \;\;\;\;\left(b \cdot b\right) \cdot \left(a \cdot -12\right)\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{-214}:\\ \;\;\;\;-1\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{-165}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-9}:\\ \;\;\;\;-1\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{+102}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;4 \cdot \left(\left(a \cdot a\right) \cdot \left(a + 1\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b)
 :precision binary64
 (let* ((t_0 (* (* b b) 4.0)))
   (if (<= a -2.5e+153)
     (* a (* a 4.0))
     (if (<= a -5.1e-20)
       (* (* b b) (* a -12.0))
       (if (<= a 9.2e-214)
         -1.0
         (if (<= a 1.05e-165)
           t_0
           (if (<= a 3e-9)
             -1.0
             (if (<= a 3.5e+102) t_0 (* 4.0 (* (* a a) (+ a 1.0)))))))))))
double code(double a, double b) {
	double t_0 = (b * b) * 4.0;
	double tmp;
	if (a <= -2.5e+153) {
		tmp = a * (a * 4.0);
	} else if (a <= -5.1e-20) {
		tmp = (b * b) * (a * -12.0);
	} else if (a <= 9.2e-214) {
		tmp = -1.0;
	} else if (a <= 1.05e-165) {
		tmp = t_0;
	} else if (a <= 3e-9) {
		tmp = -1.0;
	} else if (a <= 3.5e+102) {
		tmp = t_0;
	} else {
		tmp = 4.0 * ((a * a) * (a + 1.0));
	}
	return tmp;
}
real(8) function code(a, b)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_0
    real(8) :: tmp
    t_0 = (b * b) * 4.0d0
    if (a <= (-2.5d+153)) then
        tmp = a * (a * 4.0d0)
    else if (a <= (-5.1d-20)) then
        tmp = (b * b) * (a * (-12.0d0))
    else if (a <= 9.2d-214) then
        tmp = -1.0d0
    else if (a <= 1.05d-165) then
        tmp = t_0
    else if (a <= 3d-9) then
        tmp = -1.0d0
    else if (a <= 3.5d+102) then
        tmp = t_0
    else
        tmp = 4.0d0 * ((a * a) * (a + 1.0d0))
    end if
    code = tmp
end function
public static double code(double a, double b) {
	double t_0 = (b * b) * 4.0;
	double tmp;
	if (a <= -2.5e+153) {
		tmp = a * (a * 4.0);
	} else if (a <= -5.1e-20) {
		tmp = (b * b) * (a * -12.0);
	} else if (a <= 9.2e-214) {
		tmp = -1.0;
	} else if (a <= 1.05e-165) {
		tmp = t_0;
	} else if (a <= 3e-9) {
		tmp = -1.0;
	} else if (a <= 3.5e+102) {
		tmp = t_0;
	} else {
		tmp = 4.0 * ((a * a) * (a + 1.0));
	}
	return tmp;
}
def code(a, b):
	t_0 = (b * b) * 4.0
	tmp = 0
	if a <= -2.5e+153:
		tmp = a * (a * 4.0)
	elif a <= -5.1e-20:
		tmp = (b * b) * (a * -12.0)
	elif a <= 9.2e-214:
		tmp = -1.0
	elif a <= 1.05e-165:
		tmp = t_0
	elif a <= 3e-9:
		tmp = -1.0
	elif a <= 3.5e+102:
		tmp = t_0
	else:
		tmp = 4.0 * ((a * a) * (a + 1.0))
	return tmp
function code(a, b)
	t_0 = Float64(Float64(b * b) * 4.0)
	tmp = 0.0
	if (a <= -2.5e+153)
		tmp = Float64(a * Float64(a * 4.0));
	elseif (a <= -5.1e-20)
		tmp = Float64(Float64(b * b) * Float64(a * -12.0));
	elseif (a <= 9.2e-214)
		tmp = -1.0;
	elseif (a <= 1.05e-165)
		tmp = t_0;
	elseif (a <= 3e-9)
		tmp = -1.0;
	elseif (a <= 3.5e+102)
		tmp = t_0;
	else
		tmp = Float64(4.0 * Float64(Float64(a * a) * Float64(a + 1.0)));
	end
	return tmp
end
function tmp_2 = code(a, b)
	t_0 = (b * b) * 4.0;
	tmp = 0.0;
	if (a <= -2.5e+153)
		tmp = a * (a * 4.0);
	elseif (a <= -5.1e-20)
		tmp = (b * b) * (a * -12.0);
	elseif (a <= 9.2e-214)
		tmp = -1.0;
	elseif (a <= 1.05e-165)
		tmp = t_0;
	elseif (a <= 3e-9)
		tmp = -1.0;
	elseif (a <= 3.5e+102)
		tmp = t_0;
	else
		tmp = 4.0 * ((a * a) * (a + 1.0));
	end
	tmp_2 = tmp;
end
code[a_, b_] := Block[{t$95$0 = N[(N[(b * b), $MachinePrecision] * 4.0), $MachinePrecision]}, If[LessEqual[a, -2.5e+153], N[(a * N[(a * 4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -5.1e-20], N[(N[(b * b), $MachinePrecision] * N[(a * -12.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.2e-214], -1.0, If[LessEqual[a, 1.05e-165], t$95$0, If[LessEqual[a, 3e-9], -1.0, If[LessEqual[a, 3.5e+102], t$95$0, N[(4.0 * N[(N[(a * a), $MachinePrecision] * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(b \cdot b\right) \cdot 4\\
\mathbf{if}\;a \leq -2.5 \cdot 10^{+153}:\\
\;\;\;\;a \cdot \left(a \cdot 4\right)\\

\mathbf{elif}\;a \leq -5.1 \cdot 10^{-20}:\\
\;\;\;\;\left(b \cdot b\right) \cdot \left(a \cdot -12\right)\\

\mathbf{elif}\;a \leq 9.2 \cdot 10^{-214}:\\
\;\;\;\;-1\\

\mathbf{elif}\;a \leq 1.05 \cdot 10^{-165}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;a \leq 3 \cdot 10^{-9}:\\
\;\;\;\;-1\\

\mathbf{elif}\;a \leq 3.5 \cdot 10^{+102}:\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;4 \cdot \left(\left(a \cdot a\right) \cdot \left(a + 1\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -2.50000000000000009e153

    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. Step-by-step derivation
      1. associate--l+0.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)} \]
      2. fma-def0.0%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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. Simplified0.0%

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

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

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

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

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

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

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

        \[\leadsto {\left(\mathsf{hypot}\left(a, b\right)\right)}^{\color{blue}{4}} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      8. add-cube-cbrt0.0%

        \[\leadsto {\color{blue}{\left(\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right) \cdot \sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}}^{4} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      9. unpow-prod-down0.0%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{4} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{4}} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      10. pow20.0%

        \[\leadsto {\color{blue}{\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}}^{4} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{4} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
    5. Applied egg-rr0.0%

      \[\leadsto \color{blue}{{\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}^{4} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{4}} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
    6. Step-by-step derivation
      1. *-commutative0.0%

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

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

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

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

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

        \[\leadsto {\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}^{\color{blue}{\left(\frac{4}{2}\right)}} \cdot \left({\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}^{\left(\frac{4}{2}\right)} \cdot {\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}^{\left(\frac{4}{2}\right)}\right) + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      7. cube-unmult0.0%

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

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

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

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

        \[\leadsto {\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{\color{blue}{4}}\right)}^{3} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
    7. Simplified0.0%

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

      \[\leadsto \color{blue}{4 \cdot {a}^{2} + 4 \cdot {a}^{3}} \]
    9. Step-by-step derivation
      1. distribute-lft-out0.0%

        \[\leadsto \color{blue}{4 \cdot \left({a}^{2} + {a}^{3}\right)} \]
      2. *-lft-identity0.0%

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

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

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

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

        \[\leadsto 4 \cdot \color{blue}{\left(1 \cdot {a}^{2} + a \cdot {a}^{2}\right)} \]
      7. *-lft-identity0.0%

        \[\leadsto 4 \cdot \left(\color{blue}{{a}^{2}} + a \cdot {a}^{2}\right) \]
      8. unpow20.0%

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

        \[\leadsto 4 \cdot \left(a \cdot a + a \cdot \color{blue}{\left(a \cdot a\right)}\right) \]
      10. cube-mult0.0%

        \[\leadsto 4 \cdot \left(a \cdot a + \color{blue}{{a}^{3}}\right) \]
    10. Simplified0.0%

      \[\leadsto \color{blue}{4 \cdot \left(a \cdot a + {a}^{3}\right)} \]
    11. Taylor expanded in a around 0 100.0%

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

        \[\leadsto 4 \cdot \color{blue}{\left(a \cdot a\right)} \]
      2. *-commutative100.0%

        \[\leadsto \color{blue}{\left(a \cdot a\right) \cdot 4} \]
      3. associate-*r*100.0%

        \[\leadsto \color{blue}{a \cdot \left(a \cdot 4\right)} \]
      4. *-commutative100.0%

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

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

    if -2.50000000000000009e153 < a < -5.10000000000000019e-20

    1. Initial program 62.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+62.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)} \]
      2. fma-def62.5%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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. Simplified81.1%

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

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

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

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

        \[\leadsto {\left(\mathsf{hypot}\left(a, b\right) \cdot \color{blue}{\mathsf{hypot}\left(a, b\right)}\right)}^{2} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      5. pow-prod-down81.1%

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

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

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

        \[\leadsto {\color{blue}{\left(\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right) \cdot \sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}}^{4} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      9. unpow-prod-down79.6%

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

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

      \[\leadsto \color{blue}{{\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}^{4} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{4}} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
    6. Step-by-step derivation
      1. *-commutative79.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b \cdot b\right) \cdot \color{blue}{\left(4 \cdot 1 + 4 \cdot \left(-3 \cdot a\right)\right)} \]
      8. metadata-eval32.7%

        \[\leadsto \left(b \cdot b\right) \cdot \left(\color{blue}{4} + 4 \cdot \left(-3 \cdot a\right)\right) \]
      9. associate-*r*32.7%

        \[\leadsto \left(b \cdot b\right) \cdot \left(4 + \color{blue}{\left(4 \cdot -3\right) \cdot a}\right) \]
      10. metadata-eval32.7%

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

      \[\leadsto \color{blue}{\left(b \cdot b\right) \cdot \left(4 + -12 \cdot a\right)} \]
    11. Taylor expanded in a around inf 32.6%

      \[\leadsto \left(b \cdot b\right) \cdot \color{blue}{\left(-12 \cdot a\right)} \]
    12. Step-by-step derivation
      1. *-commutative32.6%

        \[\leadsto \left(b \cdot b\right) \cdot \color{blue}{\left(a \cdot -12\right)} \]
    13. Simplified32.6%

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

    if -5.10000000000000019e-20 < a < 9.20000000000000044e-214 or 1.04999999999999997e-165 < a < 2.99999999999999998e-9

    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. Step-by-step derivation
      1. associate--l+99.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)} \]
      2. fma-def99.9%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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. Simplified99.9%

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

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

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

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

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

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

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

    if 9.20000000000000044e-214 < a < 1.04999999999999997e-165 or 2.99999999999999998e-9 < a < 3.50000000000000011e102

    1. Initial program 84.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+84.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)} \]
      2. fma-def84.8%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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. Simplified84.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b \cdot b\right) \cdot \color{blue}{\left(4 \cdot 1 + 4 \cdot \left(-3 \cdot a\right)\right)} \]
      8. metadata-eval21.9%

        \[\leadsto \left(b \cdot b\right) \cdot \left(\color{blue}{4} + 4 \cdot \left(-3 \cdot a\right)\right) \]
      9. associate-*r*21.9%

        \[\leadsto \left(b \cdot b\right) \cdot \left(4 + \color{blue}{\left(4 \cdot -3\right) \cdot a}\right) \]
      10. metadata-eval21.9%

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

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

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

    if 3.50000000000000011e102 < a

    1. Initial program 70.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+70.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)} \]
      2. fma-def70.3%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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.3%

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

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

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

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

        \[\leadsto {\left(\mathsf{hypot}\left(a, b\right) \cdot \color{blue}{\mathsf{hypot}\left(a, b\right)}\right)}^{2} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      5. pow-prod-down70.3%

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

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

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

        \[\leadsto {\color{blue}{\left(\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right) \cdot \sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}}^{4} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      9. unpow-prod-down70.3%

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

        \[\leadsto {\color{blue}{\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}}^{4} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{4} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
    5. Applied egg-rr70.3%

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

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

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

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

        \[\leadsto \left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right) \cdot \color{blue}{\left({\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}^{\left(\frac{4}{2}\right)} \cdot {\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}^{\left(\frac{4}{2}\right)}\right)} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      5. unpow270.3%

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

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

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

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

        \[\leadsto {\color{blue}{\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}}^{3} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      10. pow-sqr70.3%

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

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

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

      \[\leadsto \color{blue}{4 \cdot {a}^{2} + 4 \cdot {a}^{3}} \]
    9. Step-by-step derivation
      1. distribute-lft-out100.0%

        \[\leadsto \color{blue}{4 \cdot \left({a}^{2} + {a}^{3}\right)} \]
      2. *-lft-identity100.0%

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

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

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

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

        \[\leadsto 4 \cdot \color{blue}{\left(1 \cdot {a}^{2} + a \cdot {a}^{2}\right)} \]
      7. *-lft-identity100.0%

        \[\leadsto 4 \cdot \left(\color{blue}{{a}^{2}} + a \cdot {a}^{2}\right) \]
      8. unpow2100.0%

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

        \[\leadsto 4 \cdot \left(a \cdot a + a \cdot \color{blue}{\left(a \cdot a\right)}\right) \]
      10. cube-mult100.0%

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

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

        \[\leadsto 4 \cdot \left(a \cdot a + \color{blue}{a \cdot \left(a \cdot a\right)}\right) \]
      2. distribute-rgt1-in100.0%

        \[\leadsto 4 \cdot \color{blue}{\left(\left(a + 1\right) \cdot \left(a \cdot a\right)\right)} \]
    12. Applied egg-rr100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.5 \cdot 10^{+153}:\\ \;\;\;\;a \cdot \left(a \cdot 4\right)\\ \mathbf{elif}\;a \leq -5.1 \cdot 10^{-20}:\\ \;\;\;\;\left(b \cdot b\right) \cdot \left(a \cdot -12\right)\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{-214}:\\ \;\;\;\;-1\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{-165}:\\ \;\;\;\;\left(b \cdot b\right) \cdot 4\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-9}:\\ \;\;\;\;-1\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{+102}:\\ \;\;\;\;\left(b \cdot b\right) \cdot 4\\ \mathbf{else}:\\ \;\;\;\;4 \cdot \left(\left(a \cdot a\right) \cdot \left(a + 1\right)\right)\\ \end{array} \]

Alternative 7: 58.8% accurate, 6.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(b \cdot b\right) \cdot 4\\ \mathbf{if}\;a \leq -5 \cdot 10^{+153}:\\ \;\;\;\;a \cdot \left(a \cdot 4\right)\\ \mathbf{elif}\;a \leq -2.25 \cdot 10^{-20}:\\ \;\;\;\;\left(b \cdot b\right) \cdot \left(4 + a \cdot -12\right)\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-213}:\\ \;\;\;\;-1\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{-165}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-9}:\\ \;\;\;\;-1\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{+101}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;4 \cdot \left(\left(a \cdot a\right) \cdot \left(a + 1\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b)
 :precision binary64
 (let* ((t_0 (* (* b b) 4.0)))
   (if (<= a -5e+153)
     (* a (* a 4.0))
     (if (<= a -2.25e-20)
       (* (* b b) (+ 4.0 (* a -12.0)))
       (if (<= a 1.25e-213)
         -1.0
         (if (<= a 1.05e-165)
           t_0
           (if (<= a 3e-9)
             -1.0
             (if (<= a 1.15e+101) t_0 (* 4.0 (* (* a a) (+ a 1.0)))))))))))
double code(double a, double b) {
	double t_0 = (b * b) * 4.0;
	double tmp;
	if (a <= -5e+153) {
		tmp = a * (a * 4.0);
	} else if (a <= -2.25e-20) {
		tmp = (b * b) * (4.0 + (a * -12.0));
	} else if (a <= 1.25e-213) {
		tmp = -1.0;
	} else if (a <= 1.05e-165) {
		tmp = t_0;
	} else if (a <= 3e-9) {
		tmp = -1.0;
	} else if (a <= 1.15e+101) {
		tmp = t_0;
	} else {
		tmp = 4.0 * ((a * a) * (a + 1.0));
	}
	return tmp;
}
real(8) function code(a, b)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_0
    real(8) :: tmp
    t_0 = (b * b) * 4.0d0
    if (a <= (-5d+153)) then
        tmp = a * (a * 4.0d0)
    else if (a <= (-2.25d-20)) then
        tmp = (b * b) * (4.0d0 + (a * (-12.0d0)))
    else if (a <= 1.25d-213) then
        tmp = -1.0d0
    else if (a <= 1.05d-165) then
        tmp = t_0
    else if (a <= 3d-9) then
        tmp = -1.0d0
    else if (a <= 1.15d+101) then
        tmp = t_0
    else
        tmp = 4.0d0 * ((a * a) * (a + 1.0d0))
    end if
    code = tmp
end function
public static double code(double a, double b) {
	double t_0 = (b * b) * 4.0;
	double tmp;
	if (a <= -5e+153) {
		tmp = a * (a * 4.0);
	} else if (a <= -2.25e-20) {
		tmp = (b * b) * (4.0 + (a * -12.0));
	} else if (a <= 1.25e-213) {
		tmp = -1.0;
	} else if (a <= 1.05e-165) {
		tmp = t_0;
	} else if (a <= 3e-9) {
		tmp = -1.0;
	} else if (a <= 1.15e+101) {
		tmp = t_0;
	} else {
		tmp = 4.0 * ((a * a) * (a + 1.0));
	}
	return tmp;
}
def code(a, b):
	t_0 = (b * b) * 4.0
	tmp = 0
	if a <= -5e+153:
		tmp = a * (a * 4.0)
	elif a <= -2.25e-20:
		tmp = (b * b) * (4.0 + (a * -12.0))
	elif a <= 1.25e-213:
		tmp = -1.0
	elif a <= 1.05e-165:
		tmp = t_0
	elif a <= 3e-9:
		tmp = -1.0
	elif a <= 1.15e+101:
		tmp = t_0
	else:
		tmp = 4.0 * ((a * a) * (a + 1.0))
	return tmp
function code(a, b)
	t_0 = Float64(Float64(b * b) * 4.0)
	tmp = 0.0
	if (a <= -5e+153)
		tmp = Float64(a * Float64(a * 4.0));
	elseif (a <= -2.25e-20)
		tmp = Float64(Float64(b * b) * Float64(4.0 + Float64(a * -12.0)));
	elseif (a <= 1.25e-213)
		tmp = -1.0;
	elseif (a <= 1.05e-165)
		tmp = t_0;
	elseif (a <= 3e-9)
		tmp = -1.0;
	elseif (a <= 1.15e+101)
		tmp = t_0;
	else
		tmp = Float64(4.0 * Float64(Float64(a * a) * Float64(a + 1.0)));
	end
	return tmp
end
function tmp_2 = code(a, b)
	t_0 = (b * b) * 4.0;
	tmp = 0.0;
	if (a <= -5e+153)
		tmp = a * (a * 4.0);
	elseif (a <= -2.25e-20)
		tmp = (b * b) * (4.0 + (a * -12.0));
	elseif (a <= 1.25e-213)
		tmp = -1.0;
	elseif (a <= 1.05e-165)
		tmp = t_0;
	elseif (a <= 3e-9)
		tmp = -1.0;
	elseif (a <= 1.15e+101)
		tmp = t_0;
	else
		tmp = 4.0 * ((a * a) * (a + 1.0));
	end
	tmp_2 = tmp;
end
code[a_, b_] := Block[{t$95$0 = N[(N[(b * b), $MachinePrecision] * 4.0), $MachinePrecision]}, If[LessEqual[a, -5e+153], N[(a * N[(a * 4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.25e-20], N[(N[(b * b), $MachinePrecision] * N[(4.0 + N[(a * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.25e-213], -1.0, If[LessEqual[a, 1.05e-165], t$95$0, If[LessEqual[a, 3e-9], -1.0, If[LessEqual[a, 1.15e+101], t$95$0, N[(4.0 * N[(N[(a * a), $MachinePrecision] * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(b \cdot b\right) \cdot 4\\
\mathbf{if}\;a \leq -5 \cdot 10^{+153}:\\
\;\;\;\;a \cdot \left(a \cdot 4\right)\\

\mathbf{elif}\;a \leq -2.25 \cdot 10^{-20}:\\
\;\;\;\;\left(b \cdot b\right) \cdot \left(4 + a \cdot -12\right)\\

\mathbf{elif}\;a \leq 1.25 \cdot 10^{-213}:\\
\;\;\;\;-1\\

\mathbf{elif}\;a \leq 1.05 \cdot 10^{-165}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;a \leq 3 \cdot 10^{-9}:\\
\;\;\;\;-1\\

\mathbf{elif}\;a \leq 1.15 \cdot 10^{+101}:\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;4 \cdot \left(\left(a \cdot a\right) \cdot \left(a + 1\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -5.00000000000000018e153

    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. Step-by-step derivation
      1. associate--l+0.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)} \]
      2. fma-def0.0%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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. Simplified0.0%

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

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

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

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

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

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

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

        \[\leadsto {\left(\mathsf{hypot}\left(a, b\right)\right)}^{\color{blue}{4}} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      8. add-cube-cbrt0.0%

        \[\leadsto {\color{blue}{\left(\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right) \cdot \sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}}^{4} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      9. unpow-prod-down0.0%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{4} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{4}} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      10. pow20.0%

        \[\leadsto {\color{blue}{\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}}^{4} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{4} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
    5. Applied egg-rr0.0%

      \[\leadsto \color{blue}{{\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}^{4} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{4}} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
    6. Step-by-step derivation
      1. *-commutative0.0%

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

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

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

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

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

        \[\leadsto {\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}^{\color{blue}{\left(\frac{4}{2}\right)}} \cdot \left({\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}^{\left(\frac{4}{2}\right)} \cdot {\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}^{\left(\frac{4}{2}\right)}\right) + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      7. cube-unmult0.0%

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

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

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

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

        \[\leadsto {\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{\color{blue}{4}}\right)}^{3} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
    7. Simplified0.0%

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

      \[\leadsto \color{blue}{4 \cdot {a}^{2} + 4 \cdot {a}^{3}} \]
    9. Step-by-step derivation
      1. distribute-lft-out0.0%

        \[\leadsto \color{blue}{4 \cdot \left({a}^{2} + {a}^{3}\right)} \]
      2. *-lft-identity0.0%

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

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

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

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

        \[\leadsto 4 \cdot \color{blue}{\left(1 \cdot {a}^{2} + a \cdot {a}^{2}\right)} \]
      7. *-lft-identity0.0%

        \[\leadsto 4 \cdot \left(\color{blue}{{a}^{2}} + a \cdot {a}^{2}\right) \]
      8. unpow20.0%

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

        \[\leadsto 4 \cdot \left(a \cdot a + a \cdot \color{blue}{\left(a \cdot a\right)}\right) \]
      10. cube-mult0.0%

        \[\leadsto 4 \cdot \left(a \cdot a + \color{blue}{{a}^{3}}\right) \]
    10. Simplified0.0%

      \[\leadsto \color{blue}{4 \cdot \left(a \cdot a + {a}^{3}\right)} \]
    11. Taylor expanded in a around 0 100.0%

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

        \[\leadsto 4 \cdot \color{blue}{\left(a \cdot a\right)} \]
      2. *-commutative100.0%

        \[\leadsto \color{blue}{\left(a \cdot a\right) \cdot 4} \]
      3. associate-*r*100.0%

        \[\leadsto \color{blue}{a \cdot \left(a \cdot 4\right)} \]
      4. *-commutative100.0%

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

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

    if -5.00000000000000018e153 < a < -2.2500000000000001e-20

    1. Initial program 62.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+62.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)} \]
      2. fma-def62.5%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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. Simplified81.1%

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

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

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

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

        \[\leadsto {\left(\mathsf{hypot}\left(a, b\right) \cdot \color{blue}{\mathsf{hypot}\left(a, b\right)}\right)}^{2} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      5. pow-prod-down81.1%

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

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

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

        \[\leadsto {\color{blue}{\left(\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right) \cdot \sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}}^{4} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      9. unpow-prod-down79.6%

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

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

      \[\leadsto \color{blue}{{\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}^{4} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{4}} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
    6. Step-by-step derivation
      1. *-commutative79.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b \cdot b\right) \cdot \color{blue}{\left(4 \cdot 1 + 4 \cdot \left(-3 \cdot a\right)\right)} \]
      8. metadata-eval32.7%

        \[\leadsto \left(b \cdot b\right) \cdot \left(\color{blue}{4} + 4 \cdot \left(-3 \cdot a\right)\right) \]
      9. associate-*r*32.7%

        \[\leadsto \left(b \cdot b\right) \cdot \left(4 + \color{blue}{\left(4 \cdot -3\right) \cdot a}\right) \]
      10. metadata-eval32.7%

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

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

    if -2.2500000000000001e-20 < a < 1.24999999999999994e-213 or 1.04999999999999997e-165 < a < 2.99999999999999998e-9

    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. Step-by-step derivation
      1. associate--l+99.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)} \]
      2. fma-def99.9%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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. Simplified99.9%

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

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

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

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

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

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

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

    if 1.24999999999999994e-213 < a < 1.04999999999999997e-165 or 2.99999999999999998e-9 < a < 1.1500000000000001e101

    1. Initial program 84.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+84.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)} \]
      2. fma-def84.8%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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. Simplified84.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b \cdot b\right) \cdot \color{blue}{\left(4 \cdot 1 + 4 \cdot \left(-3 \cdot a\right)\right)} \]
      8. metadata-eval21.9%

        \[\leadsto \left(b \cdot b\right) \cdot \left(\color{blue}{4} + 4 \cdot \left(-3 \cdot a\right)\right) \]
      9. associate-*r*21.9%

        \[\leadsto \left(b \cdot b\right) \cdot \left(4 + \color{blue}{\left(4 \cdot -3\right) \cdot a}\right) \]
      10. metadata-eval21.9%

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

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

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

    if 1.1500000000000001e101 < a

    1. Initial program 70.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+70.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)} \]
      2. fma-def70.3%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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.3%

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

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

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

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

        \[\leadsto {\left(\mathsf{hypot}\left(a, b\right) \cdot \color{blue}{\mathsf{hypot}\left(a, b\right)}\right)}^{2} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      5. pow-prod-down70.3%

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

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

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

        \[\leadsto {\color{blue}{\left(\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right) \cdot \sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}}^{4} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      9. unpow-prod-down70.3%

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

        \[\leadsto {\color{blue}{\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}}^{4} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{4} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
    5. Applied egg-rr70.3%

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

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

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

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

        \[\leadsto \left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right) \cdot \color{blue}{\left({\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}^{\left(\frac{4}{2}\right)} \cdot {\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}^{\left(\frac{4}{2}\right)}\right)} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      5. unpow270.3%

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

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

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

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

        \[\leadsto {\color{blue}{\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}}^{3} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      10. pow-sqr70.3%

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

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

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

      \[\leadsto \color{blue}{4 \cdot {a}^{2} + 4 \cdot {a}^{3}} \]
    9. Step-by-step derivation
      1. distribute-lft-out100.0%

        \[\leadsto \color{blue}{4 \cdot \left({a}^{2} + {a}^{3}\right)} \]
      2. *-lft-identity100.0%

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

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

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

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

        \[\leadsto 4 \cdot \color{blue}{\left(1 \cdot {a}^{2} + a \cdot {a}^{2}\right)} \]
      7. *-lft-identity100.0%

        \[\leadsto 4 \cdot \left(\color{blue}{{a}^{2}} + a \cdot {a}^{2}\right) \]
      8. unpow2100.0%

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

        \[\leadsto 4 \cdot \left(a \cdot a + a \cdot \color{blue}{\left(a \cdot a\right)}\right) \]
      10. cube-mult100.0%

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

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

        \[\leadsto 4 \cdot \left(a \cdot a + \color{blue}{a \cdot \left(a \cdot a\right)}\right) \]
      2. distribute-rgt1-in100.0%

        \[\leadsto 4 \cdot \color{blue}{\left(\left(a + 1\right) \cdot \left(a \cdot a\right)\right)} \]
    12. Applied egg-rr100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5 \cdot 10^{+153}:\\ \;\;\;\;a \cdot \left(a \cdot 4\right)\\ \mathbf{elif}\;a \leq -2.25 \cdot 10^{-20}:\\ \;\;\;\;\left(b \cdot b\right) \cdot \left(4 + a \cdot -12\right)\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-213}:\\ \;\;\;\;-1\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{-165}:\\ \;\;\;\;\left(b \cdot b\right) \cdot 4\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-9}:\\ \;\;\;\;-1\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{+101}:\\ \;\;\;\;\left(b \cdot b\right) \cdot 4\\ \mathbf{else}:\\ \;\;\;\;4 \cdot \left(\left(a \cdot a\right) \cdot \left(a + 1\right)\right)\\ \end{array} \]

Alternative 8: 54.4% accurate, 7.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := a \cdot \left(a \cdot 4\right)\\ t_1 := \left(b \cdot b\right) \cdot 4\\ \mathbf{if}\;a \leq -1.65 \cdot 10^{+153}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;a \leq -5.1 \cdot 10^{-20}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-213}:\\ \;\;\;\;-1\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-165}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{-9}:\\ \;\;\;\;-1\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{+123}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \end{array} \]
(FPCore (a b)
 :precision binary64
 (let* ((t_0 (* a (* a 4.0))) (t_1 (* (* b b) 4.0)))
   (if (<= a -1.65e+153)
     t_0
     (if (<= a -5.1e-20)
       t_1
       (if (<= a 1.25e-213)
         -1.0
         (if (<= a 4.5e-165)
           t_1
           (if (<= a 2.9e-9) -1.0 (if (<= a 1.1e+123) t_1 t_0))))))))
double code(double a, double b) {
	double t_0 = a * (a * 4.0);
	double t_1 = (b * b) * 4.0;
	double tmp;
	if (a <= -1.65e+153) {
		tmp = t_0;
	} else if (a <= -5.1e-20) {
		tmp = t_1;
	} else if (a <= 1.25e-213) {
		tmp = -1.0;
	} else if (a <= 4.5e-165) {
		tmp = t_1;
	} else if (a <= 2.9e-9) {
		tmp = -1.0;
	} else if (a <= 1.1e+123) {
		tmp = t_1;
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(a, b)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = a * (a * 4.0d0)
    t_1 = (b * b) * 4.0d0
    if (a <= (-1.65d+153)) then
        tmp = t_0
    else if (a <= (-5.1d-20)) then
        tmp = t_1
    else if (a <= 1.25d-213) then
        tmp = -1.0d0
    else if (a <= 4.5d-165) then
        tmp = t_1
    else if (a <= 2.9d-9) then
        tmp = -1.0d0
    else if (a <= 1.1d+123) then
        tmp = t_1
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double a, double b) {
	double t_0 = a * (a * 4.0);
	double t_1 = (b * b) * 4.0;
	double tmp;
	if (a <= -1.65e+153) {
		tmp = t_0;
	} else if (a <= -5.1e-20) {
		tmp = t_1;
	} else if (a <= 1.25e-213) {
		tmp = -1.0;
	} else if (a <= 4.5e-165) {
		tmp = t_1;
	} else if (a <= 2.9e-9) {
		tmp = -1.0;
	} else if (a <= 1.1e+123) {
		tmp = t_1;
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(a, b):
	t_0 = a * (a * 4.0)
	t_1 = (b * b) * 4.0
	tmp = 0
	if a <= -1.65e+153:
		tmp = t_0
	elif a <= -5.1e-20:
		tmp = t_1
	elif a <= 1.25e-213:
		tmp = -1.0
	elif a <= 4.5e-165:
		tmp = t_1
	elif a <= 2.9e-9:
		tmp = -1.0
	elif a <= 1.1e+123:
		tmp = t_1
	else:
		tmp = t_0
	return tmp
function code(a, b)
	t_0 = Float64(a * Float64(a * 4.0))
	t_1 = Float64(Float64(b * b) * 4.0)
	tmp = 0.0
	if (a <= -1.65e+153)
		tmp = t_0;
	elseif (a <= -5.1e-20)
		tmp = t_1;
	elseif (a <= 1.25e-213)
		tmp = -1.0;
	elseif (a <= 4.5e-165)
		tmp = t_1;
	elseif (a <= 2.9e-9)
		tmp = -1.0;
	elseif (a <= 1.1e+123)
		tmp = t_1;
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(a, b)
	t_0 = a * (a * 4.0);
	t_1 = (b * b) * 4.0;
	tmp = 0.0;
	if (a <= -1.65e+153)
		tmp = t_0;
	elseif (a <= -5.1e-20)
		tmp = t_1;
	elseif (a <= 1.25e-213)
		tmp = -1.0;
	elseif (a <= 4.5e-165)
		tmp = t_1;
	elseif (a <= 2.9e-9)
		tmp = -1.0;
	elseif (a <= 1.1e+123)
		tmp = t_1;
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[a_, b_] := Block[{t$95$0 = N[(a * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(b * b), $MachinePrecision] * 4.0), $MachinePrecision]}, If[LessEqual[a, -1.65e+153], t$95$0, If[LessEqual[a, -5.1e-20], t$95$1, If[LessEqual[a, 1.25e-213], -1.0, If[LessEqual[a, 4.5e-165], t$95$1, If[LessEqual[a, 2.9e-9], -1.0, If[LessEqual[a, 1.1e+123], t$95$1, t$95$0]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := a \cdot \left(a \cdot 4\right)\\
t_1 := \left(b \cdot b\right) \cdot 4\\
\mathbf{if}\;a \leq -1.65 \cdot 10^{+153}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;a \leq -5.1 \cdot 10^{-20}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.25 \cdot 10^{-213}:\\
\;\;\;\;-1\\

\mathbf{elif}\;a \leq 4.5 \cdot 10^{-165}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 2.9 \cdot 10^{-9}:\\
\;\;\;\;-1\\

\mathbf{elif}\;a \leq 1.1 \cdot 10^{+123}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.64999999999999997e153 or 1.09999999999999996e123 < a

    1. Initial program 33.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+33.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)} \]
      2. fma-def33.8%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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. Simplified33.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{4 \cdot {a}^{2} + 4 \cdot {a}^{3}} \]
    9. Step-by-step derivation
      1. distribute-lft-out47.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto 4 \cdot \left(a \cdot a + \color{blue}{{a}^{3}}\right) \]
    10. Simplified47.1%

      \[\leadsto \color{blue}{4 \cdot \left(a \cdot a + {a}^{3}\right)} \]
    11. Taylor expanded in a around 0 93.2%

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

        \[\leadsto 4 \cdot \color{blue}{\left(a \cdot a\right)} \]
      2. *-commutative93.2%

        \[\leadsto \color{blue}{\left(a \cdot a\right) \cdot 4} \]
      3. associate-*r*93.2%

        \[\leadsto \color{blue}{a \cdot \left(a \cdot 4\right)} \]
      4. *-commutative93.2%

        \[\leadsto a \cdot \color{blue}{\left(4 \cdot a\right)} \]
    13. Simplified93.2%

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

    if -1.64999999999999997e153 < a < -5.10000000000000019e-20 or 1.24999999999999994e-213 < a < 4.49999999999999992e-165 or 2.89999999999999991e-9 < a < 1.09999999999999996e123

    1. Initial program 72.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+72.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)} \]
      2. fma-def72.5%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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. Simplified81.6%

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

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

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

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

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

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

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

        \[\leadsto {\left(\mathsf{hypot}\left(a, b\right)\right)}^{\color{blue}{4}} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      8. add-cube-cbrt80.5%

        \[\leadsto {\color{blue}{\left(\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right) \cdot \sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}}^{4} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      9. unpow-prod-down80.4%

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

        \[\leadsto {\color{blue}{\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}}^{4} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{4} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
    5. Applied egg-rr80.4%

      \[\leadsto \color{blue}{{\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}^{4} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{4}} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
    6. Step-by-step derivation
      1. *-commutative80.4%

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

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

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

        \[\leadsto \left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right) \cdot \color{blue}{\left({\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}^{\left(\frac{4}{2}\right)} \cdot {\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}^{\left(\frac{4}{2}\right)}\right)} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      5. unpow280.4%

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

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

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

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

        \[\leadsto {\color{blue}{\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}}^{3} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      10. pow-sqr80.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b \cdot b\right) \cdot \color{blue}{\left(4 \cdot 1 + 4 \cdot \left(-3 \cdot a\right)\right)} \]
      8. metadata-eval25.9%

        \[\leadsto \left(b \cdot b\right) \cdot \left(\color{blue}{4} + 4 \cdot \left(-3 \cdot a\right)\right) \]
      9. associate-*r*25.9%

        \[\leadsto \left(b \cdot b\right) \cdot \left(4 + \color{blue}{\left(4 \cdot -3\right) \cdot a}\right) \]
      10. metadata-eval25.9%

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

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

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

    if -5.10000000000000019e-20 < a < 1.24999999999999994e-213 or 4.49999999999999992e-165 < a < 2.89999999999999991e-9

    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. Step-by-step derivation
      1. associate--l+99.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)} \]
      2. fma-def99.9%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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. Simplified99.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.65 \cdot 10^{+153}:\\ \;\;\;\;a \cdot \left(a \cdot 4\right)\\ \mathbf{elif}\;a \leq -5.1 \cdot 10^{-20}:\\ \;\;\;\;\left(b \cdot b\right) \cdot 4\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-213}:\\ \;\;\;\;-1\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-165}:\\ \;\;\;\;\left(b \cdot b\right) \cdot 4\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{-9}:\\ \;\;\;\;-1\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{+123}:\\ \;\;\;\;\left(b \cdot b\right) \cdot 4\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(a \cdot 4\right)\\ \end{array} \]

Alternative 9: 55.3% accurate, 7.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := a \cdot \left(a \cdot 4\right)\\ t_1 := \left(b \cdot b\right) \cdot 4\\ \mathbf{if}\;a \leq -6.8 \cdot 10^{+153}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;a \leq -5.1 \cdot 10^{-20}:\\ \;\;\;\;\left(b \cdot b\right) \cdot \left(a \cdot -12\right)\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-213}:\\ \;\;\;\;-1\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{-165}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.82 \cdot 10^{-9}:\\ \;\;\;\;-1\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{+123}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \end{array} \]
(FPCore (a b)
 :precision binary64
 (let* ((t_0 (* a (* a 4.0))) (t_1 (* (* b b) 4.0)))
   (if (<= a -6.8e+153)
     t_0
     (if (<= a -5.1e-20)
       (* (* b b) (* a -12.0))
       (if (<= a 1.25e-213)
         -1.0
         (if (<= a 1.05e-165)
           t_1
           (if (<= a 1.82e-9) -1.0 (if (<= a 1.1e+123) t_1 t_0))))))))
double code(double a, double b) {
	double t_0 = a * (a * 4.0);
	double t_1 = (b * b) * 4.0;
	double tmp;
	if (a <= -6.8e+153) {
		tmp = t_0;
	} else if (a <= -5.1e-20) {
		tmp = (b * b) * (a * -12.0);
	} else if (a <= 1.25e-213) {
		tmp = -1.0;
	} else if (a <= 1.05e-165) {
		tmp = t_1;
	} else if (a <= 1.82e-9) {
		tmp = -1.0;
	} else if (a <= 1.1e+123) {
		tmp = t_1;
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(a, b)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = a * (a * 4.0d0)
    t_1 = (b * b) * 4.0d0
    if (a <= (-6.8d+153)) then
        tmp = t_0
    else if (a <= (-5.1d-20)) then
        tmp = (b * b) * (a * (-12.0d0))
    else if (a <= 1.25d-213) then
        tmp = -1.0d0
    else if (a <= 1.05d-165) then
        tmp = t_1
    else if (a <= 1.82d-9) then
        tmp = -1.0d0
    else if (a <= 1.1d+123) then
        tmp = t_1
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double a, double b) {
	double t_0 = a * (a * 4.0);
	double t_1 = (b * b) * 4.0;
	double tmp;
	if (a <= -6.8e+153) {
		tmp = t_0;
	} else if (a <= -5.1e-20) {
		tmp = (b * b) * (a * -12.0);
	} else if (a <= 1.25e-213) {
		tmp = -1.0;
	} else if (a <= 1.05e-165) {
		tmp = t_1;
	} else if (a <= 1.82e-9) {
		tmp = -1.0;
	} else if (a <= 1.1e+123) {
		tmp = t_1;
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(a, b):
	t_0 = a * (a * 4.0)
	t_1 = (b * b) * 4.0
	tmp = 0
	if a <= -6.8e+153:
		tmp = t_0
	elif a <= -5.1e-20:
		tmp = (b * b) * (a * -12.0)
	elif a <= 1.25e-213:
		tmp = -1.0
	elif a <= 1.05e-165:
		tmp = t_1
	elif a <= 1.82e-9:
		tmp = -1.0
	elif a <= 1.1e+123:
		tmp = t_1
	else:
		tmp = t_0
	return tmp
function code(a, b)
	t_0 = Float64(a * Float64(a * 4.0))
	t_1 = Float64(Float64(b * b) * 4.0)
	tmp = 0.0
	if (a <= -6.8e+153)
		tmp = t_0;
	elseif (a <= -5.1e-20)
		tmp = Float64(Float64(b * b) * Float64(a * -12.0));
	elseif (a <= 1.25e-213)
		tmp = -1.0;
	elseif (a <= 1.05e-165)
		tmp = t_1;
	elseif (a <= 1.82e-9)
		tmp = -1.0;
	elseif (a <= 1.1e+123)
		tmp = t_1;
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(a, b)
	t_0 = a * (a * 4.0);
	t_1 = (b * b) * 4.0;
	tmp = 0.0;
	if (a <= -6.8e+153)
		tmp = t_0;
	elseif (a <= -5.1e-20)
		tmp = (b * b) * (a * -12.0);
	elseif (a <= 1.25e-213)
		tmp = -1.0;
	elseif (a <= 1.05e-165)
		tmp = t_1;
	elseif (a <= 1.82e-9)
		tmp = -1.0;
	elseif (a <= 1.1e+123)
		tmp = t_1;
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[a_, b_] := Block[{t$95$0 = N[(a * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(b * b), $MachinePrecision] * 4.0), $MachinePrecision]}, If[LessEqual[a, -6.8e+153], t$95$0, If[LessEqual[a, -5.1e-20], N[(N[(b * b), $MachinePrecision] * N[(a * -12.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.25e-213], -1.0, If[LessEqual[a, 1.05e-165], t$95$1, If[LessEqual[a, 1.82e-9], -1.0, If[LessEqual[a, 1.1e+123], t$95$1, t$95$0]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := a \cdot \left(a \cdot 4\right)\\
t_1 := \left(b \cdot b\right) \cdot 4\\
\mathbf{if}\;a \leq -6.8 \cdot 10^{+153}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;a \leq -5.1 \cdot 10^{-20}:\\
\;\;\;\;\left(b \cdot b\right) \cdot \left(a \cdot -12\right)\\

\mathbf{elif}\;a \leq 1.25 \cdot 10^{-213}:\\
\;\;\;\;-1\\

\mathbf{elif}\;a \leq 1.05 \cdot 10^{-165}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.82 \cdot 10^{-9}:\\
\;\;\;\;-1\\

\mathbf{elif}\;a \leq 1.1 \cdot 10^{+123}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -6.7999999999999995e153 or 1.09999999999999996e123 < a

    1. Initial program 33.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+33.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)} \]
      2. fma-def33.8%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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. Simplified33.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{4 \cdot {a}^{2} + 4 \cdot {a}^{3}} \]
    9. Step-by-step derivation
      1. distribute-lft-out47.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto 4 \cdot \left(a \cdot a + \color{blue}{{a}^{3}}\right) \]
    10. Simplified47.1%

      \[\leadsto \color{blue}{4 \cdot \left(a \cdot a + {a}^{3}\right)} \]
    11. Taylor expanded in a around 0 93.2%

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

        \[\leadsto 4 \cdot \color{blue}{\left(a \cdot a\right)} \]
      2. *-commutative93.2%

        \[\leadsto \color{blue}{\left(a \cdot a\right) \cdot 4} \]
      3. associate-*r*93.2%

        \[\leadsto \color{blue}{a \cdot \left(a \cdot 4\right)} \]
      4. *-commutative93.2%

        \[\leadsto a \cdot \color{blue}{\left(4 \cdot a\right)} \]
    13. Simplified93.2%

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

    if -6.7999999999999995e153 < a < -5.10000000000000019e-20

    1. Initial program 62.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+62.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)} \]
      2. fma-def62.5%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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. Simplified81.1%

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

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

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

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

        \[\leadsto {\left(\mathsf{hypot}\left(a, b\right) \cdot \color{blue}{\mathsf{hypot}\left(a, b\right)}\right)}^{2} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      5. pow-prod-down81.1%

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

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

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

        \[\leadsto {\color{blue}{\left(\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right) \cdot \sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}}^{4} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      9. unpow-prod-down79.6%

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

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

      \[\leadsto \color{blue}{{\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}^{4} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{4}} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
    6. Step-by-step derivation
      1. *-commutative79.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b \cdot b\right) \cdot \color{blue}{\left(4 \cdot 1 + 4 \cdot \left(-3 \cdot a\right)\right)} \]
      8. metadata-eval32.7%

        \[\leadsto \left(b \cdot b\right) \cdot \left(\color{blue}{4} + 4 \cdot \left(-3 \cdot a\right)\right) \]
      9. associate-*r*32.7%

        \[\leadsto \left(b \cdot b\right) \cdot \left(4 + \color{blue}{\left(4 \cdot -3\right) \cdot a}\right) \]
      10. metadata-eval32.7%

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

      \[\leadsto \color{blue}{\left(b \cdot b\right) \cdot \left(4 + -12 \cdot a\right)} \]
    11. Taylor expanded in a around inf 32.6%

      \[\leadsto \left(b \cdot b\right) \cdot \color{blue}{\left(-12 \cdot a\right)} \]
    12. Step-by-step derivation
      1. *-commutative32.6%

        \[\leadsto \left(b \cdot b\right) \cdot \color{blue}{\left(a \cdot -12\right)} \]
    13. Simplified32.6%

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

    if -5.10000000000000019e-20 < a < 1.24999999999999994e-213 or 1.04999999999999997e-165 < a < 1.8199999999999999e-9

    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. Step-by-step derivation
      1. associate--l+99.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)} \]
      2. fma-def99.9%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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. Simplified99.9%

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

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

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

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

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

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

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

    if 1.24999999999999994e-213 < a < 1.04999999999999997e-165 or 1.8199999999999999e-9 < a < 1.09999999999999996e123

    1. Initial program 82.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+82.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)} \]
      2. fma-def82.0%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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. Simplified82.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\color{blue}{\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}}^{4} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{4} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
    5. Applied egg-rr81.2%

      \[\leadsto \color{blue}{{\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}^{4} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{4}} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
    6. Step-by-step derivation
      1. *-commutative81.2%

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

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

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

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

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

        \[\leadsto {\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}^{\color{blue}{\left(\frac{4}{2}\right)}} \cdot \left({\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}^{\left(\frac{4}{2}\right)} \cdot {\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}^{\left(\frac{4}{2}\right)}\right) + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      7. cube-unmult81.0%

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

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

        \[\leadsto {\color{blue}{\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}}^{3} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      10. pow-sqr81.2%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b \cdot b\right) \cdot \left(\color{blue}{4} + 4 \cdot \left(-3 \cdot a\right)\right) \]
      9. associate-*r*19.5%

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

        \[\leadsto \left(b \cdot b\right) \cdot \left(4 + \color{blue}{-12} \cdot a\right) \]
    10. Simplified19.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.8 \cdot 10^{+153}:\\ \;\;\;\;a \cdot \left(a \cdot 4\right)\\ \mathbf{elif}\;a \leq -5.1 \cdot 10^{-20}:\\ \;\;\;\;\left(b \cdot b\right) \cdot \left(a \cdot -12\right)\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-213}:\\ \;\;\;\;-1\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{-165}:\\ \;\;\;\;\left(b \cdot b\right) \cdot 4\\ \mathbf{elif}\;a \leq 1.82 \cdot 10^{-9}:\\ \;\;\;\;-1\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{+123}:\\ \;\;\;\;\left(b \cdot b\right) \cdot 4\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(a \cdot 4\right)\\ \end{array} \]

Alternative 10: 87.3% accurate, 8.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -6.2 \cdot 10^{+153}:\\ \;\;\;\;a \cdot \left(a \cdot 4\right)\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{+102}:\\ \;\;\;\;-1 + \left(b \cdot b\right) \cdot \left(b \cdot b + 4\right)\\ \mathbf{else}:\\ \;\;\;\;4 \cdot \left(\left(a \cdot a\right) \cdot \left(a + 1\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b)
 :precision binary64
 (if (<= a -6.2e+153)
   (* a (* a 4.0))
   (if (<= a 3.4e+102)
     (+ -1.0 (* (* b b) (+ (* b b) 4.0)))
     (* 4.0 (* (* a a) (+ a 1.0))))))
double code(double a, double b) {
	double tmp;
	if (a <= -6.2e+153) {
		tmp = a * (a * 4.0);
	} else if (a <= 3.4e+102) {
		tmp = -1.0 + ((b * b) * ((b * b) + 4.0));
	} else {
		tmp = 4.0 * ((a * a) * (a + 1.0));
	}
	return tmp;
}
real(8) function code(a, b)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (a <= (-6.2d+153)) then
        tmp = a * (a * 4.0d0)
    else if (a <= 3.4d+102) then
        tmp = (-1.0d0) + ((b * b) * ((b * b) + 4.0d0))
    else
        tmp = 4.0d0 * ((a * a) * (a + 1.0d0))
    end if
    code = tmp
end function
public static double code(double a, double b) {
	double tmp;
	if (a <= -6.2e+153) {
		tmp = a * (a * 4.0);
	} else if (a <= 3.4e+102) {
		tmp = -1.0 + ((b * b) * ((b * b) + 4.0));
	} else {
		tmp = 4.0 * ((a * a) * (a + 1.0));
	}
	return tmp;
}
def code(a, b):
	tmp = 0
	if a <= -6.2e+153:
		tmp = a * (a * 4.0)
	elif a <= 3.4e+102:
		tmp = -1.0 + ((b * b) * ((b * b) + 4.0))
	else:
		tmp = 4.0 * ((a * a) * (a + 1.0))
	return tmp
function code(a, b)
	tmp = 0.0
	if (a <= -6.2e+153)
		tmp = Float64(a * Float64(a * 4.0));
	elseif (a <= 3.4e+102)
		tmp = Float64(-1.0 + Float64(Float64(b * b) * Float64(Float64(b * b) + 4.0)));
	else
		tmp = Float64(4.0 * Float64(Float64(a * a) * Float64(a + 1.0)));
	end
	return tmp
end
function tmp_2 = code(a, b)
	tmp = 0.0;
	if (a <= -6.2e+153)
		tmp = a * (a * 4.0);
	elseif (a <= 3.4e+102)
		tmp = -1.0 + ((b * b) * ((b * b) + 4.0));
	else
		tmp = 4.0 * ((a * a) * (a + 1.0));
	end
	tmp_2 = tmp;
end
code[a_, b_] := If[LessEqual[a, -6.2e+153], N[(a * N[(a * 4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.4e+102], N[(-1.0 + N[(N[(b * b), $MachinePrecision] * N[(N[(b * b), $MachinePrecision] + 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(4.0 * N[(N[(a * a), $MachinePrecision] * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.2 \cdot 10^{+153}:\\
\;\;\;\;a \cdot \left(a \cdot 4\right)\\

\mathbf{elif}\;a \leq 3.4 \cdot 10^{+102}:\\
\;\;\;\;-1 + \left(b \cdot b\right) \cdot \left(b \cdot b + 4\right)\\

\mathbf{else}:\\
\;\;\;\;4 \cdot \left(\left(a \cdot a\right) \cdot \left(a + 1\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6.2e153

    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. Step-by-step derivation
      1. associate--l+0.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)} \]
      2. fma-def0.0%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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. Simplified0.0%

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

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

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

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

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

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

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

        \[\leadsto {\left(\mathsf{hypot}\left(a, b\right)\right)}^{\color{blue}{4}} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      8. add-cube-cbrt0.0%

        \[\leadsto {\color{blue}{\left(\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right) \cdot \sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}}^{4} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      9. unpow-prod-down0.0%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{4} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{4}} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      10. pow20.0%

        \[\leadsto {\color{blue}{\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}}^{4} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{4} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
    5. Applied egg-rr0.0%

      \[\leadsto \color{blue}{{\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}^{4} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{4}} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
    6. Step-by-step derivation
      1. *-commutative0.0%

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

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

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

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

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

        \[\leadsto {\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}^{\color{blue}{\left(\frac{4}{2}\right)}} \cdot \left({\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}^{\left(\frac{4}{2}\right)} \cdot {\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}^{\left(\frac{4}{2}\right)}\right) + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      7. cube-unmult0.0%

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

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

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

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

        \[\leadsto {\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{\color{blue}{4}}\right)}^{3} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
    7. Simplified0.0%

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

      \[\leadsto \color{blue}{4 \cdot {a}^{2} + 4 \cdot {a}^{3}} \]
    9. Step-by-step derivation
      1. distribute-lft-out0.0%

        \[\leadsto \color{blue}{4 \cdot \left({a}^{2} + {a}^{3}\right)} \]
      2. *-lft-identity0.0%

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

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

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

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

        \[\leadsto 4 \cdot \color{blue}{\left(1 \cdot {a}^{2} + a \cdot {a}^{2}\right)} \]
      7. *-lft-identity0.0%

        \[\leadsto 4 \cdot \left(\color{blue}{{a}^{2}} + a \cdot {a}^{2}\right) \]
      8. unpow20.0%

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

        \[\leadsto 4 \cdot \left(a \cdot a + a \cdot \color{blue}{\left(a \cdot a\right)}\right) \]
      10. cube-mult0.0%

        \[\leadsto 4 \cdot \left(a \cdot a + \color{blue}{{a}^{3}}\right) \]
    10. Simplified0.0%

      \[\leadsto \color{blue}{4 \cdot \left(a \cdot a + {a}^{3}\right)} \]
    11. Taylor expanded in a around 0 100.0%

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

        \[\leadsto 4 \cdot \color{blue}{\left(a \cdot a\right)} \]
      2. *-commutative100.0%

        \[\leadsto \color{blue}{\left(a \cdot a\right) \cdot 4} \]
      3. associate-*r*100.0%

        \[\leadsto \color{blue}{a \cdot \left(a \cdot 4\right)} \]
      4. *-commutative100.0%

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

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

    if -6.2e153 < a < 3.4e102

    1. Initial program 87.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+87.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)} \]
      2. fma-def87.8%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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. Simplified92.2%

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

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

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

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

        \[\leadsto {\left(\mathsf{hypot}\left(a, b\right) \cdot \color{blue}{\mathsf{hypot}\left(a, b\right)}\right)}^{2} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      5. pow-prod-down92.2%

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\right)\right)} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      9. expm1-udef90.1%

        \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left({\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\right)} - 1\right)} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
    5. Applied egg-rr90.1%

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

      \[\leadsto \left(e^{\mathsf{log1p}\left({\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\right)} - 1\right) + \left(4 \cdot \color{blue}{{b}^{2}} - 1\right) \]
    7. Step-by-step derivation
      1. unpow297.2%

        \[\leadsto \left(e^{\mathsf{log1p}\left({\left(\mathsf{hypot}\left(a, b\right)\right)}^{4}\right)} - 1\right) + \left(4 \cdot \color{blue}{\left(b \cdot b\right)} - 1\right) \]
    8. Simplified97.2%

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

      \[\leadsto \color{blue}{{b}^{4}} + \left(4 \cdot \left(b \cdot b\right) - 1\right) \]
    10. Step-by-step derivation
      1. associate-+r-78.9%

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

        \[\leadsto \left(\color{blue}{{b}^{\left(\frac{4}{2}\right)} \cdot {b}^{\left(\frac{4}{2}\right)}} + 4 \cdot \left(b \cdot b\right)\right) - 1 \]
      3. metadata-eval78.8%

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

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

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

        \[\leadsto \left(\left(b \cdot b\right) \cdot \color{blue}{\left(b \cdot b\right)} + 4 \cdot \left(b \cdot b\right)\right) - 1 \]
      7. distribute-rgt-out78.8%

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

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

    if 3.4e102 < a

    1. Initial program 70.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+70.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)} \]
      2. fma-def70.3%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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.3%

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

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

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

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

        \[\leadsto {\left(\mathsf{hypot}\left(a, b\right) \cdot \color{blue}{\mathsf{hypot}\left(a, b\right)}\right)}^{2} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      5. pow-prod-down70.3%

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

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

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

        \[\leadsto {\color{blue}{\left(\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right) \cdot \sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}}^{4} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      9. unpow-prod-down70.3%

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

        \[\leadsto {\color{blue}{\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}}^{4} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{4} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
    5. Applied egg-rr70.3%

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

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

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

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

        \[\leadsto \left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right) \cdot \color{blue}{\left({\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}^{\left(\frac{4}{2}\right)} \cdot {\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}^{\left(\frac{4}{2}\right)}\right)} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      5. unpow270.3%

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

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

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

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

        \[\leadsto {\color{blue}{\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}}^{3} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      10. pow-sqr70.3%

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

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

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

      \[\leadsto \color{blue}{4 \cdot {a}^{2} + 4 \cdot {a}^{3}} \]
    9. Step-by-step derivation
      1. distribute-lft-out100.0%

        \[\leadsto \color{blue}{4 \cdot \left({a}^{2} + {a}^{3}\right)} \]
      2. *-lft-identity100.0%

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

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

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

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

        \[\leadsto 4 \cdot \color{blue}{\left(1 \cdot {a}^{2} + a \cdot {a}^{2}\right)} \]
      7. *-lft-identity100.0%

        \[\leadsto 4 \cdot \left(\color{blue}{{a}^{2}} + a \cdot {a}^{2}\right) \]
      8. unpow2100.0%

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

        \[\leadsto 4 \cdot \left(a \cdot a + a \cdot \color{blue}{\left(a \cdot a\right)}\right) \]
      10. cube-mult100.0%

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

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

        \[\leadsto 4 \cdot \left(a \cdot a + \color{blue}{a \cdot \left(a \cdot a\right)}\right) \]
      2. distribute-rgt1-in100.0%

        \[\leadsto 4 \cdot \color{blue}{\left(\left(a + 1\right) \cdot \left(a \cdot a\right)\right)} \]
    12. Applied egg-rr100.0%

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

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

Alternative 11: 49.8% accurate, 14.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -5.1 \cdot 10^{-20} \lor \neg \left(a \leq 3 \cdot 10^{-9}\right):\\ \;\;\;\;a \cdot \left(a \cdot 4\right)\\ \mathbf{else}:\\ \;\;\;\;-1\\ \end{array} \end{array} \]
(FPCore (a b)
 :precision binary64
 (if (or (<= a -5.1e-20) (not (<= a 3e-9))) (* a (* a 4.0)) -1.0))
double code(double a, double b) {
	double tmp;
	if ((a <= -5.1e-20) || !(a <= 3e-9)) {
		tmp = a * (a * 4.0);
	} else {
		tmp = -1.0;
	}
	return tmp;
}
real(8) function code(a, b)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if ((a <= (-5.1d-20)) .or. (.not. (a <= 3d-9))) then
        tmp = a * (a * 4.0d0)
    else
        tmp = -1.0d0
    end if
    code = tmp
end function
public static double code(double a, double b) {
	double tmp;
	if ((a <= -5.1e-20) || !(a <= 3e-9)) {
		tmp = a * (a * 4.0);
	} else {
		tmp = -1.0;
	}
	return tmp;
}
def code(a, b):
	tmp = 0
	if (a <= -5.1e-20) or not (a <= 3e-9):
		tmp = a * (a * 4.0)
	else:
		tmp = -1.0
	return tmp
function code(a, b)
	tmp = 0.0
	if ((a <= -5.1e-20) || !(a <= 3e-9))
		tmp = Float64(a * Float64(a * 4.0));
	else
		tmp = -1.0;
	end
	return tmp
end
function tmp_2 = code(a, b)
	tmp = 0.0;
	if ((a <= -5.1e-20) || ~((a <= 3e-9)))
		tmp = a * (a * 4.0);
	else
		tmp = -1.0;
	end
	tmp_2 = tmp;
end
code[a_, b_] := If[Or[LessEqual[a, -5.1e-20], N[Not[LessEqual[a, 3e-9]], $MachinePrecision]], N[(a * N[(a * 4.0), $MachinePrecision]), $MachinePrecision], -1.0]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.1 \cdot 10^{-20} \lor \neg \left(a \leq 3 \cdot 10^{-9}\right):\\
\;\;\;\;a \cdot \left(a \cdot 4\right)\\

\mathbf{else}:\\
\;\;\;\;-1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.10000000000000019e-20 or 2.99999999999999998e-9 < a

    1. Initial program 52.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+52.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)} \]
      2. fma-def52.0%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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. Simplified57.5%

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

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

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

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

        \[\leadsto {\left(\mathsf{hypot}\left(a, b\right) \cdot \color{blue}{\mathsf{hypot}\left(a, b\right)}\right)}^{2} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      5. pow-prod-down57.5%

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

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

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

        \[\leadsto {\color{blue}{\left(\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right) \cdot \sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}}^{4} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      9. unpow-prod-down56.9%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{4} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{4}} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
      10. pow256.9%

        \[\leadsto {\color{blue}{\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{2}\right)}}^{4} \cdot {\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{4} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
    5. Applied egg-rr56.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left({\left(\sqrt[3]{\mathsf{hypot}\left(a, b\right)}\right)}^{\color{blue}{4}}\right)}^{3} + \left(4 \cdot \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 + -3 \cdot a\right)\right) - 1\right) \]
    7. Simplified56.9%

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

      \[\leadsto \color{blue}{4 \cdot {a}^{2} + 4 \cdot {a}^{3}} \]
    9. Step-by-step derivation
      1. distribute-lft-out27.3%

        \[\leadsto \color{blue}{4 \cdot \left({a}^{2} + {a}^{3}\right)} \]
      2. *-lft-identity27.3%

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

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

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

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

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

        \[\leadsto 4 \cdot \left(\color{blue}{{a}^{2}} + a \cdot {a}^{2}\right) \]
      8. unpow227.3%

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

        \[\leadsto 4 \cdot \left(a \cdot a + a \cdot \color{blue}{\left(a \cdot a\right)}\right) \]
      10. cube-mult27.3%

        \[\leadsto 4 \cdot \left(a \cdot a + \color{blue}{{a}^{3}}\right) \]
    10. Simplified27.3%

      \[\leadsto \color{blue}{4 \cdot \left(a \cdot a + {a}^{3}\right)} \]
    11. Taylor expanded in a around 0 47.1%

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

        \[\leadsto 4 \cdot \color{blue}{\left(a \cdot a\right)} \]
      2. *-commutative47.1%

        \[\leadsto \color{blue}{\left(a \cdot a\right) \cdot 4} \]
      3. associate-*r*47.1%

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

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

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

    if -5.10000000000000019e-20 < a < 2.99999999999999998e-9

    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. Step-by-step derivation
      1. associate--l+99.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)} \]
      2. fma-def99.9%

        \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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. Simplified99.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.1 \cdot 10^{-20} \lor \neg \left(a \leq 3 \cdot 10^{-9}\right):\\ \;\;\;\;a \cdot \left(a \cdot 4\right)\\ \mathbf{else}:\\ \;\;\;\;-1\\ \end{array} \]

Alternative 12: 24.4% accurate, 130.0× speedup?

\[\begin{array}{l} \\ -1 \end{array} \]
(FPCore (a b) :precision binary64 -1.0)
double code(double a, double b) {
	return -1.0;
}
real(8) function code(a, b)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = -1.0d0
end function
public static double code(double a, double b) {
	return -1.0;
}
def code(a, b):
	return -1.0
function code(a, b)
	return -1.0
end
function tmp = code(a, b)
	tmp = -1.0;
end
code[a_, b_] := -1.0
\begin{array}{l}

\\
-1
\end{array}
Derivation
  1. Initial program 72.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+72.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)} \]
    2. fma-def72.9%

      \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(a, a, b \cdot b\right)\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. Simplified76.1%

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

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

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

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

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

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

    \[\leadsto \color{blue}{-1} \]
  8. Final simplification24.6%

    \[\leadsto -1 \]

Reproduce

?
herbie shell --seed 2023172 
(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))