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

Percentage Accurate: 99.9% → 100.0%
Time: 9.8s
Alternatives: 11
Speedup: 1.2×

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 11 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: 100.0% accurate, 1.2× speedup?

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

\\
\mathsf{fma}\left(y, 5, x \cdot \mathsf{fma}\left(2, y + z, t\right)\right)
\end{array}
Derivation
  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 x around 0

    \[\leadsto \color{blue}{5 \cdot y} \]
  4. Step-by-step derivation
    1. lower-*.f6426.7

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

    \[\leadsto \color{blue}{5 \cdot y} \]
  6. Taylor expanded in t around inf

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

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

    \[\leadsto \color{blue}{5 \cdot y + x \cdot \left(t + \left(2 \cdot y + 2 \cdot z\right)\right)} \]
  9. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto 5 \cdot y + \color{blue}{\left(t + \left(2 \cdot y + 2 \cdot z\right)\right) \cdot x} \]
    2. distribute-lft-inN/A

      \[\leadsto 5 \cdot y + \left(t + \color{blue}{2 \cdot \left(y + z\right)}\right) \cdot x \]
    3. *-commutativeN/A

      \[\leadsto \color{blue}{y \cdot 5} + \left(t + 2 \cdot \left(y + z\right)\right) \cdot x \]
    4. *-commutativeN/A

      \[\leadsto y \cdot 5 + \color{blue}{x \cdot \left(t + 2 \cdot \left(y + z\right)\right)} \]
    5. distribute-rgt-inN/A

      \[\leadsto y \cdot 5 + \color{blue}{\left(t \cdot x + \left(2 \cdot \left(y + z\right)\right) \cdot x\right)} \]
    6. *-commutativeN/A

      \[\leadsto y \cdot 5 + \left(t \cdot x + \color{blue}{x \cdot \left(2 \cdot \left(y + z\right)\right)}\right) \]
    7. distribute-lft-inN/A

      \[\leadsto y \cdot 5 + \left(t \cdot x + x \cdot \color{blue}{\left(2 \cdot y + 2 \cdot z\right)}\right) \]
    8. lower-fma.f64N/A

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, t \cdot x + x \cdot \left(2 \cdot y + 2 \cdot z\right)\right)} \]
    9. distribute-lft-inN/A

      \[\leadsto \mathsf{fma}\left(y, 5, t \cdot x + x \cdot \color{blue}{\left(2 \cdot \left(y + z\right)\right)}\right) \]
    10. *-commutativeN/A

      \[\leadsto \mathsf{fma}\left(y, 5, t \cdot x + \color{blue}{\left(2 \cdot \left(y + z\right)\right) \cdot x}\right) \]
    11. distribute-rgt-inN/A

      \[\leadsto \mathsf{fma}\left(y, 5, \color{blue}{x \cdot \left(t + 2 \cdot \left(y + z\right)\right)}\right) \]
    12. lower-*.f64N/A

      \[\leadsto \mathsf{fma}\left(y, 5, \color{blue}{x \cdot \left(t + 2 \cdot \left(y + z\right)\right)}\right) \]
    13. +-commutativeN/A

      \[\leadsto \mathsf{fma}\left(y, 5, x \cdot \color{blue}{\left(2 \cdot \left(y + z\right) + t\right)}\right) \]
    14. lower-fma.f64N/A

      \[\leadsto \mathsf{fma}\left(y, 5, x \cdot \color{blue}{\mathsf{fma}\left(2, y + z, t\right)}\right) \]
    15. lower-+.f64100.0

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

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

Alternative 2: 99.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \mathsf{fma}\left(2, y + z, t\right)\\ \mathbf{if}\;x \leq -2.5:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 2.5:\\ \;\;\;\;\mathsf{fma}\left(t + \left(z + z\right), x, y \cdot 5\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (fma 2.0 (+ y z) t))))
   (if (<= x -2.5) t_1 (if (<= x 2.5) (fma (+ t (+ z z)) x (* y 5.0)) t_1))))
double code(double x, double y, double z, double t) {
	double t_1 = x * fma(2.0, (y + z), t);
	double tmp;
	if (x <= -2.5) {
		tmp = t_1;
	} else if (x <= 2.5) {
		tmp = fma((t + (z + z)), x, (y * 5.0));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t)
	t_1 = Float64(x * fma(2.0, Float64(y + z), t))
	tmp = 0.0
	if (x <= -2.5)
		tmp = t_1;
	elseif (x <= 2.5)
		tmp = fma(Float64(t + Float64(z + z)), x, Float64(y * 5.0));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(2.0 * N[(y + z), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.5], t$95$1, If[LessEqual[x, 2.5], N[(N[(t + N[(z + z), $MachinePrecision]), $MachinePrecision] * x + N[(y * 5.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq 2.5:\\
\;\;\;\;\mathsf{fma}\left(t + \left(z + z\right), x, y \cdot 5\right)\\

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


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

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{x \cdot \left(t + \left(2 \cdot y + 2 \cdot z\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \left(t + \left(2 \cdot y + 2 \cdot z\right)\right)} \]
      2. +-commutativeN/A

        \[\leadsto x \cdot \color{blue}{\left(\left(2 \cdot y + 2 \cdot z\right) + t\right)} \]
      3. distribute-lft-outN/A

        \[\leadsto x \cdot \left(\color{blue}{2 \cdot \left(y + z\right)} + t\right) \]
      4. lower-fma.f64N/A

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

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

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

    if -2.5 < x < 2.5

    1. Initial program 99.9%

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

        \[\leadsto \color{blue}{x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5} \]
      2. lift-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)} + y \cdot 5 \]
      3. *-commutativeN/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) \cdot x} + y \cdot 5 \]
      4. lower-fma.f6499.9

        \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\left(\left(y + z\right) + z\right) + y\right) + t, x, y \cdot 5\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\left(\left(y + z\right) + z\right) + y\right)} + t, x, y \cdot 5\right) \]
      6. lift-+.f64N/A

        \[\leadsto \mathsf{fma}\left(\left(\color{blue}{\left(\left(y + z\right) + z\right)} + y\right) + t, x, y \cdot 5\right) \]
      7. associate-+l+N/A

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

        \[\leadsto \mathsf{fma}\left(\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right) + t, x, y \cdot 5\right) \]
      9. lift-+.f64N/A

        \[\leadsto \mathsf{fma}\left(\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right) + t, x, y \cdot 5\right) \]
      10. flip-+N/A

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{z \cdot z - z \cdot z}{\color{blue}{z - z}} + t, x, y \cdot 5\right) \]
      15. flip-+N/A

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

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

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

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

Alternative 3: 99.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \mathsf{fma}\left(2, y + z, t\right)\\ \mathbf{if}\;x \leq -2.5:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 2.5:\\ \;\;\;\;\mathsf{fma}\left(y, 5, x \cdot \left(t + \left(z + z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (fma 2.0 (+ y z) t))))
   (if (<= x -2.5) t_1 (if (<= x 2.5) (fma y 5.0 (* x (+ t (+ z z)))) t_1))))
double code(double x, double y, double z, double t) {
	double t_1 = x * fma(2.0, (y + z), t);
	double tmp;
	if (x <= -2.5) {
		tmp = t_1;
	} else if (x <= 2.5) {
		tmp = fma(y, 5.0, (x * (t + (z + z))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t)
	t_1 = Float64(x * fma(2.0, Float64(y + z), t))
	tmp = 0.0
	if (x <= -2.5)
		tmp = t_1;
	elseif (x <= 2.5)
		tmp = fma(y, 5.0, Float64(x * Float64(t + Float64(z + z))));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(2.0 * N[(y + z), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.5], t$95$1, If[LessEqual[x, 2.5], N[(y * 5.0 + N[(x * N[(t + N[(z + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq 2.5:\\
\;\;\;\;\mathsf{fma}\left(y, 5, x \cdot \left(t + \left(z + z\right)\right)\right)\\

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


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

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{x \cdot \left(t + \left(2 \cdot y + 2 \cdot z\right)\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \left(t + \left(2 \cdot y + 2 \cdot z\right)\right)} \]
      2. +-commutativeN/A

        \[\leadsto x \cdot \color{blue}{\left(\left(2 \cdot y + 2 \cdot z\right) + t\right)} \]
      3. distribute-lft-outN/A

        \[\leadsto x \cdot \left(\color{blue}{2 \cdot \left(y + z\right)} + t\right) \]
      4. lower-fma.f64N/A

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

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

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

    if -2.5 < x < 2.5

    1. Initial program 99.9%

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

        \[\leadsto \color{blue}{x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{y \cdot 5 + x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)} \]
      3. lift-*.f64N/A

        \[\leadsto \color{blue}{y \cdot 5} + x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) \]
      4. lower-fma.f64100.0

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \mathsf{fma}\left(y, 5, x \cdot \left(\color{blue}{\left(\left(\left(y + z\right) + z\right) + y\right)} + t\right)\right) \]
      6. lift-+.f64N/A

        \[\leadsto \mathsf{fma}\left(y, 5, x \cdot \left(\left(\color{blue}{\left(\left(y + z\right) + z\right)} + y\right) + t\right)\right) \]
      7. associate-+l+N/A

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

        \[\leadsto \mathsf{fma}\left(y, 5, x \cdot \left(\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right) + t\right)\right) \]
      9. lift-+.f64N/A

        \[\leadsto \mathsf{fma}\left(y, 5, x \cdot \left(\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right) + t\right)\right) \]
      10. flip-+N/A

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, 5, x \cdot \left(\frac{z \cdot z - z \cdot z}{\color{blue}{z - z}} + t\right)\right) \]
      15. flip-+N/A

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

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

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

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

Alternative 4: 87.5% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{+47}:\\ \;\;\;\;\mathsf{fma}\left(y, 5, x \cdot \left(z + z\right)\right)\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+83}:\\ \;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(y, 2, t\right), y \cdot 5\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z + z, x, y \cdot 5\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -1.45e+47)
   (fma y 5.0 (* x (+ z z)))
   (if (<= z 1.4e+83)
     (fma x (fma y 2.0 t) (* y 5.0))
     (fma (+ z z) x (* y 5.0)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -1.45e+47) {
		tmp = fma(y, 5.0, (x * (z + z)));
	} else if (z <= 1.4e+83) {
		tmp = fma(x, fma(y, 2.0, t), (y * 5.0));
	} else {
		tmp = fma((z + z), x, (y * 5.0));
	}
	return tmp;
}
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -1.45e+47)
		tmp = fma(y, 5.0, Float64(x * Float64(z + z)));
	elseif (z <= 1.4e+83)
		tmp = fma(x, fma(y, 2.0, t), Float64(y * 5.0));
	else
		tmp = fma(Float64(z + z), x, Float64(y * 5.0));
	end
	return tmp
end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.45e+47], N[(y * 5.0 + N[(x * N[(z + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e+83], N[(x * N[(y * 2.0 + t), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision], N[(N[(z + z), $MachinePrecision] * x + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+47}:\\
\;\;\;\;\mathsf{fma}\left(y, 5, x \cdot \left(z + z\right)\right)\\

\mathbf{elif}\;z \leq 1.4 \cdot 10^{+83}:\\
\;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(y, 2, t\right), y \cdot 5\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.4499999999999999e47

    1. Initial program 100.0%

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

        \[\leadsto \color{blue}{x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5} \]
      2. lift-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)} + y \cdot 5 \]
      3. *-commutativeN/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) \cdot x} + y \cdot 5 \]
      4. lower-fma.f64100.0

        \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\left(\left(y + z\right) + z\right) + y\right) + t, x, y \cdot 5\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\left(\left(y + z\right) + z\right) + y\right)} + t, x, y \cdot 5\right) \]
      6. lift-+.f64N/A

        \[\leadsto \mathsf{fma}\left(\left(\color{blue}{\left(\left(y + z\right) + z\right)} + y\right) + t, x, y \cdot 5\right) \]
      7. associate-+l+N/A

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

        \[\leadsto \mathsf{fma}\left(\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right) + t, x, y \cdot 5\right) \]
      9. lift-+.f64N/A

        \[\leadsto \mathsf{fma}\left(\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right) + t, x, y \cdot 5\right) \]
      10. flip-+N/A

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{z \cdot z - z \cdot z}{\color{blue}{z - z}} + t, x, y \cdot 5\right) \]
      15. flip-+N/A

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

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

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

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

        \[\leadsto \color{blue}{t \cdot x} \]
    7. Applied rewrites12.7%

      \[\leadsto \color{blue}{t \cdot x} \]
    8. Taylor expanded in t around 0

      \[\leadsto \color{blue}{2 \cdot \left(x \cdot z\right) + 5 \cdot y} \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{5 \cdot y + 2 \cdot \left(x \cdot z\right)} \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{y \cdot 5} + 2 \cdot \left(x \cdot z\right) \]
      3. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, 2 \cdot \left(x \cdot z\right)\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(y, 5, \color{blue}{2 \cdot \left(x \cdot z\right)}\right) \]
      5. lower-*.f6487.2

        \[\leadsto \mathsf{fma}\left(y, 5, 2 \cdot \color{blue}{\left(x \cdot z\right)}\right) \]
    10. Applied rewrites87.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, 2 \cdot \left(x \cdot z\right)\right)} \]
    11. Step-by-step derivation
      1. Applied rewrites87.2%

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

      if -1.4499999999999999e47 < z < 1.4e83

      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 0

        \[\leadsto \color{blue}{5 \cdot y + x \cdot \left(t + 2 \cdot y\right)} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{x \cdot \left(t + 2 \cdot y\right) + 5 \cdot y} \]
        2. lower-fma.f64N/A

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

          \[\leadsto \mathsf{fma}\left(x, \color{blue}{2 \cdot y + t}, 5 \cdot y\right) \]
        4. *-commutativeN/A

          \[\leadsto \mathsf{fma}\left(x, \color{blue}{y \cdot 2} + t, 5 \cdot y\right) \]
        5. lower-fma.f64N/A

          \[\leadsto \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(y, 2, t\right)}, 5 \cdot y\right) \]
        6. lower-*.f6494.1

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

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

      if 1.4e83 < z

      1. Initial program 99.9%

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

          \[\leadsto \color{blue}{x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5} \]
        2. lift-*.f64N/A

          \[\leadsto \color{blue}{x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right)} + y \cdot 5 \]
        3. *-commutativeN/A

          \[\leadsto \color{blue}{\left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) \cdot x} + y \cdot 5 \]
        4. lower-fma.f64100.0

          \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\left(\left(y + z\right) + z\right) + y\right) + t, x, y \cdot 5\right)} \]
        5. lift-+.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\left(\left(y + z\right) + z\right) + y\right)} + t, x, y \cdot 5\right) \]
        6. lift-+.f64N/A

          \[\leadsto \mathsf{fma}\left(\left(\color{blue}{\left(\left(y + z\right) + z\right)} + y\right) + t, x, y \cdot 5\right) \]
        7. associate-+l+N/A

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

          \[\leadsto \mathsf{fma}\left(\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right) + t, x, y \cdot 5\right) \]
        9. lift-+.f64N/A

          \[\leadsto \mathsf{fma}\left(\left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right) + t, x, y \cdot 5\right) \]
        10. flip-+N/A

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{z \cdot z - z \cdot z}{\color{blue}{z - z}} + t, x, y \cdot 5\right) \]
        15. flip-+N/A

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

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

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

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

          \[\leadsto \color{blue}{t \cdot x} \]
      7. Applied rewrites15.8%

        \[\leadsto \color{blue}{t \cdot x} \]
      8. Taylor expanded in t around 0

        \[\leadsto \color{blue}{2 \cdot \left(x \cdot z\right) + 5 \cdot y} \]
      9. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{5 \cdot y + 2 \cdot \left(x \cdot z\right)} \]
        2. *-commutativeN/A

          \[\leadsto \color{blue}{y \cdot 5} + 2 \cdot \left(x \cdot z\right) \]
        3. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, 2 \cdot \left(x \cdot z\right)\right)} \]
        4. lower-*.f64N/A

          \[\leadsto \mathsf{fma}\left(y, 5, \color{blue}{2 \cdot \left(x \cdot z\right)}\right) \]
        5. lower-*.f6491.3

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, 5, 2 \cdot \left(x \cdot z\right)\right)} \]
      11. Step-by-step derivation
        1. Applied rewrites91.3%

          \[\leadsto \mathsf{fma}\left(z + z, \color{blue}{x}, y \cdot 5\right) \]
      12. Recombined 3 regimes into one program.
      13. Final simplification92.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{+47}:\\ \;\;\;\;\mathsf{fma}\left(y, 5, x \cdot \left(z + z\right)\right)\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+83}:\\ \;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(y, 2, t\right), y \cdot 5\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z + z, x, y \cdot 5\right)\\ \end{array} \]
      14. Add Preprocessing

      Alternative 5: 86.4% accurate, 1.0× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \mathsf{fma}\left(2, y + z, t\right)\\ \mathbf{if}\;x \leq -2.5 \cdot 10^{-148}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 4.8 \cdot 10^{-5}:\\ \;\;\;\;y \cdot 5 + x \cdot t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t)
       :precision binary64
       (let* ((t_1 (* x (fma 2.0 (+ y z) t))))
         (if (<= x -2.5e-148) t_1 (if (<= x 4.8e-5) (+ (* y 5.0) (* x t)) t_1))))
      double code(double x, double y, double z, double t) {
      	double t_1 = x * fma(2.0, (y + z), t);
      	double tmp;
      	if (x <= -2.5e-148) {
      		tmp = t_1;
      	} else if (x <= 4.8e-5) {
      		tmp = (y * 5.0) + (x * t);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t)
      	t_1 = Float64(x * fma(2.0, Float64(y + z), t))
      	tmp = 0.0
      	if (x <= -2.5e-148)
      		tmp = t_1;
      	elseif (x <= 4.8e-5)
      		tmp = Float64(Float64(y * 5.0) + Float64(x * t));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(2.0 * N[(y + z), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.5e-148], t$95$1, If[LessEqual[x, 4.8e-5], N[(N[(y * 5.0), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := x \cdot \mathsf{fma}\left(2, y + z, t\right)\\
      \mathbf{if}\;x \leq -2.5 \cdot 10^{-148}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;x \leq 4.8 \cdot 10^{-5}:\\
      \;\;\;\;y \cdot 5 + x \cdot t\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < -2.4999999999999999e-148 or 4.8000000000000001e-5 < x

        1. Initial program 100.0%

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

          \[\leadsto \color{blue}{x \cdot \left(t + \left(2 \cdot y + 2 \cdot z\right)\right)} \]
        4. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \color{blue}{x \cdot \left(t + \left(2 \cdot y + 2 \cdot z\right)\right)} \]
          2. +-commutativeN/A

            \[\leadsto x \cdot \color{blue}{\left(\left(2 \cdot y + 2 \cdot z\right) + t\right)} \]
          3. distribute-lft-outN/A

            \[\leadsto x \cdot \left(\color{blue}{2 \cdot \left(y + z\right)} + t\right) \]
          4. lower-fma.f64N/A

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

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

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

        if -2.4999999999999999e-148 < x < 4.8000000000000001e-5

        1. Initial program 99.9%

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

          \[\leadsto \color{blue}{t \cdot x} + y \cdot 5 \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \color{blue}{x \cdot t} + y \cdot 5 \]
          2. lower-*.f6482.4

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

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

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

      Alternative 6: 78.8% accurate, 1.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \mathsf{fma}\left(x, 2, 5\right)\\ \mathbf{if}\;y \leq -1.1 \cdot 10^{+56}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{+24}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(2, z, t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t)
       :precision binary64
       (let* ((t_1 (* y (fma x 2.0 5.0))))
         (if (<= y -1.1e+56) t_1 (if (<= y 7.5e+24) (* x (fma 2.0 z t)) t_1))))
      double code(double x, double y, double z, double t) {
      	double t_1 = y * fma(x, 2.0, 5.0);
      	double tmp;
      	if (y <= -1.1e+56) {
      		tmp = t_1;
      	} else if (y <= 7.5e+24) {
      		tmp = x * fma(2.0, z, t);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t)
      	t_1 = Float64(y * fma(x, 2.0, 5.0))
      	tmp = 0.0
      	if (y <= -1.1e+56)
      		tmp = t_1;
      	elseif (y <= 7.5e+24)
      		tmp = Float64(x * fma(2.0, z, t));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(x * 2.0 + 5.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.1e+56], t$95$1, If[LessEqual[y, 7.5e+24], N[(x * N[(2.0 * z + t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := y \cdot \mathsf{fma}\left(x, 2, 5\right)\\
      \mathbf{if}\;y \leq -1.1 \cdot 10^{+56}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;y \leq 7.5 \cdot 10^{+24}:\\
      \;\;\;\;x \cdot \mathsf{fma}\left(2, z, t\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y < -1.10000000000000008e56 or 7.50000000000000014e24 < 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

          \[\leadsto \color{blue}{y \cdot \left(5 + 2 \cdot x\right)} \]
        4. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto y \cdot \color{blue}{\left(2 \cdot x + 5\right)} \]
          2. metadata-evalN/A

            \[\leadsto y \cdot \left(\color{blue}{\left(\mathsf{neg}\left(-2\right)\right)} \cdot x + 5\right) \]
          3. distribute-lft-neg-inN/A

            \[\leadsto y \cdot \left(\color{blue}{\left(\mathsf{neg}\left(-2 \cdot x\right)\right)} + 5\right) \]
          4. neg-sub0N/A

            \[\leadsto y \cdot \left(\color{blue}{\left(0 - -2 \cdot x\right)} + 5\right) \]
          5. associate--r-N/A

            \[\leadsto y \cdot \color{blue}{\left(0 - \left(-2 \cdot x - 5\right)\right)} \]
          6. neg-sub0N/A

            \[\leadsto y \cdot \color{blue}{\left(\mathsf{neg}\left(\left(-2 \cdot x - 5\right)\right)\right)} \]
          7. lower-*.f64N/A

            \[\leadsto \color{blue}{y \cdot \left(\mathsf{neg}\left(\left(-2 \cdot x - 5\right)\right)\right)} \]
          8. neg-sub0N/A

            \[\leadsto y \cdot \color{blue}{\left(0 - \left(-2 \cdot x - 5\right)\right)} \]
          9. associate--r-N/A

            \[\leadsto y \cdot \color{blue}{\left(\left(0 - -2 \cdot x\right) + 5\right)} \]
          10. neg-sub0N/A

            \[\leadsto y \cdot \left(\color{blue}{\left(\mathsf{neg}\left(-2 \cdot x\right)\right)} + 5\right) \]
          11. distribute-lft-neg-inN/A

            \[\leadsto y \cdot \left(\color{blue}{\left(\mathsf{neg}\left(-2\right)\right) \cdot x} + 5\right) \]
          12. metadata-evalN/A

            \[\leadsto y \cdot \left(\color{blue}{2} \cdot x + 5\right) \]
          13. *-commutativeN/A

            \[\leadsto y \cdot \left(\color{blue}{x \cdot 2} + 5\right) \]
          14. lower-fma.f6479.9

            \[\leadsto y \cdot \color{blue}{\mathsf{fma}\left(x, 2, 5\right)} \]
        5. Applied rewrites79.9%

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

        if -1.10000000000000008e56 < y < 7.50000000000000014e24

        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

          \[\leadsto \color{blue}{x \cdot \left(t + 2 \cdot z\right)} \]
        4. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \color{blue}{x \cdot \left(t + 2 \cdot z\right)} \]
          2. +-commutativeN/A

            \[\leadsto x \cdot \color{blue}{\left(2 \cdot z + t\right)} \]
          3. lower-fma.f6483.3

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

          \[\leadsto \color{blue}{x \cdot \mathsf{fma}\left(2, z, t\right)} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 7: 64.1% accurate, 1.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \mathsf{fma}\left(2, z, t\right)\\ \mathbf{if}\;z \leq -5.5 \cdot 10^{-45}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.36 \cdot 10^{+23}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(y, 2, t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t)
       :precision binary64
       (let* ((t_1 (* x (fma 2.0 z t))))
         (if (<= z -5.5e-45) t_1 (if (<= z 1.36e+23) (* x (fma y 2.0 t)) t_1))))
      double code(double x, double y, double z, double t) {
      	double t_1 = x * fma(2.0, z, t);
      	double tmp;
      	if (z <= -5.5e-45) {
      		tmp = t_1;
      	} else if (z <= 1.36e+23) {
      		tmp = x * fma(y, 2.0, t);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t)
      	t_1 = Float64(x * fma(2.0, z, t))
      	tmp = 0.0
      	if (z <= -5.5e-45)
      		tmp = t_1;
      	elseif (z <= 1.36e+23)
      		tmp = Float64(x * fma(y, 2.0, t));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(2.0 * z + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.5e-45], t$95$1, If[LessEqual[z, 1.36e+23], N[(x * N[(y * 2.0 + t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := x \cdot \mathsf{fma}\left(2, z, t\right)\\
      \mathbf{if}\;z \leq -5.5 \cdot 10^{-45}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq 1.36 \cdot 10^{+23}:\\
      \;\;\;\;x \cdot \mathsf{fma}\left(y, 2, t\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -5.5000000000000003e-45 or 1.36e23 < z

        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

          \[\leadsto \color{blue}{x \cdot \left(t + 2 \cdot z\right)} \]
        4. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \color{blue}{x \cdot \left(t + 2 \cdot z\right)} \]
          2. +-commutativeN/A

            \[\leadsto x \cdot \color{blue}{\left(2 \cdot z + t\right)} \]
          3. lower-fma.f6476.6

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

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

        if -5.5000000000000003e-45 < z < 1.36e23

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

          \[\leadsto \color{blue}{x \cdot \left(t + \left(2 \cdot y + 2 \cdot z\right)\right)} \]
        4. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \color{blue}{x \cdot \left(t + \left(2 \cdot y + 2 \cdot z\right)\right)} \]
          2. +-commutativeN/A

            \[\leadsto x \cdot \color{blue}{\left(\left(2 \cdot y + 2 \cdot z\right) + t\right)} \]
          3. distribute-lft-outN/A

            \[\leadsto x \cdot \left(\color{blue}{2 \cdot \left(y + z\right)} + t\right) \]
          4. lower-fma.f64N/A

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

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

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

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

            \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{2}, t\right) \]
        8. Recombined 2 regimes into one program.
        9. Add Preprocessing

        Alternative 8: 58.8% accurate, 1.1× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(z + z\right)\\ \mathbf{if}\;z \leq -3.6 \cdot 10^{+47}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+83}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(y, 2, t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (let* ((t_1 (* x (+ z z))))
           (if (<= z -3.6e+47) t_1 (if (<= z 1.4e+83) (* x (fma y 2.0 t)) t_1))))
        double code(double x, double y, double z, double t) {
        	double t_1 = x * (z + z);
        	double tmp;
        	if (z <= -3.6e+47) {
        		tmp = t_1;
        	} else if (z <= 1.4e+83) {
        		tmp = x * fma(y, 2.0, t);
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        function code(x, y, z, t)
        	t_1 = Float64(x * Float64(z + z))
        	tmp = 0.0
        	if (z <= -3.6e+47)
        		tmp = t_1;
        	elseif (z <= 1.4e+83)
        		tmp = Float64(x * fma(y, 2.0, t));
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(z + z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.6e+47], t$95$1, If[LessEqual[z, 1.4e+83], N[(x * N[(y * 2.0 + t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := x \cdot \left(z + z\right)\\
        \mathbf{if}\;z \leq -3.6 \cdot 10^{+47}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;z \leq 1.4 \cdot 10^{+83}:\\
        \;\;\;\;x \cdot \mathsf{fma}\left(y, 2, t\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -3.60000000000000008e47 or 1.4e83 < z

          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

            \[\leadsto \color{blue}{2 \cdot \left(x \cdot z\right)} \]
          4. Step-by-step derivation
            1. associate-*r*N/A

              \[\leadsto \color{blue}{\left(2 \cdot x\right) \cdot z} \]
            2. *-commutativeN/A

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

              \[\leadsto \color{blue}{x \cdot \left(2 \cdot z\right)} \]
            4. lower-*.f64N/A

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

              \[\leadsto x \cdot \color{blue}{\left(2 \cdot z\right)} \]
          5. Applied rewrites69.1%

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

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

            if -3.60000000000000008e47 < z < 1.4e83

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

              \[\leadsto \color{blue}{x \cdot \left(t + \left(2 \cdot y + 2 \cdot z\right)\right)} \]
            4. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto \color{blue}{x \cdot \left(t + \left(2 \cdot y + 2 \cdot z\right)\right)} \]
              2. +-commutativeN/A

                \[\leadsto x \cdot \color{blue}{\left(\left(2 \cdot y + 2 \cdot z\right) + t\right)} \]
              3. distribute-lft-outN/A

                \[\leadsto x \cdot \left(\color{blue}{2 \cdot \left(y + z\right)} + t\right) \]
              4. lower-fma.f64N/A

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

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

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

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

                \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{2}, t\right) \]
            8. Recombined 2 regimes into one program.
            9. Final simplification67.4%

              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+47}:\\ \;\;\;\;x \cdot \left(z + z\right)\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+83}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(y, 2, t\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(z + z\right)\\ \end{array} \]
            10. Add Preprocessing

            Alternative 9: 46.2% accurate, 1.2× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(z + z\right)\\ \mathbf{if}\;z \leq -2.2 \cdot 10^{+40}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{+82}:\\ \;\;\;\;x \cdot t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
            (FPCore (x y z t)
             :precision binary64
             (let* ((t_1 (* x (+ z z))))
               (if (<= z -2.2e+40) t_1 (if (<= z 2.15e+82) (* x t) t_1))))
            double code(double x, double y, double z, double t) {
            	double t_1 = x * (z + z);
            	double tmp;
            	if (z <= -2.2e+40) {
            		tmp = t_1;
            	} else if (z <= 2.15e+82) {
            		tmp = x * t;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            real(8) function code(x, y, z, t)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8) :: t_1
                real(8) :: tmp
                t_1 = x * (z + z)
                if (z <= (-2.2d+40)) then
                    tmp = t_1
                else if (z <= 2.15d+82) then
                    tmp = x * t
                else
                    tmp = t_1
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t) {
            	double t_1 = x * (z + z);
            	double tmp;
            	if (z <= -2.2e+40) {
            		tmp = t_1;
            	} else if (z <= 2.15e+82) {
            		tmp = x * t;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t):
            	t_1 = x * (z + z)
            	tmp = 0
            	if z <= -2.2e+40:
            		tmp = t_1
            	elif z <= 2.15e+82:
            		tmp = x * t
            	else:
            		tmp = t_1
            	return tmp
            
            function code(x, y, z, t)
            	t_1 = Float64(x * Float64(z + z))
            	tmp = 0.0
            	if (z <= -2.2e+40)
            		tmp = t_1;
            	elseif (z <= 2.15e+82)
            		tmp = Float64(x * t);
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t)
            	t_1 = x * (z + z);
            	tmp = 0.0;
            	if (z <= -2.2e+40)
            		tmp = t_1;
            	elseif (z <= 2.15e+82)
            		tmp = x * t;
            	else
            		tmp = t_1;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(z + z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.2e+40], t$95$1, If[LessEqual[z, 2.15e+82], N[(x * t), $MachinePrecision], t$95$1]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := x \cdot \left(z + z\right)\\
            \mathbf{if}\;z \leq -2.2 \cdot 10^{+40}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;z \leq 2.15 \cdot 10^{+82}:\\
            \;\;\;\;x \cdot t\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z < -2.1999999999999999e40 or 2.15000000000000007e82 < z

              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

                \[\leadsto \color{blue}{2 \cdot \left(x \cdot z\right)} \]
              4. Step-by-step derivation
                1. associate-*r*N/A

                  \[\leadsto \color{blue}{\left(2 \cdot x\right) \cdot z} \]
                2. *-commutativeN/A

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

                  \[\leadsto \color{blue}{x \cdot \left(2 \cdot z\right)} \]
                4. lower-*.f64N/A

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

                  \[\leadsto x \cdot \color{blue}{\left(2 \cdot z\right)} \]
              5. Applied rewrites69.1%

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

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

                if -2.1999999999999999e40 < z < 2.15000000000000007e82

                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

                  \[\leadsto \color{blue}{t \cdot x} \]
                4. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \color{blue}{x \cdot t} \]
                  2. lower-*.f6445.8

                    \[\leadsto \color{blue}{x \cdot t} \]
                5. Applied rewrites45.8%

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+40}:\\ \;\;\;\;x \cdot \left(z + z\right)\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{+82}:\\ \;\;\;\;x \cdot t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(z + z\right)\\ \end{array} \]
              9. Add Preprocessing

              Alternative 10: 43.9% accurate, 1.4× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.4 \cdot 10^{-10}:\\ \;\;\;\;x \cdot t\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{+77}:\\ \;\;\;\;y \cdot 5\\ \mathbf{else}:\\ \;\;\;\;x \cdot t\\ \end{array} \end{array} \]
              (FPCore (x y z t)
               :precision binary64
               (if (<= t -1.4e-10) (* x t) (if (<= t 3.3e+77) (* y 5.0) (* x t))))
              double code(double x, double y, double z, double t) {
              	double tmp;
              	if (t <= -1.4e-10) {
              		tmp = x * t;
              	} else if (t <= 3.3e+77) {
              		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 (t <= (-1.4d-10)) then
                      tmp = x * t
                  else if (t <= 3.3d+77) 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 (t <= -1.4e-10) {
              		tmp = x * t;
              	} else if (t <= 3.3e+77) {
              		tmp = y * 5.0;
              	} else {
              		tmp = x * t;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t):
              	tmp = 0
              	if t <= -1.4e-10:
              		tmp = x * t
              	elif t <= 3.3e+77:
              		tmp = y * 5.0
              	else:
              		tmp = x * t
              	return tmp
              
              function code(x, y, z, t)
              	tmp = 0.0
              	if (t <= -1.4e-10)
              		tmp = Float64(x * t);
              	elseif (t <= 3.3e+77)
              		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 (t <= -1.4e-10)
              		tmp = x * t;
              	elseif (t <= 3.3e+77)
              		tmp = y * 5.0;
              	else
              		tmp = x * t;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_] := If[LessEqual[t, -1.4e-10], N[(x * t), $MachinePrecision], If[LessEqual[t, 3.3e+77], N[(y * 5.0), $MachinePrecision], N[(x * t), $MachinePrecision]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;t \leq -1.4 \cdot 10^{-10}:\\
              \;\;\;\;x \cdot t\\
              
              \mathbf{elif}\;t \leq 3.3 \cdot 10^{+77}:\\
              \;\;\;\;y \cdot 5\\
              
              \mathbf{else}:\\
              \;\;\;\;x \cdot t\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if t < -1.40000000000000008e-10 or 3.2999999999999998e77 < t

                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

                  \[\leadsto \color{blue}{t \cdot x} \]
                4. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \color{blue}{x \cdot t} \]
                  2. lower-*.f6464.4

                    \[\leadsto \color{blue}{x \cdot t} \]
                5. Applied rewrites64.4%

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

                if -1.40000000000000008e-10 < t < 3.2999999999999998e77

                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

                  \[\leadsto \color{blue}{5 \cdot y} \]
                4. Step-by-step derivation
                  1. lower-*.f6435.8

                    \[\leadsto \color{blue}{5 \cdot y} \]
                5. Applied rewrites35.8%

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.4 \cdot 10^{-10}:\\ \;\;\;\;x \cdot t\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{+77}:\\ \;\;\;\;y \cdot 5\\ \mathbf{else}:\\ \;\;\;\;x \cdot t\\ \end{array} \]
              5. Add Preprocessing

              Alternative 11: 30.5% accurate, 4.3× 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 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 x around 0

                \[\leadsto \color{blue}{5 \cdot y} \]
              4. Step-by-step derivation
                1. lower-*.f6426.7

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

                \[\leadsto \color{blue}{5 \cdot y} \]
              6. Final simplification26.7%

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

              Reproduce

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