Data.Metrics.Snapshot:quantile from metrics-0.3.0.2

Percentage Accurate: 100.0% → 100.0%
Time: 11.1s
Alternatives: 11
Speedup: 1.0×

Specification

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

\\
x + \left(y - z\right) \cdot \left(t - x\right)
\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: 100.0% accurate, 1.0× speedup?

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

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

Alternative 1: 100.0% accurate, 1.0× speedup?

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

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

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

Alternative 2: 69.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(t - x\right)\\ t_2 := z \cdot \left(x - t\right)\\ \mathbf{if}\;y \leq -1100:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -2.4 \cdot 10^{-166}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{-11}:\\ \;\;\;\;\mathsf{fma}\left(z, x, x\right)\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{+36}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* y (- t x))) (t_2 (* z (- x t))))
   (if (<= y -1100.0)
     t_1
     (if (<= y -2.4e-166)
       t_2
       (if (<= y 1.4e-11) (fma z x x) (if (<= y 6.4e+36) t_2 t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = y * (t - x);
	double t_2 = z * (x - t);
	double tmp;
	if (y <= -1100.0) {
		tmp = t_1;
	} else if (y <= -2.4e-166) {
		tmp = t_2;
	} else if (y <= 1.4e-11) {
		tmp = fma(z, x, x);
	} else if (y <= 6.4e+36) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t)
	t_1 = Float64(y * Float64(t - x))
	t_2 = Float64(z * Float64(x - t))
	tmp = 0.0
	if (y <= -1100.0)
		tmp = t_1;
	elseif (y <= -2.4e-166)
		tmp = t_2;
	elseif (y <= 1.4e-11)
		tmp = fma(z, x, x);
	elseif (y <= 6.4e+36)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1100.0], t$95$1, If[LessEqual[y, -2.4e-166], t$95$2, If[LessEqual[y, 1.4e-11], N[(z * x + x), $MachinePrecision], If[LessEqual[y, 6.4e+36], t$95$2, t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -2.4 \cdot 10^{-166}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq 1.4 \cdot 10^{-11}:\\
\;\;\;\;\mathsf{fma}\left(z, x, x\right)\\

\mathbf{elif}\;y \leq 6.4 \cdot 10^{+36}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1100 or 6.3999999999999998e36 < y

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{y \cdot \left(t - x\right)} \]
      2. lower--.f6484.6

        \[\leadsto y \cdot \color{blue}{\left(t - x\right)} \]
    5. Applied rewrites84.6%

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

    if -1100 < y < -2.3999999999999999e-166 or 1.4e-11 < y < 6.3999999999999998e36

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(t - x\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

        \[\leadsto \color{blue}{z \cdot \left(\mathsf{neg}\left(\left(t - x\right)\right)\right)} \]
      3. mul-1-negN/A

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

        \[\leadsto \color{blue}{z \cdot \left(-1 \cdot \left(t - x\right)\right)} \]
      5. mul-1-negN/A

        \[\leadsto z \cdot \color{blue}{\left(\mathsf{neg}\left(\left(t - x\right)\right)\right)} \]
      6. sub-negN/A

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

        \[\leadsto z \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(x\right)\right) + t\right)}\right)\right) \]
      8. distribute-neg-inN/A

        \[\leadsto z \cdot \color{blue}{\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) + \left(\mathsf{neg}\left(t\right)\right)\right)} \]
      9. unsub-negN/A

        \[\leadsto z \cdot \color{blue}{\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) - t\right)} \]
      10. remove-double-negN/A

        \[\leadsto z \cdot \left(\color{blue}{x} - t\right) \]
      11. lower--.f6474.1

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

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

    if -2.3999999999999999e-166 < y < 1.4e-11

    1. Initial program 100.0%

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

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

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

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

        \[\leadsto \color{blue}{z \cdot \left(\mathsf{neg}\left(\left(t - x\right)\right)\right)} + x \]
      4. mul-1-negN/A

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(z, -1 \cdot \left(t - x\right), x\right)} \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{neg}\left(\left(t - x\right)\right)}, x\right) \]
      7. sub-negN/A

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

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

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) + \left(\mathsf{neg}\left(t\right)\right)}, x\right) \]
      10. unsub-negN/A

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) - t}, x\right) \]
      11. remove-double-negN/A

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{x} - t, x\right) \]
      12. lower--.f6489.4

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{x - t}, x\right) \]
    5. Applied rewrites89.4%

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

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

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

    Alternative 3: 72.2% accurate, 0.6× speedup?

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

      1. Initial program 100.0%

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

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

          \[\leadsto \color{blue}{y \cdot \left(t - x\right)} \]
        2. lower--.f6482.5

          \[\leadsto y \cdot \color{blue}{\left(t - x\right)} \]
      5. Applied rewrites82.5%

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

      if -1100 < y < -1.3499999999999999e-165

      1. Initial program 100.0%

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

        \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(t - x\right)\right)} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

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

          \[\leadsto \color{blue}{z \cdot \left(\mathsf{neg}\left(\left(t - x\right)\right)\right)} \]
        3. mul-1-negN/A

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

          \[\leadsto \color{blue}{z \cdot \left(-1 \cdot \left(t - x\right)\right)} \]
        5. mul-1-negN/A

          \[\leadsto z \cdot \color{blue}{\left(\mathsf{neg}\left(\left(t - x\right)\right)\right)} \]
        6. sub-negN/A

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

          \[\leadsto z \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(x\right)\right) + t\right)}\right)\right) \]
        8. distribute-neg-inN/A

          \[\leadsto z \cdot \color{blue}{\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) + \left(\mathsf{neg}\left(t\right)\right)\right)} \]
        9. unsub-negN/A

          \[\leadsto z \cdot \color{blue}{\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) - t\right)} \]
        10. remove-double-negN/A

          \[\leadsto z \cdot \left(\color{blue}{x} - t\right) \]
        11. lower--.f6471.5

          \[\leadsto z \cdot \color{blue}{\left(x - t\right)} \]
      5. Applied rewrites71.5%

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

      if -1.3499999999999999e-165 < y < 8.6e18

      1. Initial program 100.0%

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

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

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

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

          \[\leadsto \color{blue}{z \cdot \left(\mathsf{neg}\left(\left(t - x\right)\right)\right)} + x \]
        4. mul-1-negN/A

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(z, -1 \cdot \left(t - x\right), x\right)} \]
        6. mul-1-negN/A

          \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{neg}\left(\left(t - x\right)\right)}, x\right) \]
        7. sub-negN/A

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

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

          \[\leadsto \mathsf{fma}\left(z, \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) + \left(\mathsf{neg}\left(t\right)\right)}, x\right) \]
        10. unsub-negN/A

          \[\leadsto \mathsf{fma}\left(z, \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) - t}, x\right) \]
        11. remove-double-negN/A

          \[\leadsto \mathsf{fma}\left(z, \color{blue}{x} - t, x\right) \]
        12. lower--.f6490.1

          \[\leadsto \mathsf{fma}\left(z, \color{blue}{x - t}, x\right) \]
      5. Applied rewrites90.1%

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

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

          \[\leadsto \mathsf{fma}\left(z, -t, x\right) \]
      8. Recombined 3 regimes into one program.
      9. Add Preprocessing

      Alternative 4: 68.0% accurate, 0.6× speedup?

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

        1. Initial program 100.0%

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

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

            \[\leadsto \color{blue}{y \cdot \left(t - x\right)} \]
          2. lower--.f6486.8

            \[\leadsto y \cdot \color{blue}{\left(t - x\right)} \]
        5. Applied rewrites86.8%

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

        if -2.99999999999999974e79 < y < -2.2999999999999999e-15

        1. Initial program 99.9%

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

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

            \[\leadsto \color{blue}{t \cdot \left(y - z\right)} \]
          2. lower--.f6481.2

            \[\leadsto t \cdot \color{blue}{\left(y - z\right)} \]
        5. Applied rewrites81.2%

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

        if -2.2999999999999999e-15 < y < 4.59999999999999993e36

        1. Initial program 100.0%

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

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

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

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

            \[\leadsto \color{blue}{z \cdot \left(\mathsf{neg}\left(\left(t - x\right)\right)\right)} + x \]
          4. mul-1-negN/A

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

            \[\leadsto \color{blue}{\mathsf{fma}\left(z, -1 \cdot \left(t - x\right), x\right)} \]
          6. mul-1-negN/A

            \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{neg}\left(\left(t - x\right)\right)}, x\right) \]
          7. sub-negN/A

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

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

            \[\leadsto \mathsf{fma}\left(z, \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) + \left(\mathsf{neg}\left(t\right)\right)}, x\right) \]
          10. unsub-negN/A

            \[\leadsto \mathsf{fma}\left(z, \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) - t}, x\right) \]
          11. remove-double-negN/A

            \[\leadsto \mathsf{fma}\left(z, \color{blue}{x} - t, x\right) \]
          12. lower--.f6489.6

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

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

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

            \[\leadsto \mathsf{fma}\left(z, \color{blue}{x}, x\right) \]
        8. Recombined 3 regimes into one program.
        9. Final simplification74.7%

          \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3 \cdot 10^{+79}:\\ \;\;\;\;y \cdot \left(t - x\right)\\ \mathbf{elif}\;y \leq -2.3 \cdot 10^{-15}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{+36}:\\ \;\;\;\;\mathsf{fma}\left(z, x, x\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(t - x\right)\\ \end{array} \]
        10. Add Preprocessing

        Alternative 5: 84.9% accurate, 0.7× speedup?

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

          1. Initial program 100.0%

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

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

              \[\leadsto \color{blue}{y \cdot \left(t - x\right)} \]
            2. lower--.f6484.6

              \[\leadsto y \cdot \color{blue}{\left(t - x\right)} \]
          5. Applied rewrites84.6%

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

          if -1100 < y < 6.3999999999999998e36

          1. Initial program 100.0%

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

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

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

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

              \[\leadsto \color{blue}{z \cdot \left(\mathsf{neg}\left(\left(t - x\right)\right)\right)} + x \]
            4. mul-1-negN/A

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

              \[\leadsto \color{blue}{\mathsf{fma}\left(z, -1 \cdot \left(t - x\right), x\right)} \]
            6. mul-1-negN/A

              \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{neg}\left(\left(t - x\right)\right)}, x\right) \]
            7. sub-negN/A

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

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

              \[\leadsto \mathsf{fma}\left(z, \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) + \left(\mathsf{neg}\left(t\right)\right)}, x\right) \]
            10. unsub-negN/A

              \[\leadsto \mathsf{fma}\left(z, \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) - t}, x\right) \]
            11. remove-double-negN/A

              \[\leadsto \mathsf{fma}\left(z, \color{blue}{x} - t, x\right) \]
            12. lower--.f6488.6

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

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

        Alternative 6: 73.9% accurate, 0.7× speedup?

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

          1. Initial program 100.0%

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

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

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

              \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \left(y - z\right)\right) + x \cdot 1} \]
            3. *-rgt-identityN/A

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

              \[\leadsto \color{blue}{\mathsf{fma}\left(x, -1 \cdot \left(y - z\right), x\right)} \]
            5. mul-1-negN/A

              \[\leadsto \mathsf{fma}\left(x, \color{blue}{\mathsf{neg}\left(\left(y - z\right)\right)}, x\right) \]
            6. sub-negN/A

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

              \[\leadsto \mathsf{fma}\left(x, \mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(z\right)\right) + y\right)}\right), x\right) \]
            8. distribute-neg-inN/A

              \[\leadsto \mathsf{fma}\left(x, \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
            9. unsub-negN/A

              \[\leadsto \mathsf{fma}\left(x, \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) - y}, x\right) \]
            10. remove-double-negN/A

              \[\leadsto \mathsf{fma}\left(x, \color{blue}{z} - y, x\right) \]
            11. lower--.f6490.7

              \[\leadsto \mathsf{fma}\left(x, \color{blue}{z - y}, x\right) \]
          5. Applied rewrites90.7%

            \[\leadsto \color{blue}{\mathsf{fma}\left(x, z - y, x\right)} \]

          if -3.29999999999999991e80 < x < 1.2e64

          1. Initial program 99.9%

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

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

              \[\leadsto \color{blue}{t \cdot \left(y - z\right)} \]
            2. lower--.f6473.6

              \[\leadsto t \cdot \color{blue}{\left(y - z\right)} \]
          5. Applied rewrites73.6%

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

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

        Alternative 7: 62.2% accurate, 0.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.2 \cdot 10^{+107}:\\ \;\;\;\;\mathsf{fma}\left(z, x, x\right)\\ \mathbf{elif}\;x \leq 1.45 \cdot 10^{+65}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z, x, x\right)\\ \end{array} \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (if (<= x -3.2e+107)
           (fma z x x)
           (if (<= x 1.45e+65) (* (- y z) t) (fma z x x))))
        double code(double x, double y, double z, double t) {
        	double tmp;
        	if (x <= -3.2e+107) {
        		tmp = fma(z, x, x);
        	} else if (x <= 1.45e+65) {
        		tmp = (y - z) * t;
        	} else {
        		tmp = fma(z, x, x);
        	}
        	return tmp;
        }
        
        function code(x, y, z, t)
        	tmp = 0.0
        	if (x <= -3.2e+107)
        		tmp = fma(z, x, x);
        	elseif (x <= 1.45e+65)
        		tmp = Float64(Float64(y - z) * t);
        	else
        		tmp = fma(z, x, x);
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_] := If[LessEqual[x, -3.2e+107], N[(z * x + x), $MachinePrecision], If[LessEqual[x, 1.45e+65], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], N[(z * x + x), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;x \leq -3.2 \cdot 10^{+107}:\\
        \;\;\;\;\mathsf{fma}\left(z, x, x\right)\\
        
        \mathbf{elif}\;x \leq 1.45 \cdot 10^{+65}:\\
        \;\;\;\;\left(y - z\right) \cdot t\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(z, x, x\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if x < -3.20000000000000029e107 or 1.45e65 < x

          1. Initial program 100.0%

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

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

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

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

              \[\leadsto \color{blue}{z \cdot \left(\mathsf{neg}\left(\left(t - x\right)\right)\right)} + x \]
            4. mul-1-negN/A

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

              \[\leadsto \color{blue}{\mathsf{fma}\left(z, -1 \cdot \left(t - x\right), x\right)} \]
            6. mul-1-negN/A

              \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{neg}\left(\left(t - x\right)\right)}, x\right) \]
            7. sub-negN/A

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

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

              \[\leadsto \mathsf{fma}\left(z, \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) + \left(\mathsf{neg}\left(t\right)\right)}, x\right) \]
            10. unsub-negN/A

              \[\leadsto \mathsf{fma}\left(z, \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) - t}, x\right) \]
            11. remove-double-negN/A

              \[\leadsto \mathsf{fma}\left(z, \color{blue}{x} - t, x\right) \]
            12. lower--.f6459.4

              \[\leadsto \mathsf{fma}\left(z, \color{blue}{x - t}, x\right) \]
          5. Applied rewrites59.4%

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

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

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

            if -3.20000000000000029e107 < x < 1.45e65

            1. Initial program 99.9%

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

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

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

                \[\leadsto t \cdot \color{blue}{\left(y - z\right)} \]
            5. Applied rewrites71.5%

              \[\leadsto \color{blue}{t \cdot \left(y - z\right)} \]
          8. Recombined 2 regimes into one program.
          9. Final simplification66.9%

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

          Alternative 8: 51.1% accurate, 0.7× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4.2 \cdot 10^{-15}:\\ \;\;\;\;y \cdot t\\ \mathbf{elif}\;y \leq 1.95 \cdot 10^{+52}:\\ \;\;\;\;\mathsf{fma}\left(z, x, x\right)\\ \mathbf{else}:\\ \;\;\;\;-x \cdot y\\ \end{array} \end{array} \]
          (FPCore (x y z t)
           :precision binary64
           (if (<= y -4.2e-15) (* y t) (if (<= y 1.95e+52) (fma z x x) (- (* x y)))))
          double code(double x, double y, double z, double t) {
          	double tmp;
          	if (y <= -4.2e-15) {
          		tmp = y * t;
          	} else if (y <= 1.95e+52) {
          		tmp = fma(z, x, x);
          	} else {
          		tmp = -(x * y);
          	}
          	return tmp;
          }
          
          function code(x, y, z, t)
          	tmp = 0.0
          	if (y <= -4.2e-15)
          		tmp = Float64(y * t);
          	elseif (y <= 1.95e+52)
          		tmp = fma(z, x, x);
          	else
          		tmp = Float64(-Float64(x * y));
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_] := If[LessEqual[y, -4.2e-15], N[(y * t), $MachinePrecision], If[LessEqual[y, 1.95e+52], N[(z * x + x), $MachinePrecision], (-N[(x * y), $MachinePrecision])]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;y \leq -4.2 \cdot 10^{-15}:\\
          \;\;\;\;y \cdot t\\
          
          \mathbf{elif}\;y \leq 1.95 \cdot 10^{+52}:\\
          \;\;\;\;\mathsf{fma}\left(z, x, x\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;-x \cdot y\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if y < -4.19999999999999962e-15

            1. Initial program 99.9%

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

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

                \[\leadsto \color{blue}{t \cdot \left(y - z\right)} \]
              2. lower--.f6463.3

                \[\leadsto t \cdot \color{blue}{\left(y - z\right)} \]
            5. Applied rewrites63.3%

              \[\leadsto \color{blue}{t \cdot \left(y - z\right)} \]
            6. Taylor expanded in y around inf

              \[\leadsto t \cdot \color{blue}{y} \]
            7. Step-by-step derivation
              1. Applied rewrites50.4%

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

              if -4.19999999999999962e-15 < y < 1.95e52

              1. Initial program 100.0%

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

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

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

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

                  \[\leadsto \color{blue}{z \cdot \left(\mathsf{neg}\left(\left(t - x\right)\right)\right)} + x \]
                4. mul-1-negN/A

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

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, -1 \cdot \left(t - x\right), x\right)} \]
                6. mul-1-negN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{neg}\left(\left(t - x\right)\right)}, x\right) \]
                7. sub-negN/A

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

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

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) + \left(\mathsf{neg}\left(t\right)\right)}, x\right) \]
                10. unsub-negN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) - t}, x\right) \]
                11. remove-double-negN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{x} - t, x\right) \]
                12. lower--.f6488.1

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{x - t}, x\right) \]
              5. Applied rewrites88.1%

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

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

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

                if 1.95e52 < y

                1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(y - z, t, \color{blue}{\mathsf{fma}\left(y - z, \mathsf{neg}\left(x\right), x\right)}\right) \]
                  12. lower-neg.f6492.0

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

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

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

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

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

                    \[\leadsto \color{blue}{x \cdot \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)} + x \]
                  4. mul-1-negN/A

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

                    \[\leadsto \color{blue}{\mathsf{fma}\left(x, -1 \cdot \left(y - z\right), x\right)} \]
                  6. mul-1-negN/A

                    \[\leadsto \mathsf{fma}\left(x, \color{blue}{\mathsf{neg}\left(\left(y - z\right)\right)}, x\right) \]
                  7. sub-negN/A

                    \[\leadsto \mathsf{fma}\left(x, \mathsf{neg}\left(\color{blue}{\left(y + \left(\mathsf{neg}\left(z\right)\right)\right)}\right), x\right) \]
                  8. mul-1-negN/A

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

                    \[\leadsto \mathsf{fma}\left(x, \mathsf{neg}\left(\color{blue}{\left(-1 \cdot z + y\right)}\right), x\right) \]
                  10. distribute-neg-inN/A

                    \[\leadsto \mathsf{fma}\left(x, \color{blue}{\left(\mathsf{neg}\left(-1 \cdot z\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
                  11. unsub-negN/A

                    \[\leadsto \mathsf{fma}\left(x, \color{blue}{\left(\mathsf{neg}\left(-1 \cdot z\right)\right) - y}, x\right) \]
                  12. mul-1-negN/A

                    \[\leadsto \mathsf{fma}\left(x, \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) - y, x\right) \]
                  13. remove-double-negN/A

                    \[\leadsto \mathsf{fma}\left(x, \color{blue}{z} - y, x\right) \]
                  14. lower--.f6457.4

                    \[\leadsto \mathsf{fma}\left(x, \color{blue}{z - y}, x\right) \]
                7. Applied rewrites57.4%

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

                  \[\leadsto -1 \cdot \color{blue}{\left(x \cdot y\right)} \]
                9. Step-by-step derivation
                  1. Applied rewrites49.9%

                    \[\leadsto x \cdot \color{blue}{\left(-y\right)} \]
                10. Recombined 3 regimes into one program.
                11. Final simplification54.9%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.2 \cdot 10^{-15}:\\ \;\;\;\;y \cdot t\\ \mathbf{elif}\;y \leq 1.95 \cdot 10^{+52}:\\ \;\;\;\;\mathsf{fma}\left(z, x, x\right)\\ \mathbf{else}:\\ \;\;\;\;-x \cdot y\\ \end{array} \]
                12. Add Preprocessing

                Alternative 9: 50.6% accurate, 0.8× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4.2 \cdot 10^{-15}:\\ \;\;\;\;y \cdot t\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+36}:\\ \;\;\;\;\mathsf{fma}\left(z, x, x\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot t\\ \end{array} \end{array} \]
                (FPCore (x y z t)
                 :precision binary64
                 (if (<= y -4.2e-15) (* y t) (if (<= y 5.2e+36) (fma z x x) (* y t))))
                double code(double x, double y, double z, double t) {
                	double tmp;
                	if (y <= -4.2e-15) {
                		tmp = y * t;
                	} else if (y <= 5.2e+36) {
                		tmp = fma(z, x, x);
                	} else {
                		tmp = y * t;
                	}
                	return tmp;
                }
                
                function code(x, y, z, t)
                	tmp = 0.0
                	if (y <= -4.2e-15)
                		tmp = Float64(y * t);
                	elseif (y <= 5.2e+36)
                		tmp = fma(z, x, x);
                	else
                		tmp = Float64(y * t);
                	end
                	return tmp
                end
                
                code[x_, y_, z_, t_] := If[LessEqual[y, -4.2e-15], N[(y * t), $MachinePrecision], If[LessEqual[y, 5.2e+36], N[(z * x + x), $MachinePrecision], N[(y * t), $MachinePrecision]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;y \leq -4.2 \cdot 10^{-15}:\\
                \;\;\;\;y \cdot t\\
                
                \mathbf{elif}\;y \leq 5.2 \cdot 10^{+36}:\\
                \;\;\;\;\mathsf{fma}\left(z, x, x\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;y \cdot t\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if y < -4.19999999999999962e-15 or 5.2000000000000003e36 < y

                  1. Initial program 100.0%

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

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

                      \[\leadsto \color{blue}{t \cdot \left(y - z\right)} \]
                    2. lower--.f6458.0

                      \[\leadsto t \cdot \color{blue}{\left(y - z\right)} \]
                  5. Applied rewrites58.0%

                    \[\leadsto \color{blue}{t \cdot \left(y - z\right)} \]
                  6. Taylor expanded in y around inf

                    \[\leadsto t \cdot \color{blue}{y} \]
                  7. Step-by-step derivation
                    1. Applied rewrites46.4%

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

                    if -4.19999999999999962e-15 < y < 5.2000000000000003e36

                    1. Initial program 100.0%

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

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

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

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

                        \[\leadsto \color{blue}{z \cdot \left(\mathsf{neg}\left(\left(t - x\right)\right)\right)} + x \]
                      4. mul-1-negN/A

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

                        \[\leadsto \color{blue}{\mathsf{fma}\left(z, -1 \cdot \left(t - x\right), x\right)} \]
                      6. mul-1-negN/A

                        \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{neg}\left(\left(t - x\right)\right)}, x\right) \]
                      7. sub-negN/A

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

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

                        \[\leadsto \mathsf{fma}\left(z, \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) + \left(\mathsf{neg}\left(t\right)\right)}, x\right) \]
                      10. unsub-negN/A

                        \[\leadsto \mathsf{fma}\left(z, \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) - t}, x\right) \]
                      11. remove-double-negN/A

                        \[\leadsto \mathsf{fma}\left(z, \color{blue}{x} - t, x\right) \]
                      12. lower--.f6489.6

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

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

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

                        \[\leadsto \mathsf{fma}\left(z, \color{blue}{x}, x\right) \]
                    8. Recombined 2 regimes into one program.
                    9. Final simplification53.2%

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

                    Alternative 10: 35.5% accurate, 0.8× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -7.2 \cdot 10^{+59}:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;x \leq 9.8 \cdot 10^{+64}:\\ \;\;\;\;y \cdot t\\ \mathbf{else}:\\ \;\;\;\;x \cdot z\\ \end{array} \end{array} \]
                    (FPCore (x y z t)
                     :precision binary64
                     (if (<= x -7.2e+59) (* x z) (if (<= x 9.8e+64) (* y t) (* x z))))
                    double code(double x, double y, double z, double t) {
                    	double tmp;
                    	if (x <= -7.2e+59) {
                    		tmp = x * z;
                    	} else if (x <= 9.8e+64) {
                    		tmp = y * t;
                    	} else {
                    		tmp = x * z;
                    	}
                    	return tmp;
                    }
                    
                    real(8) function code(x, y, z, t)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        real(8), intent (in) :: t
                        real(8) :: tmp
                        if (x <= (-7.2d+59)) then
                            tmp = x * z
                        else if (x <= 9.8d+64) then
                            tmp = y * t
                        else
                            tmp = x * z
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double y, double z, double t) {
                    	double tmp;
                    	if (x <= -7.2e+59) {
                    		tmp = x * z;
                    	} else if (x <= 9.8e+64) {
                    		tmp = y * t;
                    	} else {
                    		tmp = x * z;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t):
                    	tmp = 0
                    	if x <= -7.2e+59:
                    		tmp = x * z
                    	elif x <= 9.8e+64:
                    		tmp = y * t
                    	else:
                    		tmp = x * z
                    	return tmp
                    
                    function code(x, y, z, t)
                    	tmp = 0.0
                    	if (x <= -7.2e+59)
                    		tmp = Float64(x * z);
                    	elseif (x <= 9.8e+64)
                    		tmp = Float64(y * t);
                    	else
                    		tmp = Float64(x * z);
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t)
                    	tmp = 0.0;
                    	if (x <= -7.2e+59)
                    		tmp = x * z;
                    	elseif (x <= 9.8e+64)
                    		tmp = y * t;
                    	else
                    		tmp = x * z;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_, t_] := If[LessEqual[x, -7.2e+59], N[(x * z), $MachinePrecision], If[LessEqual[x, 9.8e+64], N[(y * t), $MachinePrecision], N[(x * z), $MachinePrecision]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;x \leq -7.2 \cdot 10^{+59}:\\
                    \;\;\;\;x \cdot z\\
                    
                    \mathbf{elif}\;x \leq 9.8 \cdot 10^{+64}:\\
                    \;\;\;\;y \cdot t\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;x \cdot z\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if x < -7.1999999999999997e59 or 9.8000000000000005e64 < x

                      1. Initial program 100.0%

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

                        \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(t - x\right)\right)} \]
                      4. Step-by-step derivation
                        1. mul-1-negN/A

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

                          \[\leadsto \color{blue}{z \cdot \left(\mathsf{neg}\left(\left(t - x\right)\right)\right)} \]
                        3. mul-1-negN/A

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

                          \[\leadsto \color{blue}{z \cdot \left(-1 \cdot \left(t - x\right)\right)} \]
                        5. mul-1-negN/A

                          \[\leadsto z \cdot \color{blue}{\left(\mathsf{neg}\left(\left(t - x\right)\right)\right)} \]
                        6. sub-negN/A

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

                          \[\leadsto z \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(x\right)\right) + t\right)}\right)\right) \]
                        8. distribute-neg-inN/A

                          \[\leadsto z \cdot \color{blue}{\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) + \left(\mathsf{neg}\left(t\right)\right)\right)} \]
                        9. unsub-negN/A

                          \[\leadsto z \cdot \color{blue}{\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) - t\right)} \]
                        10. remove-double-negN/A

                          \[\leadsto z \cdot \left(\color{blue}{x} - t\right) \]
                        11. lower--.f6439.2

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

                        \[\leadsto \color{blue}{z \cdot \left(x - t\right)} \]
                      6. Taylor expanded in x around inf

                        \[\leadsto x \cdot \color{blue}{z} \]
                      7. Step-by-step derivation
                        1. Applied rewrites35.3%

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

                        if -7.1999999999999997e59 < x < 9.8000000000000005e64

                        1. Initial program 99.9%

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

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

                            \[\leadsto \color{blue}{t \cdot \left(y - z\right)} \]
                          2. lower--.f6473.0

                            \[\leadsto t \cdot \color{blue}{\left(y - z\right)} \]
                        5. Applied rewrites73.0%

                          \[\leadsto \color{blue}{t \cdot \left(y - z\right)} \]
                        6. Taylor expanded in y around inf

                          \[\leadsto t \cdot \color{blue}{y} \]
                        7. Step-by-step derivation
                          1. Applied rewrites43.9%

                            \[\leadsto t \cdot \color{blue}{y} \]
                        8. Recombined 2 regimes into one program.
                        9. Final simplification40.2%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.2 \cdot 10^{+59}:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;x \leq 9.8 \cdot 10^{+64}:\\ \;\;\;\;y \cdot t\\ \mathbf{else}:\\ \;\;\;\;x \cdot z\\ \end{array} \]
                        10. Add Preprocessing

                        Alternative 11: 26.5% accurate, 2.5× speedup?

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

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

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

                            \[\leadsto \color{blue}{t \cdot \left(y - z\right)} \]
                          2. lower--.f6450.0

                            \[\leadsto t \cdot \color{blue}{\left(y - z\right)} \]
                        5. Applied rewrites50.0%

                          \[\leadsto \color{blue}{t \cdot \left(y - z\right)} \]
                        6. Taylor expanded in y around inf

                          \[\leadsto t \cdot \color{blue}{y} \]
                        7. Step-by-step derivation
                          1. Applied rewrites30.5%

                            \[\leadsto t \cdot \color{blue}{y} \]
                          2. Final simplification30.5%

                            \[\leadsto y \cdot t \]
                          3. Add Preprocessing

                          Developer Target 1: 96.3% accurate, 0.6× speedup?

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

                          Reproduce

                          ?
                          herbie shell --seed 2024238 
                          (FPCore (x y z t)
                            :name "Data.Metrics.Snapshot:quantile from metrics-0.3.0.2"
                            :precision binary64
                          
                            :alt
                            (! :herbie-platform default (+ x (+ (* t (- y z)) (* (- x) (- y z)))))
                          
                            (+ x (* (- y z) (- t x))))