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

Percentage Accurate: 99.9% → 99.9%
Time: 10.1s
Alternatives: 12
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 12 alternatives:

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

Initial Program: 99.9% accurate, 1.0× speedup?

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

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

Alternative 1: 99.9% accurate, 0.1× speedup?

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

\\
\mathsf{fma}\left(x, 2 \cdot \left(y + z\right) + t, 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-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. Add Preprocessing
  5. Final simplification99.9%

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

Alternative 2: 47.5% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;x \leq -3.05 \cdot 10^{+184}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq -8.5 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -2.3 \cdot 10^{-25}:\\
\;\;\;\;x \cdot t\\

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

\mathbf{elif}\;x \leq 7.5 \cdot 10^{+242}:\\
\;\;\;\;x \cdot t\\

\mathbf{elif}\;x \leq 1.05 \cdot 10^{+293}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -2.5000000000000001e250 or -3.05000000000000004e184 < x < -8.5000000000000002e95 or 1.05e293 < x

    1. Initial program 100.0%

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

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

    if -2.5000000000000001e250 < x < -3.05000000000000004e184 or 7.49999999999999961e242 < x < 1.05e293

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

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

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

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

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

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

    if -8.5000000000000002e95 < x < -2.2999999999999999e-25 or 1.15e-21 < x < 7.49999999999999961e242

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

      \[\leadsto \color{blue}{t \cdot x} \]
    4. Simplified49.9%

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

    if -2.2999999999999999e-25 < x < 1.15e-21

    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 x around 0 64.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.5 \cdot 10^{+250}:\\ \;\;\;\;2 \cdot \left(x \cdot z\right)\\ \mathbf{elif}\;x \leq -3.05 \cdot 10^{+184}:\\ \;\;\;\;y \cdot \left(x \cdot 2\right)\\ \mathbf{elif}\;x \leq -8.5 \cdot 10^{+95}:\\ \;\;\;\;2 \cdot \left(x \cdot z\right)\\ \mathbf{elif}\;x \leq -2.3 \cdot 10^{-25}:\\ \;\;\;\;x \cdot t\\ \mathbf{elif}\;x \leq 1.15 \cdot 10^{-21}:\\ \;\;\;\;y \cdot 5\\ \mathbf{elif}\;x \leq 7.5 \cdot 10^{+242}:\\ \;\;\;\;x \cdot t\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{+293}:\\ \;\;\;\;y \cdot \left(x \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 66.0% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;x \leq -5 \cdot 10^{-98} \lor \neg \left(x \leq 2.7 \cdot 10^{-29}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.99999999999999964e209 or -1.19999999999999995e185 < x < -5.00000000000000018e-98 or 2.70000000000000023e-29 < x

    1. Initial program 100.0%

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

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

    if -4.99999999999999964e209 < x < -1.19999999999999995e185

    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. 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 y around inf 100.0%

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

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

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

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

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

    if -5.00000000000000018e-98 < x < 2.70000000000000023e-29

    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 x around 0 67.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5 \cdot 10^{+209}:\\ \;\;\;\;x \cdot \left(t + 2 \cdot z\right)\\ \mathbf{elif}\;x \leq -1.2 \cdot 10^{+185}:\\ \;\;\;\;y \cdot \left(x \cdot 2\right)\\ \mathbf{elif}\;x \leq -5 \cdot 10^{-98} \lor \neg \left(x \leq 2.7 \cdot 10^{-29}\right):\\ \;\;\;\;x \cdot \left(t + 2 \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot 5\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 89.3% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;x \leq 1.1 \cdot 10^{-278}:\\
\;\;\;\;x \cdot t\_1 + y \cdot 5\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.69999999999999996e-24 or 1.4000000000000001e-29 < 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. Add Preprocessing
    5. Taylor expanded in x around inf 97.9%

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

    if -1.69999999999999996e-24 < x < 1.1e-278

    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 0 89.4%

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

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

    if 1.1e-278 < x < 1.4000000000000001e-29

    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 inf 88.4%

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

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

Alternative 5: 66.6% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;x \leq -1.9 \cdot 10^{-93} \lor \neg \left(x \leq 3 \cdot 10^{-30}\right):\\
\;\;\;\;x \cdot \left(t + 2 \cdot z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.1500000000000001e185

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

      \[\leadsto \color{blue}{x \cdot \left(t + 2 \cdot y\right)} \]
    7. Step-by-step derivation
      1. *-commutative76.6%

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

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

    if -1.1500000000000001e185 < x < -1.8999999999999999e-93 or 2.9999999999999999e-30 < x

    1. Initial program 100.0%

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

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

    if -1.8999999999999999e-93 < x < 2.9999999999999999e-30

    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 x around 0 67.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.15 \cdot 10^{+185}:\\ \;\;\;\;x \cdot \left(t + 2 \cdot y\right)\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{-93} \lor \neg \left(x \leq 3 \cdot 10^{-30}\right):\\ \;\;\;\;x \cdot \left(t + 2 \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot 5\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 88.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := 2 \cdot \left(y + z\right)\\
\mathbf{if}\;x \leq -1.85 \cdot 10^{-25} \lor \neg \left(x \leq 2.8 \cdot 10^{-24}\right):\\
\;\;\;\;x \cdot \left(t\_1 + t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.85000000000000004e-25 or 2.8000000000000002e-24 < 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. Add Preprocessing
    5. Taylor expanded in x around inf 98.5%

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

    if -1.85000000000000004e-25 < x < 2.8000000000000002e-24

    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 0 82.7%

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

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

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

Alternative 7: 81.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.3 \cdot 10^{-94} \lor \neg \left(x \leq 3.1 \cdot 10^{-30}\right):\\
\;\;\;\;x \cdot \left(2 \cdot \left(y + z\right) + t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.3000000000000001e-94 or 3.09999999999999991e-30 < 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. Add Preprocessing
    5. Taylor expanded in x around inf 95.6%

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

    if -3.3000000000000001e-94 < x < 3.09999999999999991e-30

    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 x around 0 67.6%

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

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

Alternative 8: 47.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \cdot 10^{+97}:\\
\;\;\;\;2 \cdot \left(x \cdot z\right)\\

\mathbf{elif}\;x \leq -1.8 \cdot 10^{-26} \lor \neg \left(x \leq 1.15 \cdot 10^{-21}\right):\\
\;\;\;\;x \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.54999999999999991e97

    1. Initial program 100.0%

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

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

    if -1.54999999999999991e97 < x < -1.8000000000000001e-26 or 1.15e-21 < x

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{t \cdot x} \]
    4. Simplified46.8%

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

    if -1.8000000000000001e-26 < x < 1.15e-21

    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 x around 0 64.3%

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

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

Alternative 9: 78.4% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+84} \lor \neg \left(y \leq 1.2 \cdot 10^{+46}\right):\\
\;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.85e84 or 1.20000000000000004e46 < 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 inf 84.3%

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

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

    if -1.85e84 < y < 1.20000000000000004e46

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

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

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

Alternative 10: 99.9% accurate, 1.0× speedup?

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

\\
x \cdot \left(t + \left(y + \left(z + \left(y + z\right)\right)\right)\right) + y \cdot 5
\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. Final simplification99.9%

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

Alternative 11: 47.6% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.3 \cdot 10^{-26} \lor \neg \left(x \leq 4.2 \cdot 10^{-20}\right):\\
\;\;\;\;x \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.29999999999999988e-26 or 4.1999999999999998e-20 < x

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{t \cdot x} \]
    4. Simplified41.0%

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

    if -4.29999999999999988e-26 < x < 4.1999999999999998e-20

    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 x around 0 64.3%

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

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

Alternative 12: 29.5% accurate, 5.0× speedup?

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

\\
y \cdot 5
\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 x around 0 29.4%

    \[\leadsto \color{blue}{5 \cdot y} \]
  4. Final simplification29.4%

    \[\leadsto y \cdot 5 \]
  5. Add Preprocessing

Reproduce

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