Graphics.Rendering.Plot.Render.Plot.Legend:renderLegendOutside from plot-0.2.3.4, B

Percentage Accurate: 99.9% → 99.9%
Time: 6.8s
Alternatives: 13
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (+ (* x (+ (+ (+ (+ y z) z) y) t)) (* y 5.0)))
double code(double x, double y, double z, double t) {
	return (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (x * ((((y + z) + z) + y) + t)) + (y * 5.0d0)
end function
public static double code(double x, double y, double z, double t) {
	return (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
}
def code(x, y, z, t):
	return (x * ((((y + z) + z) + y) + t)) + (y * 5.0)
function code(x, y, z, t)
	return Float64(Float64(x * Float64(Float64(Float64(Float64(y + z) + z) + y) + t)) + Float64(y * 5.0))
end
function tmp = code(x, y, z, t)
	tmp = (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
end
code[x_, y_, z_, t_] := N[(N[(x * N[(N[(N[(N[(y + z), $MachinePrecision] + z), $MachinePrecision] + y), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5
\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 13 alternatives:

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

Initial Program: 99.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (+ (* x (+ (+ (+ (+ y z) z) y) t)) (* y 5.0)))
double code(double x, double y, double z, double t) {
	return (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (x * ((((y + z) + z) + y) + t)) + (y * 5.0d0)
end function
public static double code(double x, double y, double z, double t) {
	return (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
}
def code(x, y, z, t):
	return (x * ((((y + z) + z) + y) + t)) + (y * 5.0)
function code(x, y, z, t)
	return Float64(Float64(x * Float64(Float64(Float64(Float64(y + z) + z) + y) + t)) + Float64(y * 5.0))
end
function tmp = code(x, y, z, t)
	tmp = (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
end
code[x_, y_, z_, t_] := N[(N[(x * N[(N[(N[(N[(y + z), $MachinePrecision] + z), $MachinePrecision] + y), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5
\end{array}

Alternative 1: 99.9% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(y, 5, x \cdot \mathsf{fma}\left(y + z, 2, t\right)\right) \end{array} \]
(FPCore (x y z t) :precision binary64 (fma y 5.0 (* x (fma (+ y z) 2.0 t))))
double code(double x, double y, double z, double t) {
	return fma(y, 5.0, (x * fma((y + z), 2.0, t)));
}
function code(x, y, z, t)
	return fma(y, 5.0, Float64(x * fma(Float64(y + z), 2.0, t)))
end
code[x_, y_, z_, t_] := N[(y * 5.0 + N[(x * N[(N[(y + z), $MachinePrecision] * 2.0 + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(y, 5, x \cdot \mathsf{fma}\left(y + z, 2, t\right)\right)
\end{array}
Derivation
  1. Initial program 99.5%

    \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. +-commutative99.5%

      \[\leadsto \color{blue}{y \cdot 5 + x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)} \]
    2. fma-define100.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)\right)} \]
    3. flip-+56.7%

      \[\leadsto \mathsf{fma}\left(y, 5, x \cdot \color{blue}{\frac{\left(\left(\left(y + z\right) + z\right) + y\right) \cdot \left(\left(\left(y + z\right) + z\right) + y\right) - t \cdot t}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}}\right) \]
    4. associate-*r/51.5%

      \[\leadsto \mathsf{fma}\left(y, 5, \color{blue}{\frac{x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) \cdot \left(\left(\left(y + z\right) + z\right) + y\right) - t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}}\right) \]
    5. fma-neg53.4%

      \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \color{blue}{\mathsf{fma}\left(\left(\left(y + z\right) + z\right) + y, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
    6. associate-+l+53.4%

      \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\color{blue}{\left(y + z\right) + \left(z + y\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
    7. +-commutative53.4%

      \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
    8. count-253.4%

      \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\color{blue}{2 \cdot \left(y + z\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
    9. associate-+l+53.4%

      \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \color{blue}{\left(y + z\right) + \left(z + y\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
    10. +-commutative53.4%

      \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \left(y + z\right) + \color{blue}{\left(y + z\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
    11. count-253.4%

      \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \color{blue}{2 \cdot \left(y + z\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
    12. fma-neg51.5%

      \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \color{blue}{\left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
    13. associate-+l+51.6%

      \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\color{blue}{\left(\left(y + z\right) + \left(z + y\right)\right)} - t}\right) \]
    14. +-commutative51.6%

      \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right) - t}\right) \]
    15. count-251.6%

      \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\color{blue}{2 \cdot \left(y + z\right)} - t}\right) \]
  4. Applied egg-rr100.0%

    \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, x \cdot \mathsf{fma}\left(y + z, 2, t\right)\right)} \]
  5. Add Preprocessing

Alternative 2: 99.9% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(x, t + \left(y + z\right) \cdot 2, y \cdot 5\right) \end{array} \]
(FPCore (x y z t) :precision binary64 (fma x (+ t (* (+ y z) 2.0)) (* y 5.0)))
double code(double x, double y, double z, double t) {
	return fma(x, (t + ((y + z) * 2.0)), (y * 5.0));
}
function code(x, y, z, t)
	return fma(x, Float64(t + Float64(Float64(y + z) * 2.0)), Float64(y * 5.0))
end
code[x_, y_, z_, t_] := N[(x * N[(t + N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(x, t + \left(y + z\right) \cdot 2, y \cdot 5\right)
\end{array}
Derivation
  1. Initial program 99.5%

    \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
  2. Step-by-step derivation
    1. fma-define99.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, \left(\left(\left(y + z\right) + z\right) + y\right) + t, y \cdot 5\right)} \]
    2. associate-+l+99.6%

      \[\leadsto \mathsf{fma}\left(x, \color{blue}{\left(\left(y + z\right) + \left(z + y\right)\right)} + t, y \cdot 5\right) \]
    3. +-commutative99.6%

      \[\leadsto \mathsf{fma}\left(x, \left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right) + t, y \cdot 5\right) \]
    4. count-299.6%

      \[\leadsto \mathsf{fma}\left(x, \color{blue}{2 \cdot \left(y + z\right)} + t, y \cdot 5\right) \]
  3. Simplified99.6%

    \[\leadsto \color{blue}{\mathsf{fma}\left(x, 2 \cdot \left(y + z\right) + t, y \cdot 5\right)} \]
  4. Add Preprocessing
  5. Final simplification99.6%

    \[\leadsto \mathsf{fma}\left(x, t + \left(y + z\right) \cdot 2, y \cdot 5\right) \]
  6. Add Preprocessing

Alternative 3: 99.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.1 \cdot 10^{-14} \lor \neg \left(x \leq 1.8 \cdot 10^{-32}\right):\\ \;\;\;\;x \cdot \left(t + \left(\left(y + z\right) \cdot 2 + 5 \cdot \frac{y}{x}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot 5 + x \cdot \left(t + z \cdot 2\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= x -2.1e-14) (not (<= x 1.8e-32)))
   (* x (+ t (+ (* (+ y z) 2.0) (* 5.0 (/ y x)))))
   (+ (* y 5.0) (* x (+ t (* z 2.0))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -2.1e-14) || !(x <= 1.8e-32)) {
		tmp = x * (t + (((y + z) * 2.0) + (5.0 * (y / x))));
	} else {
		tmp = (y * 5.0) + (x * (t + (z * 2.0)));
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((x <= (-2.1d-14)) .or. (.not. (x <= 1.8d-32))) then
        tmp = x * (t + (((y + z) * 2.0d0) + (5.0d0 * (y / x))))
    else
        tmp = (y * 5.0d0) + (x * (t + (z * 2.0d0)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -2.1e-14) || !(x <= 1.8e-32)) {
		tmp = x * (t + (((y + z) * 2.0) + (5.0 * (y / x))));
	} else {
		tmp = (y * 5.0) + (x * (t + (z * 2.0)));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (x <= -2.1e-14) or not (x <= 1.8e-32):
		tmp = x * (t + (((y + z) * 2.0) + (5.0 * (y / x))))
	else:
		tmp = (y * 5.0) + (x * (t + (z * 2.0)))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((x <= -2.1e-14) || !(x <= 1.8e-32))
		tmp = Float64(x * Float64(t + Float64(Float64(Float64(y + z) * 2.0) + Float64(5.0 * Float64(y / x)))));
	else
		tmp = Float64(Float64(y * 5.0) + Float64(x * Float64(t + Float64(z * 2.0))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((x <= -2.1e-14) || ~((x <= 1.8e-32)))
		tmp = x * (t + (((y + z) * 2.0) + (5.0 * (y / x))));
	else
		tmp = (y * 5.0) + (x * (t + (z * 2.0)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -2.1e-14], N[Not[LessEqual[x, 1.8e-32]], $MachinePrecision]], N[(x * N[(t + N[(N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision] + N[(5.0 * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * 5.0), $MachinePrecision] + N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{-14} \lor \neg \left(x \leq 1.8 \cdot 10^{-32}\right):\\
\;\;\;\;x \cdot \left(t + \left(\left(y + z\right) \cdot 2 + 5 \cdot \frac{y}{x}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;y \cdot 5 + x \cdot \left(t + z \cdot 2\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.0999999999999999e-14 or 1.79999999999999996e-32 < x

    1. Initial program 99.2%

      \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
    2. Step-by-step derivation
      1. fma-define99.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x, \left(\left(\left(y + z\right) + z\right) + y\right) + t, y \cdot 5\right)} \]
      2. associate-+l+99.3%

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{\left(\left(y + z\right) + \left(z + y\right)\right)} + t, y \cdot 5\right) \]
      3. +-commutative99.3%

        \[\leadsto \mathsf{fma}\left(x, \left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right) + t, y \cdot 5\right) \]
      4. count-299.3%

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{2 \cdot \left(y + z\right)} + t, y \cdot 5\right) \]
    3. Simplified99.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, 2 \cdot \left(y + z\right) + t, y \cdot 5\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 99.9%

      \[\leadsto \color{blue}{x \cdot \left(t + \left(2 \cdot \left(y + z\right) + 5 \cdot \frac{y}{x}\right)\right)} \]

    if -2.0999999999999999e-14 < x < 1.79999999999999996e-32

    1. Initial program 99.9%

      \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 99.9%

      \[\leadsto x \cdot \left(\color{blue}{2 \cdot z} + t\right) + y \cdot 5 \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.1 \cdot 10^{-14} \lor \neg \left(x \leq 1.8 \cdot 10^{-32}\right):\\ \;\;\;\;x \cdot \left(t + \left(\left(y + z\right) \cdot 2 + 5 \cdot \frac{y}{x}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot 5 + x \cdot \left(t + z \cdot 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 99.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -58000000 \lor \neg \left(x \leq 2.5\right):\\ \;\;\;\;x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot 5 + x \cdot \left(t + z \cdot 2\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= x -58000000.0) (not (<= x 2.5)))
   (* x (+ t (* (+ y z) 2.0)))
   (+ (* y 5.0) (* x (+ t (* z 2.0))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -58000000.0) || !(x <= 2.5)) {
		tmp = x * (t + ((y + z) * 2.0));
	} else {
		tmp = (y * 5.0) + (x * (t + (z * 2.0)));
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((x <= (-58000000.0d0)) .or. (.not. (x <= 2.5d0))) then
        tmp = x * (t + ((y + z) * 2.0d0))
    else
        tmp = (y * 5.0d0) + (x * (t + (z * 2.0d0)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -58000000.0) || !(x <= 2.5)) {
		tmp = x * (t + ((y + z) * 2.0));
	} else {
		tmp = (y * 5.0) + (x * (t + (z * 2.0)));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (x <= -58000000.0) or not (x <= 2.5):
		tmp = x * (t + ((y + z) * 2.0))
	else:
		tmp = (y * 5.0) + (x * (t + (z * 2.0)))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((x <= -58000000.0) || !(x <= 2.5))
		tmp = Float64(x * Float64(t + Float64(Float64(y + z) * 2.0)));
	else
		tmp = Float64(Float64(y * 5.0) + Float64(x * Float64(t + Float64(z * 2.0))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((x <= -58000000.0) || ~((x <= 2.5)))
		tmp = x * (t + ((y + z) * 2.0));
	else
		tmp = (y * 5.0) + (x * (t + (z * 2.0)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -58000000.0], N[Not[LessEqual[x, 2.5]], $MachinePrecision]], N[(x * N[(t + N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * 5.0), $MachinePrecision] + N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -58000000 \lor \neg \left(x \leq 2.5\right):\\
\;\;\;\;x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\

\mathbf{else}:\\
\;\;\;\;y \cdot 5 + x \cdot \left(t + z \cdot 2\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.8e7 or 2.5 < x

    1. Initial program 99.2%

      \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
    2. Step-by-step derivation
      1. fma-define99.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x, \left(\left(\left(y + z\right) + z\right) + y\right) + t, y \cdot 5\right)} \]
      2. associate-+l+99.2%

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{\left(\left(y + z\right) + \left(z + y\right)\right)} + t, y \cdot 5\right) \]
      3. +-commutative99.2%

        \[\leadsto \mathsf{fma}\left(x, \left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right) + t, y \cdot 5\right) \]
      4. count-299.2%

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{2 \cdot \left(y + z\right)} + t, y \cdot 5\right) \]
    3. Simplified99.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, 2 \cdot \left(y + z\right) + t, y \cdot 5\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 99.2%

      \[\leadsto \color{blue}{x \cdot \left(t + 2 \cdot \left(y + z\right)\right)} \]

    if -5.8e7 < x < 2.5

    1. Initial program 99.9%

      \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 99.0%

      \[\leadsto x \cdot \left(\color{blue}{2 \cdot z} + t\right) + y \cdot 5 \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -58000000 \lor \neg \left(x \leq 2.5\right):\\ \;\;\;\;x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot 5 + x \cdot \left(t + z \cdot 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 88.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.75 \cdot 10^{-33} \lor \neg \left(x \leq 5.5 \cdot 10^{-87}\right):\\ \;\;\;\;x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot 5 + x \cdot t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= x -2.75e-33) (not (<= x 5.5e-87)))
   (* x (+ t (* (+ y z) 2.0)))
   (+ (* y 5.0) (* x t))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -2.75e-33) || !(x <= 5.5e-87)) {
		tmp = x * (t + ((y + z) * 2.0));
	} else {
		tmp = (y * 5.0) + (x * t);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((x <= (-2.75d-33)) .or. (.not. (x <= 5.5d-87))) then
        tmp = x * (t + ((y + z) * 2.0d0))
    else
        tmp = (y * 5.0d0) + (x * t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -2.75e-33) || !(x <= 5.5e-87)) {
		tmp = x * (t + ((y + z) * 2.0));
	} else {
		tmp = (y * 5.0) + (x * t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (x <= -2.75e-33) or not (x <= 5.5e-87):
		tmp = x * (t + ((y + z) * 2.0))
	else:
		tmp = (y * 5.0) + (x * t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((x <= -2.75e-33) || !(x <= 5.5e-87))
		tmp = Float64(x * Float64(t + Float64(Float64(y + z) * 2.0)));
	else
		tmp = Float64(Float64(y * 5.0) + Float64(x * t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((x <= -2.75e-33) || ~((x <= 5.5e-87)))
		tmp = x * (t + ((y + z) * 2.0));
	else
		tmp = (y * 5.0) + (x * t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -2.75e-33], N[Not[LessEqual[x, 5.5e-87]], $MachinePrecision]], N[(x * N[(t + N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * 5.0), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.75 \cdot 10^{-33} \lor \neg \left(x \leq 5.5 \cdot 10^{-87}\right):\\
\;\;\;\;x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\

\mathbf{else}:\\
\;\;\;\;y \cdot 5 + x \cdot t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.75e-33 or 5.5000000000000004e-87 < x

    1. Initial program 99.3%

      \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
    2. Step-by-step derivation
      1. fma-define99.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x, \left(\left(\left(y + z\right) + z\right) + y\right) + t, y \cdot 5\right)} \]
      2. associate-+l+99.3%

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{\left(\left(y + z\right) + \left(z + y\right)\right)} + t, y \cdot 5\right) \]
      3. +-commutative99.3%

        \[\leadsto \mathsf{fma}\left(x, \left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right) + t, y \cdot 5\right) \]
      4. count-299.3%

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{2 \cdot \left(y + z\right)} + t, y \cdot 5\right) \]
    3. Simplified99.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, 2 \cdot \left(y + z\right) + t, y \cdot 5\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 93.2%

      \[\leadsto \color{blue}{x \cdot \left(t + 2 \cdot \left(y + z\right)\right)} \]

    if -2.75e-33 < x < 5.5000000000000004e-87

    1. Initial program 99.9%

      \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 85.9%

      \[\leadsto \color{blue}{t \cdot x} + y \cdot 5 \]
  3. Recombined 2 regimes into one program.
  4. Final simplification90.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.75 \cdot 10^{-33} \lor \neg \left(x \leq 5.5 \cdot 10^{-87}\right):\\ \;\;\;\;x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot 5 + x \cdot t\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 79.0% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -15000 \lor \neg \left(y \leq 4.1 \cdot 10^{+60}\right):\\ \;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(t + z \cdot 2\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= y -15000.0) (not (<= y 4.1e+60)))
   (* y (+ 5.0 (* x 2.0)))
   (* x (+ t (* z 2.0)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((y <= -15000.0) || !(y <= 4.1e+60)) {
		tmp = y * (5.0 + (x * 2.0));
	} else {
		tmp = x * (t + (z * 2.0));
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((y <= (-15000.0d0)) .or. (.not. (y <= 4.1d+60))) then
        tmp = y * (5.0d0 + (x * 2.0d0))
    else
        tmp = x * (t + (z * 2.0d0))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((y <= -15000.0) || !(y <= 4.1e+60)) {
		tmp = y * (5.0 + (x * 2.0));
	} else {
		tmp = x * (t + (z * 2.0));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (y <= -15000.0) or not (y <= 4.1e+60):
		tmp = y * (5.0 + (x * 2.0))
	else:
		tmp = x * (t + (z * 2.0))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((y <= -15000.0) || !(y <= 4.1e+60))
		tmp = Float64(y * Float64(5.0 + Float64(x * 2.0)));
	else
		tmp = Float64(x * Float64(t + Float64(z * 2.0)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((y <= -15000.0) || ~((y <= 4.1e+60)))
		tmp = y * (5.0 + (x * 2.0));
	else
		tmp = x * (t + (z * 2.0));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -15000.0], N[Not[LessEqual[y, 4.1e+60]], $MachinePrecision]], N[(y * N[(5.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -15000 \lor \neg \left(y \leq 4.1 \cdot 10^{+60}\right):\\
\;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(t + z \cdot 2\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -15000 or 4.1e60 < y

    1. Initial program 99.1%

      \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
    2. Step-by-step derivation
      1. fma-define99.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x, \left(\left(\left(y + z\right) + z\right) + y\right) + t, y \cdot 5\right)} \]
      2. associate-+l+99.1%

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{\left(\left(y + z\right) + \left(z + y\right)\right)} + t, y \cdot 5\right) \]
      3. +-commutative99.1%

        \[\leadsto \mathsf{fma}\left(x, \left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right) + t, y \cdot 5\right) \]
      4. count-299.1%

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{2 \cdot \left(y + z\right)} + t, y \cdot 5\right) \]
    3. Simplified99.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, 2 \cdot \left(y + z\right) + t, y \cdot 5\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 79.2%

      \[\leadsto \color{blue}{y \cdot \left(5 + 2 \cdot x\right)} \]

    if -15000 < y < 4.1e60

    1. Initial program 100.0%

      \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. +-commutative100.0%

        \[\leadsto \color{blue}{y \cdot 5 + x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)} \]
      2. fma-define100.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)\right)} \]
      3. flip-+66.8%

        \[\leadsto \mathsf{fma}\left(y, 5, x \cdot \color{blue}{\frac{\left(\left(\left(y + z\right) + z\right) + y\right) \cdot \left(\left(\left(y + z\right) + z\right) + y\right) - t \cdot t}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}}\right) \]
      4. associate-*r/59.8%

        \[\leadsto \mathsf{fma}\left(y, 5, \color{blue}{\frac{x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) \cdot \left(\left(\left(y + z\right) + z\right) + y\right) - t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}}\right) \]
      5. fma-neg61.4%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \color{blue}{\mathsf{fma}\left(\left(\left(y + z\right) + z\right) + y, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      6. associate-+l+61.4%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\color{blue}{\left(y + z\right) + \left(z + y\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      7. +-commutative61.4%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      8. count-261.4%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\color{blue}{2 \cdot \left(y + z\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      9. associate-+l+61.4%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \color{blue}{\left(y + z\right) + \left(z + y\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      10. +-commutative61.4%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \left(y + z\right) + \color{blue}{\left(y + z\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      11. count-261.4%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \color{blue}{2 \cdot \left(y + z\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      12. fma-neg59.8%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \color{blue}{\left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      13. associate-+l+59.8%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\color{blue}{\left(\left(y + z\right) + \left(z + y\right)\right)} - t}\right) \]
      14. +-commutative59.8%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right) - t}\right) \]
      15. count-259.8%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\color{blue}{2 \cdot \left(y + z\right)} - t}\right) \]
    4. Applied egg-rr100.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, x \cdot \mathsf{fma}\left(y + z, 2, t\right)\right)} \]
    5. Taylor expanded in y around 0 80.1%

      \[\leadsto \color{blue}{x \cdot \left(t + 2 \cdot z\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification79.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -15000 \lor \neg \left(y \leq 4.1 \cdot 10^{+60}\right):\\ \;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(t + z \cdot 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 66.9% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.55 \cdot 10^{-33} \lor \neg \left(x \leq 2.4 \cdot 10^{-92}\right):\\ \;\;\;\;x \cdot \left(t + z \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot 5\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= x -1.55e-33) (not (<= x 2.4e-92)))
   (* x (+ t (* z 2.0)))
   (* y 5.0)))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -1.55e-33) || !(x <= 2.4e-92)) {
		tmp = x * (t + (z * 2.0));
	} else {
		tmp = y * 5.0;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((x <= (-1.55d-33)) .or. (.not. (x <= 2.4d-92))) then
        tmp = x * (t + (z * 2.0d0))
    else
        tmp = y * 5.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -1.55e-33) || !(x <= 2.4e-92)) {
		tmp = x * (t + (z * 2.0));
	} else {
		tmp = y * 5.0;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (x <= -1.55e-33) or not (x <= 2.4e-92):
		tmp = x * (t + (z * 2.0))
	else:
		tmp = y * 5.0
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((x <= -1.55e-33) || !(x <= 2.4e-92))
		tmp = Float64(x * Float64(t + Float64(z * 2.0)));
	else
		tmp = Float64(y * 5.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((x <= -1.55e-33) || ~((x <= 2.4e-92)))
		tmp = x * (t + (z * 2.0));
	else
		tmp = y * 5.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1.55e-33], N[Not[LessEqual[x, 2.4e-92]], $MachinePrecision]], N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * 5.0), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \cdot 10^{-33} \lor \neg \left(x \leq 2.4 \cdot 10^{-92}\right):\\
\;\;\;\;x \cdot \left(t + z \cdot 2\right)\\

\mathbf{else}:\\
\;\;\;\;y \cdot 5\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.54999999999999998e-33 or 2.4000000000000001e-92 < x

    1. Initial program 99.3%

      \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. +-commutative99.3%

        \[\leadsto \color{blue}{y \cdot 5 + x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)} \]
      2. fma-define100.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)\right)} \]
      3. flip-+67.3%

        \[\leadsto \mathsf{fma}\left(y, 5, x \cdot \color{blue}{\frac{\left(\left(\left(y + z\right) + z\right) + y\right) \cdot \left(\left(\left(y + z\right) + z\right) + y\right) - t \cdot t}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}}\right) \]
      4. associate-*r/58.9%

        \[\leadsto \mathsf{fma}\left(y, 5, \color{blue}{\frac{x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) \cdot \left(\left(\left(y + z\right) + z\right) + y\right) - t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}}\right) \]
      5. fma-neg61.7%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \color{blue}{\mathsf{fma}\left(\left(\left(y + z\right) + z\right) + y, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      6. associate-+l+61.7%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\color{blue}{\left(y + z\right) + \left(z + y\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      7. +-commutative61.7%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      8. count-261.7%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\color{blue}{2 \cdot \left(y + z\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      9. associate-+l+61.7%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \color{blue}{\left(y + z\right) + \left(z + y\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      10. +-commutative61.7%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \left(y + z\right) + \color{blue}{\left(y + z\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      11. count-261.7%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \color{blue}{2 \cdot \left(y + z\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      12. fma-neg58.9%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \color{blue}{\left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      13. associate-+l+58.9%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\color{blue}{\left(\left(y + z\right) + \left(z + y\right)\right)} - t}\right) \]
      14. +-commutative58.9%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right) - t}\right) \]
      15. count-258.9%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\color{blue}{2 \cdot \left(y + z\right)} - t}\right) \]
    4. Applied egg-rr100.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, x \cdot \mathsf{fma}\left(y + z, 2, t\right)\right)} \]
    5. Taylor expanded in y around 0 72.7%

      \[\leadsto \color{blue}{x \cdot \left(t + 2 \cdot z\right)} \]

    if -1.54999999999999998e-33 < x < 2.4000000000000001e-92

    1. Initial program 99.9%

      \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. +-commutative99.9%

        \[\leadsto \color{blue}{y \cdot 5 + x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)} \]
      2. fma-define100.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)\right)} \]
      3. flip-+40.4%

        \[\leadsto \mathsf{fma}\left(y, 5, x \cdot \color{blue}{\frac{\left(\left(\left(y + z\right) + z\right) + y\right) \cdot \left(\left(\left(y + z\right) + z\right) + y\right) - t \cdot t}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}}\right) \]
      4. associate-*r/40.3%

        \[\leadsto \mathsf{fma}\left(y, 5, \color{blue}{\frac{x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) \cdot \left(\left(\left(y + z\right) + z\right) + y\right) - t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}}\right) \]
      5. fma-neg40.7%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \color{blue}{\mathsf{fma}\left(\left(\left(y + z\right) + z\right) + y, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      6. associate-+l+40.7%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\color{blue}{\left(y + z\right) + \left(z + y\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      7. +-commutative40.7%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      8. count-240.7%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\color{blue}{2 \cdot \left(y + z\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      9. associate-+l+40.7%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \color{blue}{\left(y + z\right) + \left(z + y\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      10. +-commutative40.7%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \left(y + z\right) + \color{blue}{\left(y + z\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      11. count-240.7%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \color{blue}{2 \cdot \left(y + z\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      12. fma-neg40.3%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \color{blue}{\left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      13. associate-+l+40.3%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\color{blue}{\left(\left(y + z\right) + \left(z + y\right)\right)} - t}\right) \]
      14. +-commutative40.3%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right) - t}\right) \]
      15. count-240.3%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\color{blue}{2 \cdot \left(y + z\right)} - t}\right) \]
    4. Applied egg-rr100.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, x \cdot \mathsf{fma}\left(y + z, 2, t\right)\right)} \]
    5. Taylor expanded in x around 0 69.1%

      \[\leadsto \color{blue}{5 \cdot y} \]
    6. Step-by-step derivation
      1. *-commutative69.1%

        \[\leadsto \color{blue}{y \cdot 5} \]
    7. Simplified69.1%

      \[\leadsto \color{blue}{y \cdot 5} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification71.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.55 \cdot 10^{-33} \lor \neg \left(x \leq 2.4 \cdot 10^{-92}\right):\\ \;\;\;\;x \cdot \left(t + z \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot 5\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 63.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.2 \cdot 10^{-33} \lor \neg \left(x \leq 5.8 \cdot 10^{-16}\right):\\ \;\;\;\;2 \cdot \left(x \cdot \left(y + z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot 5\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= x -2.2e-33) (not (<= x 5.8e-16)))
   (* 2.0 (* x (+ y z)))
   (* y 5.0)))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -2.2e-33) || !(x <= 5.8e-16)) {
		tmp = 2.0 * (x * (y + z));
	} else {
		tmp = y * 5.0;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((x <= (-2.2d-33)) .or. (.not. (x <= 5.8d-16))) then
        tmp = 2.0d0 * (x * (y + z))
    else
        tmp = y * 5.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -2.2e-33) || !(x <= 5.8e-16)) {
		tmp = 2.0 * (x * (y + z));
	} else {
		tmp = y * 5.0;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (x <= -2.2e-33) or not (x <= 5.8e-16):
		tmp = 2.0 * (x * (y + z))
	else:
		tmp = y * 5.0
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((x <= -2.2e-33) || !(x <= 5.8e-16))
		tmp = Float64(2.0 * Float64(x * Float64(y + z)));
	else
		tmp = Float64(y * 5.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((x <= -2.2e-33) || ~((x <= 5.8e-16)))
		tmp = 2.0 * (x * (y + z));
	else
		tmp = y * 5.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -2.2e-33], N[Not[LessEqual[x, 5.8e-16]], $MachinePrecision]], N[(2.0 * N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * 5.0), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{-33} \lor \neg \left(x \leq 5.8 \cdot 10^{-16}\right):\\
\;\;\;\;2 \cdot \left(x \cdot \left(y + z\right)\right)\\

\mathbf{else}:\\
\;\;\;\;y \cdot 5\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.20000000000000005e-33 or 5.7999999999999996e-16 < x

    1. Initial program 99.2%

      \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
    2. Step-by-step derivation
      1. fma-define99.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x, \left(\left(\left(y + z\right) + z\right) + y\right) + t, y \cdot 5\right)} \]
      2. associate-+l+99.3%

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{\left(\left(y + z\right) + \left(z + y\right)\right)} + t, y \cdot 5\right) \]
      3. +-commutative99.3%

        \[\leadsto \mathsf{fma}\left(x, \left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right) + t, y \cdot 5\right) \]
      4. count-299.3%

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{2 \cdot \left(y + z\right)} + t, y \cdot 5\right) \]
    3. Simplified99.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, 2 \cdot \left(y + z\right) + t, y \cdot 5\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 70.1%

      \[\leadsto \color{blue}{2 \cdot \left(x \cdot \left(y + z\right)\right) + 5 \cdot y} \]
    6. Taylor expanded in x around inf 67.4%

      \[\leadsto \color{blue}{2 \cdot \left(x \cdot \left(y + z\right)\right)} \]

    if -2.20000000000000005e-33 < x < 5.7999999999999996e-16

    1. Initial program 99.9%

      \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. +-commutative99.9%

        \[\leadsto \color{blue}{y \cdot 5 + x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)} \]
      2. fma-define100.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)\right)} \]
      3. flip-+41.4%

        \[\leadsto \mathsf{fma}\left(y, 5, x \cdot \color{blue}{\frac{\left(\left(\left(y + z\right) + z\right) + y\right) \cdot \left(\left(\left(y + z\right) + z\right) + y\right) - t \cdot t}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}}\right) \]
      4. associate-*r/41.4%

        \[\leadsto \mathsf{fma}\left(y, 5, \color{blue}{\frac{x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) \cdot \left(\left(\left(y + z\right) + z\right) + y\right) - t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}}\right) \]
      5. fma-neg41.8%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \color{blue}{\mathsf{fma}\left(\left(\left(y + z\right) + z\right) + y, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      6. associate-+l+41.8%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\color{blue}{\left(y + z\right) + \left(z + y\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      7. +-commutative41.8%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      8. count-241.8%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\color{blue}{2 \cdot \left(y + z\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      9. associate-+l+41.8%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \color{blue}{\left(y + z\right) + \left(z + y\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      10. +-commutative41.8%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \left(y + z\right) + \color{blue}{\left(y + z\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      11. count-241.8%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \color{blue}{2 \cdot \left(y + z\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      12. fma-neg41.4%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \color{blue}{\left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      13. associate-+l+41.4%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\color{blue}{\left(\left(y + z\right) + \left(z + y\right)\right)} - t}\right) \]
      14. +-commutative41.4%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right) - t}\right) \]
      15. count-241.4%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\color{blue}{2 \cdot \left(y + z\right)} - t}\right) \]
    4. Applied egg-rr100.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, x \cdot \mathsf{fma}\left(y + z, 2, t\right)\right)} \]
    5. Taylor expanded in x around 0 65.0%

      \[\leadsto \color{blue}{5 \cdot y} \]
    6. Step-by-step derivation
      1. *-commutative65.0%

        \[\leadsto \color{blue}{y \cdot 5} \]
    7. Simplified65.0%

      \[\leadsto \color{blue}{y \cdot 5} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification66.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.2 \cdot 10^{-33} \lor \neg \left(x \leq 5.8 \cdot 10^{-16}\right):\\ \;\;\;\;2 \cdot \left(x \cdot \left(y + z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot 5\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 64.1% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.9 \cdot 10^{-30}:\\ \;\;\;\;x \cdot \left(t + y \cdot 2\right)\\ \mathbf{elif}\;x \leq 4.8 \cdot 10^{-16}:\\ \;\;\;\;y \cdot 5\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot \left(y + z\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= x -2.9e-30)
   (* x (+ t (* y 2.0)))
   (if (<= x 4.8e-16) (* y 5.0) (* 2.0 (* x (+ y z))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -2.9e-30) {
		tmp = x * (t + (y * 2.0));
	} else if (x <= 4.8e-16) {
		tmp = y * 5.0;
	} else {
		tmp = 2.0 * (x * (y + z));
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (x <= (-2.9d-30)) then
        tmp = x * (t + (y * 2.0d0))
    else if (x <= 4.8d-16) then
        tmp = y * 5.0d0
    else
        tmp = 2.0d0 * (x * (y + z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -2.9e-30) {
		tmp = x * (t + (y * 2.0));
	} else if (x <= 4.8e-16) {
		tmp = y * 5.0;
	} else {
		tmp = 2.0 * (x * (y + z));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if x <= -2.9e-30:
		tmp = x * (t + (y * 2.0))
	elif x <= 4.8e-16:
		tmp = y * 5.0
	else:
		tmp = 2.0 * (x * (y + z))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (x <= -2.9e-30)
		tmp = Float64(x * Float64(t + Float64(y * 2.0)));
	elseif (x <= 4.8e-16)
		tmp = Float64(y * 5.0);
	else
		tmp = Float64(2.0 * Float64(x * Float64(y + z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (x <= -2.9e-30)
		tmp = x * (t + (y * 2.0));
	elseif (x <= 4.8e-16)
		tmp = y * 5.0;
	else
		tmp = 2.0 * (x * (y + z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[x, -2.9e-30], N[(x * N[(t + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.8e-16], N[(y * 5.0), $MachinePrecision], N[(2.0 * N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.9 \cdot 10^{-30}:\\
\;\;\;\;x \cdot \left(t + y \cdot 2\right)\\

\mathbf{elif}\;x \leq 4.8 \cdot 10^{-16}:\\
\;\;\;\;y \cdot 5\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot \left(y + z\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.89999999999999989e-30

    1. Initial program 98.5%

      \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
    2. Step-by-step derivation
      1. fma-define98.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x, \left(\left(\left(y + z\right) + z\right) + y\right) + t, y \cdot 5\right)} \]
      2. associate-+l+98.5%

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{\left(\left(y + z\right) + \left(z + y\right)\right)} + t, y \cdot 5\right) \]
      3. +-commutative98.5%

        \[\leadsto \mathsf{fma}\left(x, \left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right) + t, y \cdot 5\right) \]
      4. count-298.5%

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{2 \cdot \left(y + z\right)} + t, y \cdot 5\right) \]
    3. Simplified98.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, 2 \cdot \left(y + z\right) + t, y \cdot 5\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 97.0%

      \[\leadsto \color{blue}{x \cdot \left(t + 2 \cdot \left(y + z\right)\right)} \]
    6. Taylor expanded in y around inf 65.9%

      \[\leadsto x \cdot \left(t + 2 \cdot \color{blue}{y}\right) \]

    if -2.89999999999999989e-30 < x < 4.8000000000000001e-16

    1. Initial program 99.9%

      \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. +-commutative99.9%

        \[\leadsto \color{blue}{y \cdot 5 + x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)} \]
      2. fma-define100.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)\right)} \]
      3. flip-+41.1%

        \[\leadsto \mathsf{fma}\left(y, 5, x \cdot \color{blue}{\frac{\left(\left(\left(y + z\right) + z\right) + y\right) \cdot \left(\left(\left(y + z\right) + z\right) + y\right) - t \cdot t}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}}\right) \]
      4. associate-*r/41.1%

        \[\leadsto \mathsf{fma}\left(y, 5, \color{blue}{\frac{x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) \cdot \left(\left(\left(y + z\right) + z\right) + y\right) - t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}}\right) \]
      5. fma-neg41.5%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \color{blue}{\mathsf{fma}\left(\left(\left(y + z\right) + z\right) + y, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      6. associate-+l+41.5%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\color{blue}{\left(y + z\right) + \left(z + y\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      7. +-commutative41.5%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      8. count-241.5%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\color{blue}{2 \cdot \left(y + z\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      9. associate-+l+41.5%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \color{blue}{\left(y + z\right) + \left(z + y\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      10. +-commutative41.5%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \left(y + z\right) + \color{blue}{\left(y + z\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      11. count-241.5%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \color{blue}{2 \cdot \left(y + z\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      12. fma-neg41.1%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \color{blue}{\left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      13. associate-+l+41.1%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\color{blue}{\left(\left(y + z\right) + \left(z + y\right)\right)} - t}\right) \]
      14. +-commutative41.1%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right) - t}\right) \]
      15. count-241.1%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\color{blue}{2 \cdot \left(y + z\right)} - t}\right) \]
    4. Applied egg-rr100.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, x \cdot \mathsf{fma}\left(y + z, 2, t\right)\right)} \]
    5. Taylor expanded in x around 0 64.5%

      \[\leadsto \color{blue}{5 \cdot y} \]
    6. Step-by-step derivation
      1. *-commutative64.5%

        \[\leadsto \color{blue}{y \cdot 5} \]
    7. Simplified64.5%

      \[\leadsto \color{blue}{y \cdot 5} \]

    if 4.8000000000000001e-16 < x

    1. Initial program 100.0%

      \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
    2. Step-by-step derivation
      1. fma-define100.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x, \left(\left(\left(y + z\right) + z\right) + y\right) + t, y \cdot 5\right)} \]
      2. associate-+l+100.0%

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{\left(\left(y + z\right) + \left(z + y\right)\right)} + t, y \cdot 5\right) \]
      3. +-commutative100.0%

        \[\leadsto \mathsf{fma}\left(x, \left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right) + t, y \cdot 5\right) \]
      4. count-2100.0%

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{2 \cdot \left(y + z\right)} + t, y \cdot 5\right) \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, 2 \cdot \left(y + z\right) + t, y \cdot 5\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 77.3%

      \[\leadsto \color{blue}{2 \cdot \left(x \cdot \left(y + z\right)\right) + 5 \cdot y} \]
    6. Taylor expanded in x around inf 73.2%

      \[\leadsto \color{blue}{2 \cdot \left(x \cdot \left(y + z\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification67.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.9 \cdot 10^{-30}:\\ \;\;\;\;x \cdot \left(t + y \cdot 2\right)\\ \mathbf{elif}\;x \leq 4.8 \cdot 10^{-16}:\\ \;\;\;\;y \cdot 5\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot \left(y + z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 48.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.3 \cdot 10^{-28}:\\ \;\;\;\;x \cdot t\\ \mathbf{elif}\;x \leq 10^{-15}:\\ \;\;\;\;y \cdot 5\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(z \cdot 2\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= x -1.3e-28) (* x t) (if (<= x 1e-15) (* y 5.0) (* x (* z 2.0)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -1.3e-28) {
		tmp = x * t;
	} else if (x <= 1e-15) {
		tmp = y * 5.0;
	} else {
		tmp = x * (z * 2.0);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (x <= (-1.3d-28)) then
        tmp = x * t
    else if (x <= 1d-15) then
        tmp = y * 5.0d0
    else
        tmp = x * (z * 2.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -1.3e-28) {
		tmp = x * t;
	} else if (x <= 1e-15) {
		tmp = y * 5.0;
	} else {
		tmp = x * (z * 2.0);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if x <= -1.3e-28:
		tmp = x * t
	elif x <= 1e-15:
		tmp = y * 5.0
	else:
		tmp = x * (z * 2.0)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (x <= -1.3e-28)
		tmp = Float64(x * t);
	elseif (x <= 1e-15)
		tmp = Float64(y * 5.0);
	else
		tmp = Float64(x * Float64(z * 2.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (x <= -1.3e-28)
		tmp = x * t;
	elseif (x <= 1e-15)
		tmp = y * 5.0;
	else
		tmp = x * (z * 2.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.3e-28], N[(x * t), $MachinePrecision], If[LessEqual[x, 1e-15], N[(y * 5.0), $MachinePrecision], N[(x * N[(z * 2.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.3 \cdot 10^{-28}:\\
\;\;\;\;x \cdot t\\

\mathbf{elif}\;x \leq 10^{-15}:\\
\;\;\;\;y \cdot 5\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(z \cdot 2\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.3e-28

    1. Initial program 98.5%

      \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. +-commutative98.5%

        \[\leadsto \color{blue}{y \cdot 5 + x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)} \]
      2. fma-define100.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)\right)} \]
      3. flip-+73.2%

        \[\leadsto \mathsf{fma}\left(y, 5, x \cdot \color{blue}{\frac{\left(\left(\left(y + z\right) + z\right) + y\right) \cdot \left(\left(\left(y + z\right) + z\right) + y\right) - t \cdot t}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}}\right) \]
      4. associate-*r/66.2%

        \[\leadsto \mathsf{fma}\left(y, 5, \color{blue}{\frac{x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) \cdot \left(\left(\left(y + z\right) + z\right) + y\right) - t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}}\right) \]
      5. fma-neg70.8%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \color{blue}{\mathsf{fma}\left(\left(\left(y + z\right) + z\right) + y, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      6. associate-+l+70.8%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\color{blue}{\left(y + z\right) + \left(z + y\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      7. +-commutative70.8%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      8. count-270.8%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\color{blue}{2 \cdot \left(y + z\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      9. associate-+l+70.8%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \color{blue}{\left(y + z\right) + \left(z + y\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      10. +-commutative70.8%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \left(y + z\right) + \color{blue}{\left(y + z\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      11. count-270.8%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \color{blue}{2 \cdot \left(y + z\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      12. fma-neg66.2%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \color{blue}{\left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      13. associate-+l+66.2%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\color{blue}{\left(\left(y + z\right) + \left(z + y\right)\right)} - t}\right) \]
      14. +-commutative66.2%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right) - t}\right) \]
      15. count-266.2%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\color{blue}{2 \cdot \left(y + z\right)} - t}\right) \]
    4. Applied egg-rr100.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, x \cdot \mathsf{fma}\left(y + z, 2, t\right)\right)} \]
    5. Taylor expanded in t around inf 43.3%

      \[\leadsto \color{blue}{t \cdot x} \]
    6. Step-by-step derivation
      1. *-commutative43.3%

        \[\leadsto \color{blue}{x \cdot t} \]
    7. Simplified43.3%

      \[\leadsto \color{blue}{x \cdot t} \]

    if -1.3e-28 < x < 1.0000000000000001e-15

    1. Initial program 99.9%

      \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. +-commutative99.9%

        \[\leadsto \color{blue}{y \cdot 5 + x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)} \]
      2. fma-define100.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)\right)} \]
      3. flip-+41.1%

        \[\leadsto \mathsf{fma}\left(y, 5, x \cdot \color{blue}{\frac{\left(\left(\left(y + z\right) + z\right) + y\right) \cdot \left(\left(\left(y + z\right) + z\right) + y\right) - t \cdot t}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}}\right) \]
      4. associate-*r/41.1%

        \[\leadsto \mathsf{fma}\left(y, 5, \color{blue}{\frac{x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) \cdot \left(\left(\left(y + z\right) + z\right) + y\right) - t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}}\right) \]
      5. fma-neg41.5%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \color{blue}{\mathsf{fma}\left(\left(\left(y + z\right) + z\right) + y, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      6. associate-+l+41.5%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\color{blue}{\left(y + z\right) + \left(z + y\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      7. +-commutative41.5%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      8. count-241.5%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\color{blue}{2 \cdot \left(y + z\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      9. associate-+l+41.5%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \color{blue}{\left(y + z\right) + \left(z + y\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      10. +-commutative41.5%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \left(y + z\right) + \color{blue}{\left(y + z\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      11. count-241.5%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \color{blue}{2 \cdot \left(y + z\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      12. fma-neg41.1%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \color{blue}{\left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      13. associate-+l+41.1%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\color{blue}{\left(\left(y + z\right) + \left(z + y\right)\right)} - t}\right) \]
      14. +-commutative41.1%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right) - t}\right) \]
      15. count-241.1%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\color{blue}{2 \cdot \left(y + z\right)} - t}\right) \]
    4. Applied egg-rr100.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, x \cdot \mathsf{fma}\left(y + z, 2, t\right)\right)} \]
    5. Taylor expanded in x around 0 64.5%

      \[\leadsto \color{blue}{5 \cdot y} \]
    6. Step-by-step derivation
      1. *-commutative64.5%

        \[\leadsto \color{blue}{y \cdot 5} \]
    7. Simplified64.5%

      \[\leadsto \color{blue}{y \cdot 5} \]

    if 1.0000000000000001e-15 < x

    1. Initial program 100.0%

      \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. +-commutative100.0%

        \[\leadsto \color{blue}{y \cdot 5 + x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)} \]
      2. fma-define100.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)\right)} \]
      3. flip-+66.4%

        \[\leadsto \mathsf{fma}\left(y, 5, x \cdot \color{blue}{\frac{\left(\left(\left(y + z\right) + z\right) + y\right) \cdot \left(\left(\left(y + z\right) + z\right) + y\right) - t \cdot t}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}}\right) \]
      4. associate-*r/54.7%

        \[\leadsto \mathsf{fma}\left(y, 5, \color{blue}{\frac{x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) \cdot \left(\left(\left(y + z\right) + z\right) + y\right) - t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}}\right) \]
      5. fma-neg56.3%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \color{blue}{\mathsf{fma}\left(\left(\left(y + z\right) + z\right) + y, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      6. associate-+l+56.3%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\color{blue}{\left(y + z\right) + \left(z + y\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      7. +-commutative56.3%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      8. count-256.3%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\color{blue}{2 \cdot \left(y + z\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      9. associate-+l+56.3%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \color{blue}{\left(y + z\right) + \left(z + y\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      10. +-commutative56.3%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \left(y + z\right) + \color{blue}{\left(y + z\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      11. count-256.3%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \color{blue}{2 \cdot \left(y + z\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      12. fma-neg54.7%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \color{blue}{\left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      13. associate-+l+54.7%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\color{blue}{\left(\left(y + z\right) + \left(z + y\right)\right)} - t}\right) \]
      14. +-commutative54.7%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right) - t}\right) \]
      15. count-254.7%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\color{blue}{2 \cdot \left(y + z\right)} - t}\right) \]
    4. Applied egg-rr100.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, x \cdot \mathsf{fma}\left(y + z, 2, t\right)\right)} \]
    5. Taylor expanded in z around inf 46.5%

      \[\leadsto \color{blue}{2 \cdot \left(x \cdot z\right)} \]
    6. Step-by-step derivation
      1. associate-*r*46.5%

        \[\leadsto \color{blue}{\left(2 \cdot x\right) \cdot z} \]
      2. *-commutative46.5%

        \[\leadsto \color{blue}{\left(x \cdot 2\right)} \cdot z \]
      3. associate-*r*46.5%

        \[\leadsto \color{blue}{x \cdot \left(2 \cdot z\right)} \]
    7. Simplified46.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.3 \cdot 10^{-28}:\\ \;\;\;\;x \cdot t\\ \mathbf{elif}\;x \leq 10^{-15}:\\ \;\;\;\;y \cdot 5\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(z \cdot 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 99.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ y \cdot 5 + x \cdot \left(t + \left(y + \left(z + \left(y + z\right)\right)\right)\right) \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (+ (* y 5.0) (* x (+ t (+ y (+ z (+ y z)))))))
double code(double x, double y, double z, double t) {
	return (y * 5.0) + (x * (t + (y + (z + (y + z)))));
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (y * 5.0d0) + (x * (t + (y + (z + (y + z)))))
end function
public static double code(double x, double y, double z, double t) {
	return (y * 5.0) + (x * (t + (y + (z + (y + z)))));
}
def code(x, y, z, t):
	return (y * 5.0) + (x * (t + (y + (z + (y + z)))))
function code(x, y, z, t)
	return Float64(Float64(y * 5.0) + Float64(x * Float64(t + Float64(y + Float64(z + Float64(y + z))))))
end
function tmp = code(x, y, z, t)
	tmp = (y * 5.0) + (x * (t + (y + (z + (y + z)))));
end
code[x_, y_, z_, t_] := N[(N[(y * 5.0), $MachinePrecision] + N[(x * N[(t + N[(y + N[(z + N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
y \cdot 5 + x \cdot \left(t + \left(y + \left(z + \left(y + z\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 99.5%

    \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
  2. Add Preprocessing
  3. Final simplification99.5%

    \[\leadsto y \cdot 5 + x \cdot \left(t + \left(y + \left(z + \left(y + z\right)\right)\right)\right) \]
  4. Add Preprocessing

Alternative 12: 48.4% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -4.5 \cdot 10^{-25} \lor \neg \left(x \leq 0.018\right):\\ \;\;\;\;x \cdot t\\ \mathbf{else}:\\ \;\;\;\;y \cdot 5\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= x -4.5e-25) (not (<= x 0.018))) (* x t) (* y 5.0)))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -4.5e-25) || !(x <= 0.018)) {
		tmp = x * t;
	} else {
		tmp = y * 5.0;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((x <= (-4.5d-25)) .or. (.not. (x <= 0.018d0))) then
        tmp = x * t
    else
        tmp = y * 5.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -4.5e-25) || !(x <= 0.018)) {
		tmp = x * t;
	} else {
		tmp = y * 5.0;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (x <= -4.5e-25) or not (x <= 0.018):
		tmp = x * t
	else:
		tmp = y * 5.0
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((x <= -4.5e-25) || !(x <= 0.018))
		tmp = Float64(x * t);
	else
		tmp = Float64(y * 5.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((x <= -4.5e-25) || ~((x <= 0.018)))
		tmp = x * t;
	else
		tmp = y * 5.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -4.5e-25], N[Not[LessEqual[x, 0.018]], $MachinePrecision]], N[(x * t), $MachinePrecision], N[(y * 5.0), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.5 \cdot 10^{-25} \lor \neg \left(x \leq 0.018\right):\\
\;\;\;\;x \cdot t\\

\mathbf{else}:\\
\;\;\;\;y \cdot 5\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.5000000000000001e-25 or 0.0179999999999999986 < x

    1. Initial program 99.2%

      \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. +-commutative99.2%

        \[\leadsto \color{blue}{y \cdot 5 + x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)} \]
      2. fma-define100.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)\right)} \]
      3. flip-+71.8%

        \[\leadsto \mathsf{fma}\left(y, 5, x \cdot \color{blue}{\frac{\left(\left(\left(y + z\right) + z\right) + y\right) \cdot \left(\left(\left(y + z\right) + z\right) + y\right) - t \cdot t}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}}\right) \]
      4. associate-*r/61.9%

        \[\leadsto \mathsf{fma}\left(y, 5, \color{blue}{\frac{x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) \cdot \left(\left(\left(y + z\right) + z\right) + y\right) - t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}}\right) \]
      5. fma-neg65.1%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \color{blue}{\mathsf{fma}\left(\left(\left(y + z\right) + z\right) + y, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      6. associate-+l+65.1%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\color{blue}{\left(y + z\right) + \left(z + y\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      7. +-commutative65.1%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      8. count-265.1%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\color{blue}{2 \cdot \left(y + z\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      9. associate-+l+65.1%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \color{blue}{\left(y + z\right) + \left(z + y\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      10. +-commutative65.1%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \left(y + z\right) + \color{blue}{\left(y + z\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      11. count-265.1%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \color{blue}{2 \cdot \left(y + z\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      12. fma-neg61.9%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \color{blue}{\left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      13. associate-+l+61.9%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\color{blue}{\left(\left(y + z\right) + \left(z + y\right)\right)} - t}\right) \]
      14. +-commutative61.9%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right) - t}\right) \]
      15. count-261.9%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\color{blue}{2 \cdot \left(y + z\right)} - t}\right) \]
    4. Applied egg-rr100.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, x \cdot \mathsf{fma}\left(y + z, 2, t\right)\right)} \]
    5. Taylor expanded in t around inf 38.5%

      \[\leadsto \color{blue}{t \cdot x} \]
    6. Step-by-step derivation
      1. *-commutative38.5%

        \[\leadsto \color{blue}{x \cdot t} \]
    7. Simplified38.5%

      \[\leadsto \color{blue}{x \cdot t} \]

    if -4.5000000000000001e-25 < x < 0.0179999999999999986

    1. Initial program 99.9%

      \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. +-commutative99.9%

        \[\leadsto \color{blue}{y \cdot 5 + x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)} \]
      2. fma-define100.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)\right)} \]
      3. flip-+40.6%

        \[\leadsto \mathsf{fma}\left(y, 5, x \cdot \color{blue}{\frac{\left(\left(\left(y + z\right) + z\right) + y\right) \cdot \left(\left(\left(y + z\right) + z\right) + y\right) - t \cdot t}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}}\right) \]
      4. associate-*r/40.5%

        \[\leadsto \mathsf{fma}\left(y, 5, \color{blue}{\frac{x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) \cdot \left(\left(\left(y + z\right) + z\right) + y\right) - t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}}\right) \]
      5. fma-neg41.0%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \color{blue}{\mathsf{fma}\left(\left(\left(y + z\right) + z\right) + y, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      6. associate-+l+41.0%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\color{blue}{\left(y + z\right) + \left(z + y\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      7. +-commutative41.0%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      8. count-241.0%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\color{blue}{2 \cdot \left(y + z\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      9. associate-+l+41.0%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \color{blue}{\left(y + z\right) + \left(z + y\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      10. +-commutative41.0%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \left(y + z\right) + \color{blue}{\left(y + z\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      11. count-241.0%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \color{blue}{2 \cdot \left(y + z\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      12. fma-neg40.5%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \color{blue}{\left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
      13. associate-+l+40.5%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\color{blue}{\left(\left(y + z\right) + \left(z + y\right)\right)} - t}\right) \]
      14. +-commutative40.5%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right) - t}\right) \]
      15. count-240.5%

        \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\color{blue}{2 \cdot \left(y + z\right)} - t}\right) \]
    4. Applied egg-rr100.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, x \cdot \mathsf{fma}\left(y + z, 2, t\right)\right)} \]
    5. Taylor expanded in x around 0 62.1%

      \[\leadsto \color{blue}{5 \cdot y} \]
    6. Step-by-step derivation
      1. *-commutative62.1%

        \[\leadsto \color{blue}{y \cdot 5} \]
    7. Simplified62.1%

      \[\leadsto \color{blue}{y \cdot 5} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification49.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.5 \cdot 10^{-25} \lor \neg \left(x \leq 0.018\right):\\ \;\;\;\;x \cdot t\\ \mathbf{else}:\\ \;\;\;\;y \cdot 5\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 30.3% accurate, 5.0× speedup?

\[\begin{array}{l} \\ x \cdot t \end{array} \]
(FPCore (x y z t) :precision binary64 (* x t))
double code(double x, double y, double z, double t) {
	return x * t;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x * t
end function
public static double code(double x, double y, double z, double t) {
	return x * t;
}
def code(x, y, z, t):
	return x * t
function code(x, y, z, t)
	return Float64(x * t)
end
function tmp = code(x, y, z, t)
	tmp = x * t;
end
code[x_, y_, z_, t_] := N[(x * t), $MachinePrecision]
\begin{array}{l}

\\
x \cdot t
\end{array}
Derivation
  1. Initial program 99.5%

    \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. +-commutative99.5%

      \[\leadsto \color{blue}{y \cdot 5 + x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)} \]
    2. fma-define100.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)\right)} \]
    3. flip-+56.7%

      \[\leadsto \mathsf{fma}\left(y, 5, x \cdot \color{blue}{\frac{\left(\left(\left(y + z\right) + z\right) + y\right) \cdot \left(\left(\left(y + z\right) + z\right) + y\right) - t \cdot t}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}}\right) \]
    4. associate-*r/51.5%

      \[\leadsto \mathsf{fma}\left(y, 5, \color{blue}{\frac{x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) \cdot \left(\left(\left(y + z\right) + z\right) + y\right) - t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}}\right) \]
    5. fma-neg53.4%

      \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \color{blue}{\mathsf{fma}\left(\left(\left(y + z\right) + z\right) + y, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
    6. associate-+l+53.4%

      \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\color{blue}{\left(y + z\right) + \left(z + y\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
    7. +-commutative53.4%

      \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
    8. count-253.4%

      \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(\color{blue}{2 \cdot \left(y + z\right)}, \left(\left(y + z\right) + z\right) + y, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
    9. associate-+l+53.4%

      \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \color{blue}{\left(y + z\right) + \left(z + y\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
    10. +-commutative53.4%

      \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \left(y + z\right) + \color{blue}{\left(y + z\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
    11. count-253.4%

      \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \mathsf{fma}\left(2 \cdot \left(y + z\right), \color{blue}{2 \cdot \left(y + z\right)}, -t \cdot t\right)}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
    12. fma-neg51.5%

      \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \color{blue}{\left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}}{\left(\left(\left(y + z\right) + z\right) + y\right) - t}\right) \]
    13. associate-+l+51.6%

      \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\color{blue}{\left(\left(y + z\right) + \left(z + y\right)\right)} - t}\right) \]
    14. +-commutative51.6%

      \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right) - t}\right) \]
    15. count-251.6%

      \[\leadsto \mathsf{fma}\left(y, 5, \frac{x \cdot \left(\left(2 \cdot \left(y + z\right)\right) \cdot \left(2 \cdot \left(y + z\right)\right) - t \cdot t\right)}{\color{blue}{2 \cdot \left(y + z\right)} - t}\right) \]
  4. Applied egg-rr100.0%

    \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, x \cdot \mathsf{fma}\left(y + z, 2, t\right)\right)} \]
  5. Taylor expanded in t around inf 29.6%

    \[\leadsto \color{blue}{t \cdot x} \]
  6. Step-by-step derivation
    1. *-commutative29.6%

      \[\leadsto \color{blue}{x \cdot t} \]
  7. Simplified29.6%

    \[\leadsto \color{blue}{x \cdot t} \]
  8. Add Preprocessing

Reproduce

?
herbie shell --seed 2024141 
(FPCore (x y z t)
  :name "Graphics.Rendering.Plot.Render.Plot.Legend:renderLegendOutside from plot-0.2.3.4, B"
  :precision binary64
  (+ (* x (+ (+ (+ (+ y z) z) y) t)) (* y 5.0)))