Data.Metrics.Snapshot:quantile from metrics-0.3.0.2

Percentage Accurate: 100.0% → 100.0%
Time: 9.0s
Alternatives: 13
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 13 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: 68.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(t - x\right)\\ \mathbf{if}\;y \leq -35000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{-238}:\\ \;\;\;\;\mathsf{fma}\left(z, -t, x\right)\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{+80}:\\ \;\;\;\;\mathsf{fma}\left(x, z, 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 -35000000.0)
     t_1
     (if (<= y 2.4e-238)
       (fma z (- t) x)
       (if (<= y 6.4e+80) (fma x z x) t_1)))))
double code(double x, double y, double z, double t) {
	double t_1 = y * (t - x);
	double tmp;
	if (y <= -35000000.0) {
		tmp = t_1;
	} else if (y <= 2.4e-238) {
		tmp = fma(z, -t, x);
	} else if (y <= 6.4e+80) {
		tmp = fma(x, z, 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 <= -35000000.0)
		tmp = t_1;
	elseif (y <= 2.4e-238)
		tmp = fma(z, Float64(-t), x);
	elseif (y <= 6.4e+80)
		tmp = fma(x, z, 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, -35000000.0], t$95$1, If[LessEqual[y, 2.4e-238], N[(z * (-t) + x), $MachinePrecision], If[LessEqual[y, 6.4e+80], N[(x * z + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq 6.4 \cdot 10^{+80}:\\
\;\;\;\;\mathsf{fma}\left(x, z, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.5e7 or 6.39999999999999979e80 < 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--.f6481.6

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

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

    if -3.5e7 < y < 2.3999999999999998e-238

    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.f6496.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.3999999999999998e-238 < y < 6.39999999999999979e80

      1. Initial program 99.9%

        \[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.f64100.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 3: 67.9% accurate, 0.6× speedup?

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

        1. Initial program 99.9%

          \[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--.f6480.7

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

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

        if -3.3e68 < z < -1.6000000000000001e-209

        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--.f6461.9

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

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

        if -1.6000000000000001e-209 < z < 0.058999999999999997

        1. Initial program 100.0%

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

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

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

            \[\leadsto \color{blue}{\mathsf{fma}\left(y, t - x, x\right)} \]
          3. lower--.f6493.8

            \[\leadsto \mathsf{fma}\left(y, \color{blue}{t - x}, x\right) \]
        5. Applied rewrites93.8%

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

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

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

        Alternative 4: 66.7% accurate, 0.6× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(t - x\right)\\ \mathbf{if}\;y \leq -4.1 \cdot 10^{+46}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -3.05 \cdot 10^{-34}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{+80}:\\ \;\;\;\;\mathsf{fma}\left(x, z, 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 -4.1e+46)
             t_1
             (if (<= y -3.05e-34) (* (- y z) t) (if (<= y 6.4e+80) (fma x z x) t_1)))))
        double code(double x, double y, double z, double t) {
        	double t_1 = y * (t - x);
        	double tmp;
        	if (y <= -4.1e+46) {
        		tmp = t_1;
        	} else if (y <= -3.05e-34) {
        		tmp = (y - z) * t;
        	} else if (y <= 6.4e+80) {
        		tmp = fma(x, z, 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 <= -4.1e+46)
        		tmp = t_1;
        	elseif (y <= -3.05e-34)
        		tmp = Float64(Float64(y - z) * t);
        	elseif (y <= 6.4e+80)
        		tmp = fma(x, z, 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, -4.1e+46], t$95$1, If[LessEqual[y, -3.05e-34], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, 6.4e+80], N[(x * z + x), $MachinePrecision], t$95$1]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := y \cdot \left(t - x\right)\\
        \mathbf{if}\;y \leq -4.1 \cdot 10^{+46}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;y \leq -3.05 \cdot 10^{-34}:\\
        \;\;\;\;\left(y - z\right) \cdot t\\
        
        \mathbf{elif}\;y \leq 6.4 \cdot 10^{+80}:\\
        \;\;\;\;\mathsf{fma}\left(x, z, x\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if y < -4.1e46 or 6.39999999999999979e80 < 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.0

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

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

          if -4.1e46 < y < -3.0499999999999999e-34

          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--.f6475.8

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

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

          if -3.0499999999999999e-34 < y < 6.39999999999999979e80

          1. Initial program 99.9%

            \[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.f6497.7

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(x, \color{blue}{z}, x\right) \]
          10. Recombined 3 regimes into one program.
          11. Final simplification72.4%

            \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.1 \cdot 10^{+46}:\\ \;\;\;\;y \cdot \left(t - x\right)\\ \mathbf{elif}\;y \leq -3.05 \cdot 10^{-34}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{+80}:\\ \;\;\;\;\mathsf{fma}\left(x, z, x\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(t - x\right)\\ \end{array} \]
          12. Add Preprocessing

          Alternative 5: 50.2% accurate, 0.6× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(-x\right)\\ \mathbf{if}\;y \leq -1.6 \cdot 10^{+118}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -4.7 \cdot 10^{+25}:\\ \;\;\;\;y \cdot t\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{+82}:\\ \;\;\;\;\mathsf{fma}\left(x, z, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (x y z t)
           :precision binary64
           (let* ((t_1 (* y (- x))))
             (if (<= y -1.6e+118)
               t_1
               (if (<= y -4.7e+25) (* y t) (if (<= y 8.2e+82) (fma x z x) t_1)))))
          double code(double x, double y, double z, double t) {
          	double t_1 = y * -x;
          	double tmp;
          	if (y <= -1.6e+118) {
          		tmp = t_1;
          	} else if (y <= -4.7e+25) {
          		tmp = y * t;
          	} else if (y <= 8.2e+82) {
          		tmp = fma(x, z, x);
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          function code(x, y, z, t)
          	t_1 = Float64(y * Float64(-x))
          	tmp = 0.0
          	if (y <= -1.6e+118)
          		tmp = t_1;
          	elseif (y <= -4.7e+25)
          		tmp = Float64(y * t);
          	elseif (y <= 8.2e+82)
          		tmp = fma(x, z, x);
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * (-x)), $MachinePrecision]}, If[LessEqual[y, -1.6e+118], t$95$1, If[LessEqual[y, -4.7e+25], N[(y * t), $MachinePrecision], If[LessEqual[y, 8.2e+82], N[(x * z + x), $MachinePrecision], t$95$1]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := y \cdot \left(-x\right)\\
          \mathbf{if}\;y \leq -1.6 \cdot 10^{+118}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;y \leq -4.7 \cdot 10^{+25}:\\
          \;\;\;\;y \cdot t\\
          
          \mathbf{elif}\;y \leq 8.2 \cdot 10^{+82}:\\
          \;\;\;\;\mathsf{fma}\left(x, z, x\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if y < -1.60000000000000008e118 or 8.1999999999999999e82 < 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.f64100.0

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

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

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

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

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

                \[\leadsto \color{blue}{y \cdot \left(t - x\right)} \]
              4. lower--.f6488.3

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

              \[\leadsto \color{blue}{y \cdot \left(t - x\right)} \]
            8. Taylor expanded in t around 0

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

                \[\leadsto y \cdot \left(-x\right) \]

              if -1.60000000000000008e118 < y < -4.6999999999999998e25

              1. Initial program 100.0%

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

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

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

                  \[\leadsto \color{blue}{\mathsf{fma}\left(y, t - x, x\right)} \]
                3. lower--.f6466.2

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

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

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

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

                if -4.6999999999999998e25 < y < 8.1999999999999999e82

                1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(z, \color{blue}{x - t}, x\right) \]
                  8. lower--.f6487.7

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

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

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

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

                Alternative 6: 47.2% accurate, 0.6× speedup?

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

                  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--.f6454.9

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

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

                    \[\leadsto z \cdot \left(-1 \cdot \color{blue}{t}\right) \]
                  7. Step-by-step derivation
                    1. Applied rewrites51.8%

                      \[\leadsto z \cdot \left(-t\right) \]

                    if -1.8e106 < t < 9.6e8

                    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.f64100.0

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(z, \color{blue}{x - t}, x\right) \]
                      8. lower--.f6462.7

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

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

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

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

                      if 9.99999999999999907e214 < t

                      1. Initial program 100.0%

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

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

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

                          \[\leadsto \color{blue}{\mathsf{fma}\left(y, t - x, x\right)} \]
                        3. lower--.f6483.7

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

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

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

                          \[\leadsto y \cdot \color{blue}{t} \]
                      8. Recombined 3 regimes into one program.
                      9. Add Preprocessing

                      Alternative 7: 83.8% accurate, 0.7× speedup?

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

                        1. Initial program 99.9%

                          \[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--.f6482.0

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

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

                        if -3.3e68 < z < 0.0264999999999999993

                        1. Initial program 100.0%

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

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

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

                            \[\leadsto \color{blue}{\mathsf{fma}\left(y, t - x, x\right)} \]
                          3. lower--.f6488.8

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

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

                        if 0.0264999999999999993 < z

                        1. Initial program 99.9%

                          \[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--.f6482.0

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

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

                      Alternative 8: 83.8% accurate, 0.7× speedup?

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

                        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--.f6484.8

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

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

                        if -3.3e68 < z < 5.8e50

                        1. Initial program 100.0%

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

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

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

                            \[\leadsto \color{blue}{\mathsf{fma}\left(y, t - x, x\right)} \]
                          3. lower--.f6485.1

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

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

                      Alternative 9: 76.2% accurate, 0.7× speedup?

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

                        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--.f6478.5

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

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

                        if -3.60000000000000014e82 < t < 6.9999999999999999e-41

                        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--.f6483.1

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

                          \[\leadsto \color{blue}{\mathsf{fma}\left(x, z - y, x\right)} \]
                      3. Recombined 2 regimes into one program.
                      4. Final simplification81.1%

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

                      Alternative 10: 62.7% accurate, 0.7× speedup?

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

                        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--.f6476.3

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

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

                        if -2.64999999999999989e79 < t < 2.25e-56

                        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.f64100.0

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(x, \color{blue}{z}, x\right) \]
                        10. Recombined 2 regimes into one program.
                        11. Final simplification67.7%

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

                        Alternative 11: 50.3% accurate, 0.8× speedup?

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

                          1. Initial program 100.0%

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

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

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

                              \[\leadsto \color{blue}{\mathsf{fma}\left(y, t - x, x\right)} \]
                            3. lower--.f6482.7

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

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

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

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

                            if -4.6999999999999998e25 < y < 9.20000000000000016e80

                            1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(z, \color{blue}{x - t}, x\right) \]
                              8. lower--.f6487.7

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

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

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

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

                            Alternative 12: 38.9% accurate, 0.8× speedup?

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

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

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

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

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

                                if -7.4e19 < z < 2.69999999999999977e55

                                1. Initial program 99.9%

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

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

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

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(y, t - x, x\right)} \]
                                  3. lower--.f6486.6

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

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

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

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

                                Alternative 13: 22.2% accurate, 2.5× speedup?

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

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

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

                                    \[\leadsto x \cdot \color{blue}{z} \]
                                  2. Add Preprocessing

                                  Developer Target 1: 96.5% 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 2024233 
                                  (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))))