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

Percentage Accurate: 99.8% → 99.8%
Time: 8.1s
Alternatives: 16
Speedup: 0.1×

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 16 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.8% 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.8% accurate, 0.1× speedup?

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

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

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

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

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

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

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

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

Alternative 2: 99.8% accurate, 0.1× speedup?

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

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

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

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

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

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

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

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

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

Alternative 3: 99.6% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -0.0580000000000000029 or 3.8000000000000001e-35 < x

    1. Initial program 99.9%

      \[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 x around inf 100.0%

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

    if -0.0580000000000000029 < x < 3.8000000000000001e-35

    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(\left(\left(\color{blue}{z} + z\right) + y\right) + t\right) + y \cdot 5 \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.9%

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

Alternative 4: 99.1% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.5 or 5 < 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 x around inf 98.7%

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

    if -2.5 < x < 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.6%

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

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

Alternative 5: 73.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(t + y \cdot 2\right)\\ \mathbf{if}\;x \leq -7.5 \cdot 10^{+72}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -1 \cdot 10^{-7}:\\ \;\;\;\;\left(y + z\right) \cdot \left(x \cdot 2\right)\\ \mathbf{elif}\;x \leq 1900000000:\\ \;\;\;\;y \cdot 5 + x \cdot t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (+ t (* y 2.0)))))
   (if (<= x -7.5e+72)
     t_1
     (if (<= x -1e-7)
       (* (+ y z) (* x 2.0))
       (if (<= x 1900000000.0) (+ (* y 5.0) (* x t)) t_1)))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (t + (y * 2.0));
	double tmp;
	if (x <= -7.5e+72) {
		tmp = t_1;
	} else if (x <= -1e-7) {
		tmp = (y + z) * (x * 2.0);
	} else if (x <= 1900000000.0) {
		tmp = (y * 5.0) + (x * t);
	} else {
		tmp = t_1;
	}
	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) :: t_1
    real(8) :: tmp
    t_1 = x * (t + (y * 2.0d0))
    if (x <= (-7.5d+72)) then
        tmp = t_1
    else if (x <= (-1d-7)) then
        tmp = (y + z) * (x * 2.0d0)
    else if (x <= 1900000000.0d0) then
        tmp = (y * 5.0d0) + (x * t)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x * (t + (y * 2.0));
	double tmp;
	if (x <= -7.5e+72) {
		tmp = t_1;
	} else if (x <= -1e-7) {
		tmp = (y + z) * (x * 2.0);
	} else if (x <= 1900000000.0) {
		tmp = (y * 5.0) + (x * t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (t + (y * 2.0))
	tmp = 0
	if x <= -7.5e+72:
		tmp = t_1
	elif x <= -1e-7:
		tmp = (y + z) * (x * 2.0)
	elif x <= 1900000000.0:
		tmp = (y * 5.0) + (x * t)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(t + Float64(y * 2.0)))
	tmp = 0.0
	if (x <= -7.5e+72)
		tmp = t_1;
	elseif (x <= -1e-7)
		tmp = Float64(Float64(y + z) * Float64(x * 2.0));
	elseif (x <= 1900000000.0)
		tmp = Float64(Float64(y * 5.0) + Float64(x * t));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (t + (y * 2.0));
	tmp = 0.0;
	if (x <= -7.5e+72)
		tmp = t_1;
	elseif (x <= -1e-7)
		tmp = (y + z) * (x * 2.0);
	elseif (x <= 1900000000.0)
		tmp = (y * 5.0) + (x * t);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.5e+72], t$95$1, If[LessEqual[x, -1e-7], N[(N[(y + z), $MachinePrecision] * N[(x * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1900000000.0], N[(N[(y * 5.0), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(t + y \cdot 2\right)\\
\mathbf{if}\;x \leq -7.5 \cdot 10^{+72}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -1 \cdot 10^{-7}:\\
\;\;\;\;\left(y + z\right) \cdot \left(x \cdot 2\right)\\

\mathbf{elif}\;x \leq 1900000000:\\
\;\;\;\;y \cdot 5 + x \cdot t\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -7.50000000000000027e72 or 1.9e9 < 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 x around inf 100.0%

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

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

    if -7.50000000000000027e72 < x < -9.9999999999999995e-8

    1. Initial program 99.9%

      \[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 x around inf 91.7%

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

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

        \[\leadsto \color{blue}{\left(2 \cdot x\right) \cdot \left(y + z\right)} \]
      2. *-commutative82.6%

        \[\leadsto \color{blue}{\left(y + z\right) \cdot \left(2 \cdot x\right)} \]
    8. Simplified82.6%

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

    if -9.9999999999999995e-8 < x < 1.9e9

    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 81.4%

      \[\leadsto \color{blue}{t \cdot x} + y \cdot 5 \]
    4. Simplified81.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.5 \cdot 10^{+72}:\\ \;\;\;\;x \cdot \left(t + y \cdot 2\right)\\ \mathbf{elif}\;x \leq -1 \cdot 10^{-7}:\\ \;\;\;\;\left(y + z\right) \cdot \left(x \cdot 2\right)\\ \mathbf{elif}\;x \leq 1900000000:\\ \;\;\;\;y \cdot 5 + x \cdot t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(t + y \cdot 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 72.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(x + 5\right)\\ \mathbf{if}\;y \leq -900000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.42 \cdot 10^{+29}:\\ \;\;\;\;x \cdot \left(t + z \cdot 2\right)\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{+183}:\\ \;\;\;\;x \cdot \left(t + y \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* y (+ x 5.0))))
   (if (<= y -900000000000.0)
     t_1
     (if (<= y 1.42e+29)
       (* x (+ t (* z 2.0)))
       (if (<= y 8.5e+183) (* x (+ t (* y 2.0))) t_1)))))
double code(double x, double y, double z, double t) {
	double t_1 = y * (x + 5.0);
	double tmp;
	if (y <= -900000000000.0) {
		tmp = t_1;
	} else if (y <= 1.42e+29) {
		tmp = x * (t + (z * 2.0));
	} else if (y <= 8.5e+183) {
		tmp = x * (t + (y * 2.0));
	} else {
		tmp = t_1;
	}
	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) :: t_1
    real(8) :: tmp
    t_1 = y * (x + 5.0d0)
    if (y <= (-900000000000.0d0)) then
        tmp = t_1
    else if (y <= 1.42d+29) then
        tmp = x * (t + (z * 2.0d0))
    else if (y <= 8.5d+183) then
        tmp = x * (t + (y * 2.0d0))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = y * (x + 5.0);
	double tmp;
	if (y <= -900000000000.0) {
		tmp = t_1;
	} else if (y <= 1.42e+29) {
		tmp = x * (t + (z * 2.0));
	} else if (y <= 8.5e+183) {
		tmp = x * (t + (y * 2.0));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = y * (x + 5.0)
	tmp = 0
	if y <= -900000000000.0:
		tmp = t_1
	elif y <= 1.42e+29:
		tmp = x * (t + (z * 2.0))
	elif y <= 8.5e+183:
		tmp = x * (t + (y * 2.0))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(y * Float64(x + 5.0))
	tmp = 0.0
	if (y <= -900000000000.0)
		tmp = t_1;
	elseif (y <= 1.42e+29)
		tmp = Float64(x * Float64(t + Float64(z * 2.0)));
	elseif (y <= 8.5e+183)
		tmp = Float64(x * Float64(t + Float64(y * 2.0)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = y * (x + 5.0);
	tmp = 0.0;
	if (y <= -900000000000.0)
		tmp = t_1;
	elseif (y <= 1.42e+29)
		tmp = x * (t + (z * 2.0));
	elseif (y <= 8.5e+183)
		tmp = x * (t + (y * 2.0));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(x + 5.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -900000000000.0], t$95$1, If[LessEqual[y, 1.42e+29], N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.5e+183], N[(x * N[(t + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \left(x + 5\right)\\
\mathbf{if}\;y \leq -900000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 1.42 \cdot 10^{+29}:\\
\;\;\;\;x \cdot \left(t + z \cdot 2\right)\\

\mathbf{elif}\;y \leq 8.5 \cdot 10^{+183}:\\
\;\;\;\;x \cdot \left(t + y \cdot 2\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9e11 or 8.5000000000000004e183 < y

    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 87.8%

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

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

    if -9e11 < y < 1.42e29

    1. Initial program 99.9%

      \[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 y around inf 80.4%

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

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

    if 1.42e29 < y < 8.5000000000000004e183

    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 x around inf 83.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -900000000000:\\ \;\;\;\;y \cdot \left(x + 5\right)\\ \mathbf{elif}\;y \leq 1.42 \cdot 10^{+29}:\\ \;\;\;\;x \cdot \left(t + z \cdot 2\right)\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{+183}:\\ \;\;\;\;x \cdot \left(t + y \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x + 5\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 60.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(t + y \cdot 2\right)\\ \mathbf{if}\;x \leq -1.35 \cdot 10^{+57}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -6.4 \cdot 10^{-52}:\\ \;\;\;\;z \cdot \left(x \cdot 2\right)\\ \mathbf{elif}\;x \leq 1.4 \cdot 10^{-111}:\\ \;\;\;\;y \cdot \left(x + 5\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (+ t (* y 2.0)))))
   (if (<= x -1.35e+57)
     t_1
     (if (<= x -6.4e-52)
       (* z (* x 2.0))
       (if (<= x 1.4e-111) (* y (+ x 5.0)) t_1)))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (t + (y * 2.0));
	double tmp;
	if (x <= -1.35e+57) {
		tmp = t_1;
	} else if (x <= -6.4e-52) {
		tmp = z * (x * 2.0);
	} else if (x <= 1.4e-111) {
		tmp = y * (x + 5.0);
	} else {
		tmp = t_1;
	}
	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) :: t_1
    real(8) :: tmp
    t_1 = x * (t + (y * 2.0d0))
    if (x <= (-1.35d+57)) then
        tmp = t_1
    else if (x <= (-6.4d-52)) then
        tmp = z * (x * 2.0d0)
    else if (x <= 1.4d-111) then
        tmp = y * (x + 5.0d0)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x * (t + (y * 2.0));
	double tmp;
	if (x <= -1.35e+57) {
		tmp = t_1;
	} else if (x <= -6.4e-52) {
		tmp = z * (x * 2.0);
	} else if (x <= 1.4e-111) {
		tmp = y * (x + 5.0);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (t + (y * 2.0))
	tmp = 0
	if x <= -1.35e+57:
		tmp = t_1
	elif x <= -6.4e-52:
		tmp = z * (x * 2.0)
	elif x <= 1.4e-111:
		tmp = y * (x + 5.0)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(t + Float64(y * 2.0)))
	tmp = 0.0
	if (x <= -1.35e+57)
		tmp = t_1;
	elseif (x <= -6.4e-52)
		tmp = Float64(z * Float64(x * 2.0));
	elseif (x <= 1.4e-111)
		tmp = Float64(y * Float64(x + 5.0));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (t + (y * 2.0));
	tmp = 0.0;
	if (x <= -1.35e+57)
		tmp = t_1;
	elseif (x <= -6.4e-52)
		tmp = z * (x * 2.0);
	elseif (x <= 1.4e-111)
		tmp = y * (x + 5.0);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.35e+57], t$95$1, If[LessEqual[x, -6.4e-52], N[(z * N[(x * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.4e-111], N[(y * N[(x + 5.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(t + y \cdot 2\right)\\
\mathbf{if}\;x \leq -1.35 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -6.4 \cdot 10^{-52}:\\
\;\;\;\;z \cdot \left(x \cdot 2\right)\\

\mathbf{elif}\;x \leq 1.4 \cdot 10^{-111}:\\
\;\;\;\;y \cdot \left(x + 5\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.3499999999999999e57 or 1.39999999999999998e-111 < 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 x around inf 95.9%

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

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

    if -1.3499999999999999e57 < x < -6.4000000000000002e-52

    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 z around inf 68.6%

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

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

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

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

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

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

    if -6.4000000000000002e-52 < x < 1.39999999999999998e-111

    1. Initial program 99.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.35 \cdot 10^{+57}:\\ \;\;\;\;x \cdot \left(t + y \cdot 2\right)\\ \mathbf{elif}\;x \leq -6.4 \cdot 10^{-52}:\\ \;\;\;\;z \cdot \left(x \cdot 2\right)\\ \mathbf{elif}\;x \leq 1.4 \cdot 10^{-111}:\\ \;\;\;\;y \cdot \left(x + 5\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(t + y \cdot 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 46.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(x \cdot 2\right)\\ \mathbf{if}\;x \leq -2.5:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.35 \cdot 10^{-111}:\\ \;\;\;\;y \cdot 5\\ \mathbf{elif}\;x \leq 80000000000000:\\ \;\;\;\;x \cdot t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* y (* x 2.0))))
   (if (<= x -2.5)
     t_1
     (if (<= x 1.35e-111)
       (* y 5.0)
       (if (<= x 80000000000000.0) (* x t) t_1)))))
double code(double x, double y, double z, double t) {
	double t_1 = y * (x * 2.0);
	double tmp;
	if (x <= -2.5) {
		tmp = t_1;
	} else if (x <= 1.35e-111) {
		tmp = y * 5.0;
	} else if (x <= 80000000000000.0) {
		tmp = x * t;
	} else {
		tmp = t_1;
	}
	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) :: t_1
    real(8) :: tmp
    t_1 = y * (x * 2.0d0)
    if (x <= (-2.5d0)) then
        tmp = t_1
    else if (x <= 1.35d-111) then
        tmp = y * 5.0d0
    else if (x <= 80000000000000.0d0) then
        tmp = x * t
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = y * (x * 2.0);
	double tmp;
	if (x <= -2.5) {
		tmp = t_1;
	} else if (x <= 1.35e-111) {
		tmp = y * 5.0;
	} else if (x <= 80000000000000.0) {
		tmp = x * t;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = y * (x * 2.0)
	tmp = 0
	if x <= -2.5:
		tmp = t_1
	elif x <= 1.35e-111:
		tmp = y * 5.0
	elif x <= 80000000000000.0:
		tmp = x * t
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(y * Float64(x * 2.0))
	tmp = 0.0
	if (x <= -2.5)
		tmp = t_1;
	elseif (x <= 1.35e-111)
		tmp = Float64(y * 5.0);
	elseif (x <= 80000000000000.0)
		tmp = Float64(x * t);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = y * (x * 2.0);
	tmp = 0.0;
	if (x <= -2.5)
		tmp = t_1;
	elseif (x <= 1.35e-111)
		tmp = y * 5.0;
	elseif (x <= 80000000000000.0)
		tmp = x * t;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.5], t$95$1, If[LessEqual[x, 1.35e-111], N[(y * 5.0), $MachinePrecision], If[LessEqual[x, 80000000000000.0], N[(x * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \left(x \cdot 2\right)\\
\mathbf{if}\;x \leq -2.5:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;x \leq 80000000000000:\\
\;\;\;\;x \cdot t\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.5 or 8e13 < 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 x around inf 98.7%

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

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

        \[\leadsto \color{blue}{\left(2 \cdot x\right) \cdot y} \]
      2. *-commutative43.6%

        \[\leadsto \color{blue}{y \cdot \left(2 \cdot x\right)} \]
    8. Simplified43.6%

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

    if -2.5 < x < 1.34999999999999994e-111

    1. Initial program 99.8%

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

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

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

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

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

      \[\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 57.4%

      \[\leadsto \color{blue}{y \cdot \left(5 + 2 \cdot x\right)} \]
    6. Simplified57.4%

      \[\leadsto \color{blue}{y \cdot \left(5 + 0 \cdot x\right)} \]
    7. Taylor expanded in x around 0 57.4%

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

    if 1.34999999999999994e-111 < x < 8e13

    1. Initial program 99.9%

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

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

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

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

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

      \[\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 71.7%

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

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

        \[\leadsto \color{blue}{x \cdot t} \]
    8. Simplified51.6%

      \[\leadsto \color{blue}{x \cdot t} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification49.8%

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

Alternative 9: 88.6% accurate, 0.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.2999999999999999e-35 or 1.6000000000000001e-8 < 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 x around inf 98.0%

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

    if -2.2999999999999999e-35 < x < 1.6000000000000001e-8

    1. Initial program 99.8%

      \[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 82.8%

      \[\leadsto \color{blue}{t \cdot x} + y \cdot 5 \]
    4. Simplified82.8%

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

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

Alternative 10: 78.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -7000000000000 \lor \neg \left(y \leq 5.5 \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 -7000000000000.0) (not (<= y 5.5e+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 <= -7000000000000.0) || !(y <= 5.5e+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 <= (-7000000000000.0d0)) .or. (.not. (y <= 5.5d+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 <= -7000000000000.0) || !(y <= 5.5e+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 <= -7000000000000.0) or not (y <= 5.5e+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 <= -7000000000000.0) || !(y <= 5.5e+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 <= -7000000000000.0) || ~((y <= 5.5e+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, -7000000000000.0], N[Not[LessEqual[y, 5.5e+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 -7000000000000 \lor \neg \left(y \leq 5.5 \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 < -7e12 or 5.5000000000000001e60 < y

    1. Initial program 99.9%

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

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

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

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

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

      \[\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 78.8%

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

    if -7e12 < y < 5.5000000000000001e60

    1. Initial program 99.9%

      \[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 y around inf 81.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7000000000000 \lor \neg \left(y \leq 5.5 \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 11: 54.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1960000000000 \lor \neg \left(y \leq 7 \cdot 10^{+55}\right):\\
\;\;\;\;y \cdot \left(x + 5\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.96e12 or 7.00000000000000021e55 < y

    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 86.3%

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

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

    if -1.96e12 < y < 7.00000000000000021e55

    1. Initial program 99.9%

      \[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 y around inf 81.1%

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

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

        \[\leadsto \color{blue}{x \cdot t} \]
    8. Simplified47.1%

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

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

Alternative 12: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ y \cdot 5 + x \cdot \left(t + \left(y + \left(y + z \cdot 2\right)\right)\right) \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (+ (* y 5.0) (* x (+ t (+ y (+ y (* z 2.0)))))))
double code(double x, double y, double z, double t) {
	return (y * 5.0) + (x * (t + (y + (y + (z * 2.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 = (y * 5.0d0) + (x * (t + (y + (y + (z * 2.0d0)))))
end function
public static double code(double x, double y, double z, double t) {
	return (y * 5.0) + (x * (t + (y + (y + (z * 2.0)))));
}
def code(x, y, z, t):
	return (y * 5.0) + (x * (t + (y + (y + (z * 2.0)))))
function code(x, y, z, t)
	return Float64(Float64(y * 5.0) + Float64(x * Float64(t + Float64(y + Float64(y + Float64(z * 2.0))))))
end
function tmp = code(x, y, z, t)
	tmp = (y * 5.0) + (x * (t + (y + (y + (z * 2.0)))));
end
code[x_, y_, z_, t_] := N[(N[(y * 5.0), $MachinePrecision] + N[(x * N[(t + N[(y + N[(y + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
y \cdot 5 + x \cdot \left(t + \left(y + \left(y + z \cdot 2\right)\right)\right)
\end{array}
Derivation
  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(\left(\color{blue}{\left(y + 2 \cdot z\right)} + y\right) + t\right) + y \cdot 5 \]
  4. Final simplification99.9%

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

Alternative 13: 44.4% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.22 \cdot 10^{+57} \lor \neg \left(t \leq 7 \cdot 10^{-65}\right):\\ \;\;\;\;x \cdot t\\ \mathbf{else}:\\ \;\;\;\;y \cdot 5\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= t -1.22e+57) (not (<= t 7e-65))) (* x t) (* y 5.0)))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((t <= -1.22e+57) || !(t <= 7e-65)) {
		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 ((t <= (-1.22d+57)) .or. (.not. (t <= 7d-65))) 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 ((t <= -1.22e+57) || !(t <= 7e-65)) {
		tmp = x * t;
	} else {
		tmp = y * 5.0;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (t <= -1.22e+57) or not (t <= 7e-65):
		tmp = x * t
	else:
		tmp = y * 5.0
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((t <= -1.22e+57) || !(t <= 7e-65))
		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 ((t <= -1.22e+57) || ~((t <= 7e-65)))
		tmp = x * t;
	else
		tmp = y * 5.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.22e+57], N[Not[LessEqual[t, 7e-65]], $MachinePrecision]], N[(x * t), $MachinePrecision], N[(y * 5.0), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.22 \cdot 10^{+57} \lor \neg \left(t \leq 7 \cdot 10^{-65}\right):\\
\;\;\;\;x \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.22e57 or 7.00000000000000009e-65 < t

    1. Initial program 99.9%

      \[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 y around inf 83.8%

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

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

        \[\leadsto \color{blue}{x \cdot t} \]
    8. Simplified55.6%

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

    if -1.22e57 < t < 7.00000000000000009e-65

    1. Initial program 99.9%

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

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

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

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

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

      \[\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 67.4%

      \[\leadsto \color{blue}{y \cdot \left(5 + 2 \cdot x\right)} \]
    6. Simplified36.7%

      \[\leadsto \color{blue}{y \cdot \left(5 + 0 \cdot x\right)} \]
    7. Taylor expanded in x around 0 36.7%

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

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

Alternative 14: 37.4% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.1 \cdot 10^{+116} \lor \neg \left(z \leq 1.12 \cdot 10^{+192}\right):\\ \;\;\;\;x \cdot z\\ \mathbf{else}:\\ \;\;\;\;x \cdot t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -4.1e+116) (not (<= z 1.12e+192))) (* x z) (* x t)))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -4.1e+116) || !(z <= 1.12e+192)) {
		tmp = x * z;
	} else {
		tmp = 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 ((z <= (-4.1d+116)) .or. (.not. (z <= 1.12d+192))) then
        tmp = x * z
    else
        tmp = x * t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -4.1e+116) || !(z <= 1.12e+192)) {
		tmp = x * z;
	} else {
		tmp = x * t;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -4.1e+116) or not (z <= 1.12e+192):
		tmp = x * z
	else:
		tmp = x * t
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -4.1e+116) || !(z <= 1.12e+192))
		tmp = Float64(x * z);
	else
		tmp = Float64(x * t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -4.1e+116) || ~((z <= 1.12e+192)))
		tmp = x * z;
	else
		tmp = x * t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4.1e+116], N[Not[LessEqual[z, 1.12e+192]], $MachinePrecision]], N[(x * z), $MachinePrecision], N[(x * t), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.1 \cdot 10^{+116} \lor \neg \left(z \leq 1.12 \cdot 10^{+192}\right):\\
\;\;\;\;x \cdot z\\

\mathbf{else}:\\
\;\;\;\;x \cdot t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.0999999999999998e116 or 1.12e192 < z

    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 z around inf 88.6%

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

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(-5 \cdot \frac{y}{x} + -2 \cdot z\right)\right)} \]
    5. Simplified4.7%

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot x\right) \cdot z} \]
      2. mul-1-neg4.4%

        \[\leadsto \color{blue}{\left(-x\right)} \cdot z \]
    8. Simplified4.4%

      \[\leadsto \color{blue}{\left(-x\right) \cdot z} \]
    9. Step-by-step derivation
      1. add-sqr-sqrt3.8%

        \[\leadsto \color{blue}{\left(\sqrt{-x} \cdot \sqrt{-x}\right)} \cdot z \]
      2. sqrt-unprod25.3%

        \[\leadsto \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} \cdot z \]
      3. sqr-neg25.3%

        \[\leadsto \sqrt{\color{blue}{x \cdot x}} \cdot z \]
      4. sqrt-unprod22.0%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot z \]
      5. add-sqr-sqrt44.5%

        \[\leadsto \color{blue}{x} \cdot z \]
      6. pow144.5%

        \[\leadsto \color{blue}{{\left(x \cdot z\right)}^{1}} \]
    10. Applied egg-rr44.5%

      \[\leadsto \color{blue}{{\left(x \cdot z\right)}^{1}} \]
    11. Step-by-step derivation
      1. unpow144.5%

        \[\leadsto \color{blue}{x \cdot z} \]
    12. Simplified44.5%

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

    if -4.0999999999999998e116 < z < 1.12e192

    1. Initial program 99.9%

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

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

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

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

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

      \[\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 87.2%

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

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

        \[\leadsto \color{blue}{x \cdot t} \]
    8. Simplified36.0%

      \[\leadsto \color{blue}{x \cdot t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification38.0%

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

Alternative 15: 31.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.9%

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

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

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

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

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

    \[\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 87.2%

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

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

      \[\leadsto \color{blue}{x \cdot t} \]
  8. Simplified31.9%

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

Alternative 16: 2.9% accurate, 15.0× speedup?

\[\begin{array}{l} \\ -2 \end{array} \]
(FPCore (x y z t) :precision binary64 -2.0)
double code(double x, double y, double z, double t) {
	return -2.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 = -2.0d0
end function
public static double code(double x, double y, double z, double t) {
	return -2.0;
}
def code(x, y, z, t):
	return -2.0
function code(x, y, z, t)
	return -2.0
end
function tmp = code(x, y, z, t)
	tmp = -2.0;
end
code[x_, y_, z_, t_] := -2.0
\begin{array}{l}

\\
-2
\end{array}
Derivation
  1. Initial program 99.9%

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

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

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

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

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

    \[\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 48.9%

    \[\leadsto \color{blue}{y \cdot \left(5 + 2 \cdot x\right)} \]
  6. Simplified26.9%

    \[\leadsto \color{blue}{y \cdot \left(5 + 0 \cdot x\right)} \]
  7. Taylor expanded in y around 0 26.9%

    \[\leadsto \color{blue}{5 \cdot y} \]
  8. Simplified3.1%

    \[\leadsto \color{blue}{-2} \]
  9. Add Preprocessing

Reproduce

?
herbie shell --seed 2024132 
(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)))