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

Percentage Accurate: 99.8% → 99.9%
Time: 6.7s
Alternatives: 16
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 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.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.6%

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

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

      \[\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. distribute-rgt-in95.7%

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

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

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

      \[\leadsto \mathsf{fma}\left(y, 5, \color{blue}{\left(2 \cdot \left(y + z\right)\right)} \cdot x + t \cdot x\right) \]
    7. distribute-rgt-in99.6%

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

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

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

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

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

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.6%

    \[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-def99.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. Final simplification99.6%

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

Alternative 3: 50.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \left(z \cdot 2\right)\\
t_2 := y \cdot \left(5 + x\right)\\
\mathbf{if}\;t \leq -8.2 \cdot 10^{+95}:\\
\;\;\;\;x \cdot t\\

\mathbf{elif}\;t \leq -6.8 \cdot 10^{-169}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -1.55 \cdot 10^{-229}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 2.6 \cdot 10^{-183}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 3 \cdot 10^{-41}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 6 \cdot 10^{-11}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 4.6 \cdot 10^{+67}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.19999999999999972e95 or 4.5999999999999997e67 < t

    1. Initial program 99.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-def99.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+99.0%

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{\left(\left(y + z\right) + \left(z + y\right)\right)} + t, y \cdot 5\right) \]
      3. +-commutative99.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-299.0%

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

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

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

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

    if -8.19999999999999972e95 < t < -6.8e-169 or -1.55e-229 < t < 2.5999999999999999e-183 or 2.99999999999999989e-41 < t < 6e-11

    1. Initial program 99.9%

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(5 + x\right)} \]
    5. Step-by-step derivation
      1. +-commutative57.5%

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

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

    if -6.8e-169 < t < -1.55e-229 or 2.5999999999999999e-183 < t < 2.99999999999999989e-41 or 6e-11 < t < 4.5999999999999997e67

    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-def99.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. Taylor expanded in x around inf 76.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.2 \cdot 10^{+95}:\\ \;\;\;\;x \cdot t\\ \mathbf{elif}\;t \leq -6.8 \cdot 10^{-169}:\\ \;\;\;\;y \cdot \left(5 + x\right)\\ \mathbf{elif}\;t \leq -1.55 \cdot 10^{-229}:\\ \;\;\;\;x \cdot \left(z \cdot 2\right)\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-183}:\\ \;\;\;\;y \cdot \left(5 + x\right)\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-41}:\\ \;\;\;\;x \cdot \left(z \cdot 2\right)\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-11}:\\ \;\;\;\;y \cdot \left(5 + x\right)\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{+67}:\\ \;\;\;\;x \cdot \left(z \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot t\\ \end{array} \]

Alternative 4: 77.6% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot 5 + x \cdot t\\
t_2 := y \cdot \left(5 + x \cdot 2\right)\\
\mathbf{if}\;y \leq -1.1 \cdot 10^{+124}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -9.2 \cdot 10^{+23}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq -6 \cdot 10^{-62}:\\
\;\;\;\;t_1\\

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

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.1e124 or 1.69999999999999998e108 < y

    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-def98.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. Taylor expanded in y around inf 87.1%

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

    if -1.1e124 < y < -9.2000000000000002e23 or -7.7999999999999999e-5 < y < -6.0000000000000002e-62

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{t \cdot x} + y \cdot 5 \]

    if -9.2000000000000002e23 < y < -7.7999999999999999e-5

    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-def100.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. Taylor expanded in x around inf 77.3%

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

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

    if -6.0000000000000002e-62 < y < 1.69999999999999998e108

    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-def99.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. Taylor expanded in y around 0 99.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.1 \cdot 10^{+124}:\\ \;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\ \mathbf{elif}\;y \leq -9.2 \cdot 10^{+23}:\\ \;\;\;\;y \cdot 5 + x \cdot t\\ \mathbf{elif}\;y \leq -7.8 \cdot 10^{-5}:\\ \;\;\;\;x \cdot \left(\left(y + z\right) \cdot 2\right)\\ \mathbf{elif}\;y \leq -6 \cdot 10^{-62}:\\ \;\;\;\;y \cdot 5 + x \cdot t\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{+108}:\\ \;\;\;\;x \cdot \left(t + z \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\ \end{array} \]

Alternative 5: 88.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot 5 + 2 \cdot \left(x \cdot z\right)\\
t_2 := x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\
\mathbf{if}\;x \leq -3.5 \cdot 10^{-13}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq -1.35 \cdot 10^{-264}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 1.7 \cdot 10^{-88}:\\
\;\;\;\;y \cdot 5 + x \cdot t\\

\mathbf{elif}\;x \leq 1.9 \cdot 10^{-9}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.5000000000000002e-13 or 1.90000000000000006e-9 < 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-def100.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. Taylor expanded in x around inf 99.8%

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

    if -3.5000000000000002e-13 < x < -1.34999999999999997e-264 or 1.69999999999999987e-88 < x < 1.90000000000000006e-9

    1. Initial program 98.7%

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

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

    if -1.34999999999999997e-264 < x < 1.69999999999999987e-88

    1. Initial program 99.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.5 \cdot 10^{-13}:\\ \;\;\;\;x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\ \mathbf{elif}\;x \leq -1.35 \cdot 10^{-264}:\\ \;\;\;\;y \cdot 5 + 2 \cdot \left(x \cdot z\right)\\ \mathbf{elif}\;x \leq 1.7 \cdot 10^{-88}:\\ \;\;\;\;y \cdot 5 + x \cdot t\\ \mathbf{elif}\;x \leq 1.9 \cdot 10^{-9}:\\ \;\;\;\;y \cdot 5 + 2 \cdot \left(x \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\ \end{array} \]

Alternative 6: 98.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{+27} \lor \neg \left(x \leq 5.3 \cdot 10^{-8}\right):\\
\;\;\;\;x \cdot \left(t + \left(y + z\right) \cdot 2\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 < -9.4999999999999997e27 or 5.2999999999999998e-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-def100.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. Taylor expanded in x around inf 99.8%

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

    if -9.4999999999999997e27 < x < 5.2999999999999998e-8

    1. Initial program 99.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{+27} \lor \neg \left(x \leq 5.3 \cdot 10^{-8}\right):\\ \;\;\;\;x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot 5 + x \cdot \left(t + \left(y + \left(z + z\right)\right)\right)\\ \end{array} \]

Alternative 7: 75.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(5 + x \cdot 2\right)\\ \mathbf{if}\;y \leq -9.8 \cdot 10^{+148}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.95 \cdot 10^{+54}:\\ \;\;\;\;x \cdot \left(t + y \cdot 2\right)\\ \mathbf{elif}\;y \leq -3.3 \cdot 10^{-21} \lor \neg \left(y \leq 9.5 \cdot 10^{+106}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(t + z \cdot 2\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* y (+ 5.0 (* x 2.0)))))
   (if (<= y -9.8e+148)
     t_1
     (if (<= y -1.95e+54)
       (* x (+ t (* y 2.0)))
       (if (or (<= y -3.3e-21) (not (<= y 9.5e+106)))
         t_1
         (* x (+ t (* z 2.0))))))))
double code(double x, double y, double z, double t) {
	double t_1 = y * (5.0 + (x * 2.0));
	double tmp;
	if (y <= -9.8e+148) {
		tmp = t_1;
	} else if (y <= -1.95e+54) {
		tmp = x * (t + (y * 2.0));
	} else if ((y <= -3.3e-21) || !(y <= 9.5e+106)) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = y * (5.0d0 + (x * 2.0d0))
    if (y <= (-9.8d+148)) then
        tmp = t_1
    else if (y <= (-1.95d+54)) then
        tmp = x * (t + (y * 2.0d0))
    else if ((y <= (-3.3d-21)) .or. (.not. (y <= 9.5d+106))) then
        tmp = t_1
    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 t_1 = y * (5.0 + (x * 2.0));
	double tmp;
	if (y <= -9.8e+148) {
		tmp = t_1;
	} else if (y <= -1.95e+54) {
		tmp = x * (t + (y * 2.0));
	} else if ((y <= -3.3e-21) || !(y <= 9.5e+106)) {
		tmp = t_1;
	} else {
		tmp = x * (t + (z * 2.0));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = y * (5.0 + (x * 2.0))
	tmp = 0
	if y <= -9.8e+148:
		tmp = t_1
	elif y <= -1.95e+54:
		tmp = x * (t + (y * 2.0))
	elif (y <= -3.3e-21) or not (y <= 9.5e+106):
		tmp = t_1
	else:
		tmp = x * (t + (z * 2.0))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(y * Float64(5.0 + Float64(x * 2.0)))
	tmp = 0.0
	if (y <= -9.8e+148)
		tmp = t_1;
	elseif (y <= -1.95e+54)
		tmp = Float64(x * Float64(t + Float64(y * 2.0)));
	elseif ((y <= -3.3e-21) || !(y <= 9.5e+106))
		tmp = t_1;
	else
		tmp = Float64(x * Float64(t + Float64(z * 2.0)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = y * (5.0 + (x * 2.0));
	tmp = 0.0;
	if (y <= -9.8e+148)
		tmp = t_1;
	elseif (y <= -1.95e+54)
		tmp = x * (t + (y * 2.0));
	elseif ((y <= -3.3e-21) || ~((y <= 9.5e+106)))
		tmp = t_1;
	else
		tmp = x * (t + (z * 2.0));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(5.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9.8e+148], t$95$1, If[LessEqual[y, -1.95e+54], N[(x * N[(t + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -3.3e-21], N[Not[LessEqual[y, 9.5e+106]], $MachinePrecision]], t$95$1, N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \left(5 + x \cdot 2\right)\\
\mathbf{if}\;y \leq -9.8 \cdot 10^{+148}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq -3.3 \cdot 10^{-21} \lor \neg \left(y \leq 9.5 \cdot 10^{+106}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.8e148 or -1.9500000000000001e54 < y < -3.30000000000000009e-21 or 9.4999999999999995e106 < y

    1. Initial program 98.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-def98.8%

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

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

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

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

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

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

    if -9.8e148 < y < -1.9500000000000001e54

    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-def100.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. Taylor expanded in x around inf 79.1%

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

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

    if -3.30000000000000009e-21 < y < 9.4999999999999995e106

    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-def99.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. Taylor expanded in y around 0 99.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.8 \cdot 10^{+148}:\\ \;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\ \mathbf{elif}\;y \leq -1.95 \cdot 10^{+54}:\\ \;\;\;\;x \cdot \left(t + y \cdot 2\right)\\ \mathbf{elif}\;y \leq -3.3 \cdot 10^{-21} \lor \neg \left(y \leq 9.5 \cdot 10^{+106}\right):\\ \;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(t + z \cdot 2\right)\\ \end{array} \]

Alternative 8: 63.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(t + y \cdot 2\right)\\ t_2 := x \cdot \left(\left(y + z\right) \cdot 2\right)\\ \mathbf{if}\;x \leq -6.4 \cdot 10^{+94}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -3.65 \cdot 10^{-13}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{-9}:\\ \;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{+260}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (+ t (* y 2.0)))) (t_2 (* x (* (+ y z) 2.0))))
   (if (<= x -6.4e+94)
     t_2
     (if (<= x -3.65e-13)
       t_1
       (if (<= x 5.8e-9)
         (* y (+ 5.0 (* x 2.0)))
         (if (<= x 9.5e+260) t_1 t_2))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (t + (y * 2.0));
	double t_2 = x * ((y + z) * 2.0);
	double tmp;
	if (x <= -6.4e+94) {
		tmp = t_2;
	} else if (x <= -3.65e-13) {
		tmp = t_1;
	} else if (x <= 5.8e-9) {
		tmp = y * (5.0 + (x * 2.0));
	} else if (x <= 9.5e+260) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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) :: t_2
    real(8) :: tmp
    t_1 = x * (t + (y * 2.0d0))
    t_2 = x * ((y + z) * 2.0d0)
    if (x <= (-6.4d+94)) then
        tmp = t_2
    else if (x <= (-3.65d-13)) then
        tmp = t_1
    else if (x <= 5.8d-9) then
        tmp = y * (5.0d0 + (x * 2.0d0))
    else if (x <= 9.5d+260) then
        tmp = t_1
    else
        tmp = t_2
    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 t_2 = x * ((y + z) * 2.0);
	double tmp;
	if (x <= -6.4e+94) {
		tmp = t_2;
	} else if (x <= -3.65e-13) {
		tmp = t_1;
	} else if (x <= 5.8e-9) {
		tmp = y * (5.0 + (x * 2.0));
	} else if (x <= 9.5e+260) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (t + (y * 2.0))
	t_2 = x * ((y + z) * 2.0)
	tmp = 0
	if x <= -6.4e+94:
		tmp = t_2
	elif x <= -3.65e-13:
		tmp = t_1
	elif x <= 5.8e-9:
		tmp = y * (5.0 + (x * 2.0))
	elif x <= 9.5e+260:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(t + Float64(y * 2.0)))
	t_2 = Float64(x * Float64(Float64(y + z) * 2.0))
	tmp = 0.0
	if (x <= -6.4e+94)
		tmp = t_2;
	elseif (x <= -3.65e-13)
		tmp = t_1;
	elseif (x <= 5.8e-9)
		tmp = Float64(y * Float64(5.0 + Float64(x * 2.0)));
	elseif (x <= 9.5e+260)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (t + (y * 2.0));
	t_2 = x * ((y + z) * 2.0);
	tmp = 0.0;
	if (x <= -6.4e+94)
		tmp = t_2;
	elseif (x <= -3.65e-13)
		tmp = t_1;
	elseif (x <= 5.8e-9)
		tmp = y * (5.0 + (x * 2.0));
	elseif (x <= 9.5e+260)
		tmp = t_1;
	else
		tmp = t_2;
	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]}, Block[{t$95$2 = N[(x * N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.4e+94], t$95$2, If[LessEqual[x, -3.65e-13], t$95$1, If[LessEqual[x, 5.8e-9], N[(y * N[(5.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.5e+260], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(t + y \cdot 2\right)\\
t_2 := x \cdot \left(\left(y + z\right) \cdot 2\right)\\
\mathbf{if}\;x \leq -6.4 \cdot 10^{+94}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq -3.65 \cdot 10^{-13}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 9.5 \cdot 10^{+260}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -6.40000000000000028e94 or 9.5000000000000004e260 < 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-def100.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. Taylor expanded in x around inf 100.0%

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

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

    if -6.40000000000000028e94 < x < -3.6500000000000001e-13 or 5.79999999999999982e-9 < x < 9.5000000000000004e260

    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-def100.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. Taylor expanded in x around inf 99.7%

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

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

    if -3.6500000000000001e-13 < x < 5.79999999999999982e-9

    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-def99.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. Taylor expanded in y around inf 62.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.4 \cdot 10^{+94}:\\ \;\;\;\;x \cdot \left(\left(y + z\right) \cdot 2\right)\\ \mathbf{elif}\;x \leq -3.65 \cdot 10^{-13}:\\ \;\;\;\;x \cdot \left(t + y \cdot 2\right)\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{-9}:\\ \;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{+260}:\\ \;\;\;\;x \cdot \left(t + y \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(y + z\right) \cdot 2\right)\\ \end{array} \]

Alternative 9: 99.8% 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.6%

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

    \[\leadsto y \cdot 5 + x \cdot \left(t + \left(y + \left(z + \left(y + z\right)\right)\right)\right) \]

Alternative 10: 56.7% accurate, 1.1× speedup?

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

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

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

\mathbf{elif}\;x \leq -5 \cdot 10^{-15} \lor \neg \left(x \leq 2.05 \cdot 10^{-9}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -5.90000000000000035e171 or -1.45000000000000007e91 < x < -4.99999999999999999e-15 or 2.0500000000000002e-9 < 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. Taylor expanded in y around 0 90.7%

      \[\leadsto x \cdot \left(\left(\color{blue}{2 \cdot z} + y\right) + t\right) + y \cdot 5 \]
    3. Simplified90.7%

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

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

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

    if -5.90000000000000035e171 < x < -1.45000000000000007e91

    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-def100.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. Taylor expanded in x around inf 100.0%

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

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

    if -4.99999999999999999e-15 < x < 2.0500000000000002e-9

    1. Initial program 99.1%

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(5 + x\right)} \]
    5. Step-by-step derivation
      1. +-commutative62.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.9 \cdot 10^{+171}:\\ \;\;\;\;x \cdot \left(y + t\right)\\ \mathbf{elif}\;x \leq -1.45 \cdot 10^{+91}:\\ \;\;\;\;x \cdot \left(z \cdot 2\right)\\ \mathbf{elif}\;x \leq -5 \cdot 10^{-15} \lor \neg \left(x \leq 2.05 \cdot 10^{-9}\right):\\ \;\;\;\;x \cdot \left(y + t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(5 + x\right)\\ \end{array} \]

Alternative 11: 60.3% accurate, 1.1× speedup?

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

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

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.19999999999999989e95 or 1.7500000000000001e77 < t

    1. Initial program 99.0%

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

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

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

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

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

    if -9.19999999999999989e95 < t < -2.9999999999999998e60

    1. Initial program 99.9%

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(5 + x\right)} \]
    5. Step-by-step derivation
      1. +-commutative81.3%

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

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

    if -2.9999999999999998e60 < t < 1.7500000000000001e77

    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-def99.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. Taylor expanded in x around inf 66.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.2 \cdot 10^{+95}:\\ \;\;\;\;x \cdot \left(y + t\right)\\ \mathbf{elif}\;t \leq -3 \cdot 10^{+60}:\\ \;\;\;\;y \cdot \left(5 + x\right)\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{+77}:\\ \;\;\;\;x \cdot \left(\left(y + z\right) \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y + t\right)\\ \end{array} \]

Alternative 12: 60.7% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;t \leq -1.65 \cdot 10^{-103}:\\
\;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.3e96 or 4.6e73 < t

    1. Initial program 99.0%

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

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

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

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

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

    if -1.3e96 < t < -1.64999999999999995e-103

    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-def99.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. Taylor expanded in y around inf 67.0%

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

    if -1.64999999999999995e-103 < t < 4.6e73

    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-def100.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. Taylor expanded in x around inf 68.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.3 \cdot 10^{+96}:\\ \;\;\;\;x \cdot \left(y + t\right)\\ \mathbf{elif}\;t \leq -1.65 \cdot 10^{-103}:\\ \;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{+73}:\\ \;\;\;\;x \cdot \left(\left(y + z\right) \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y + t\right)\\ \end{array} \]

Alternative 13: 88.8% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -4.5 \cdot 10^{-37} \lor \neg \left(x \leq 5.5 \cdot 10^{-26}\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 -4.5e-37) (not (<= x 5.5e-26)))
   (* 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 <= -4.5e-37) || !(x <= 5.5e-26)) {
		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 <= (-4.5d-37)) .or. (.not. (x <= 5.5d-26))) 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 <= -4.5e-37) || !(x <= 5.5e-26)) {
		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 <= -4.5e-37) or not (x <= 5.5e-26):
		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 <= -4.5e-37) || !(x <= 5.5e-26))
		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 <= -4.5e-37) || ~((x <= 5.5e-26)))
		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, -4.5e-37], N[Not[LessEqual[x, 5.5e-26]], $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 -4.5 \cdot 10^{-37} \lor \neg \left(x \leq 5.5 \cdot 10^{-26}\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 < -4.5000000000000004e-37 or 5.5000000000000005e-26 < 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-def100.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. Taylor expanded in x around inf 95.6%

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

    if -4.5000000000000004e-37 < x < 5.5000000000000005e-26

    1. Initial program 98.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.5 \cdot 10^{-37} \lor \neg \left(x \leq 5.5 \cdot 10^{-26}\right):\\ \;\;\;\;x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot 5 + x \cdot t\\ \end{array} \]

Alternative 14: 53.0% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.9 \cdot 10^{+96} \lor \neg \left(t \leq 4.6 \cdot 10^{+68}\right):\\
\;\;\;\;x \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.89999999999999978e96 or 4.6e68 < t

    1. Initial program 99.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-def99.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+99.0%

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{\left(\left(y + z\right) + \left(z + y\right)\right)} + t, y \cdot 5\right) \]
      3. +-commutative99.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-299.0%

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

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

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

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

    if -2.89999999999999978e96 < t < 4.6e68

    1. Initial program 99.9%

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(5 + x\right)} \]
    5. Step-by-step derivation
      1. +-commutative45.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.9 \cdot 10^{+96} \lor \neg \left(t \leq 4.6 \cdot 10^{+68}\right):\\ \;\;\;\;x \cdot t\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(5 + x\right)\\ \end{array} \]

Alternative 15: 48.0% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.12 \cdot 10^{-12}:\\ \;\;\;\;x \cdot t\\ \mathbf{elif}\;x \leq 2.95 \cdot 10^{-8}:\\ \;\;\;\;y \cdot 5\\ \mathbf{else}:\\ \;\;\;\;x \cdot t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= x -1.12e-12) (* x t) (if (<= x 2.95e-8) (* y 5.0) (* x t))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -1.12e-12) {
		tmp = x * t;
	} else if (x <= 2.95e-8) {
		tmp = y * 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 (x <= (-1.12d-12)) then
        tmp = x * t
    else if (x <= 2.95d-8) then
        tmp = y * 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 (x <= -1.12e-12) {
		tmp = x * t;
	} else if (x <= 2.95e-8) {
		tmp = y * 5.0;
	} else {
		tmp = x * t;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if x <= -1.12e-12:
		tmp = x * t
	elif x <= 2.95e-8:
		tmp = y * 5.0
	else:
		tmp = x * t
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (x <= -1.12e-12)
		tmp = Float64(x * t);
	elseif (x <= 2.95e-8)
		tmp = Float64(y * 5.0);
	else
		tmp = Float64(x * t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (x <= -1.12e-12)
		tmp = x * t;
	elseif (x <= 2.95e-8)
		tmp = y * 5.0;
	else
		tmp = x * t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.12e-12], N[(x * t), $MachinePrecision], If[LessEqual[x, 2.95e-8], N[(y * 5.0), $MachinePrecision], N[(x * t), $MachinePrecision]]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.1200000000000001e-12 or 2.9499999999999999e-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-def100.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. Taylor expanded in y around 0 92.0%

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

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

    if -1.1200000000000001e-12 < x < 2.9499999999999999e-8

    1. Initial program 99.1%

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

      \[\leadsto \color{blue}{5 \cdot y} \]
    3. Simplified61.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.12 \cdot 10^{-12}:\\ \;\;\;\;x \cdot t\\ \mathbf{elif}\;x \leq 2.95 \cdot 10^{-8}:\\ \;\;\;\;y \cdot 5\\ \mathbf{else}:\\ \;\;\;\;x \cdot t\\ \end{array} \]

Alternative 16: 30.6% 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.6%

    \[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-def99.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. Taylor expanded in y around 0 95.6%

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

    \[\leadsto \color{blue}{t \cdot x} \]
  6. Final simplification34.3%

    \[\leadsto x \cdot t \]

Reproduce

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