Data.Metrics.Snapshot:quantile from metrics-0.3.0.2

Percentage Accurate: 100.0% → 100.0%
Time: 9.0s
Alternatives: 14
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 14 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: 71.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(x - t\right)\\ t_2 := y \cdot \left(t - x\right)\\ \mathbf{if}\;z \leq -1.66 \cdot 10^{+44}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -7 \cdot 10^{-58}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -7.8 \cdot 10^{-227}:\\ \;\;\;\;\mathsf{fma}\left(y, -x, x\right)\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-6}:\\ \;\;\;\;\mathsf{fma}\left(y, t, x\right)\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{+61}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* z (- x t))) (t_2 (* y (- t x))))
   (if (<= z -1.66e+44)
     t_1
     (if (<= z -7e-58)
       t_2
       (if (<= z -7.8e-227)
         (fma y (- x) x)
         (if (<= z 1.35e-6) (fma y t x) (if (<= z 4.7e+61) t_2 t_1)))))))
double code(double x, double y, double z, double t) {
	double t_1 = z * (x - t);
	double t_2 = y * (t - x);
	double tmp;
	if (z <= -1.66e+44) {
		tmp = t_1;
	} else if (z <= -7e-58) {
		tmp = t_2;
	} else if (z <= -7.8e-227) {
		tmp = fma(y, -x, x);
	} else if (z <= 1.35e-6) {
		tmp = fma(y, t, x);
	} else if (z <= 4.7e+61) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t)
	t_1 = Float64(z * Float64(x - t))
	t_2 = Float64(y * Float64(t - x))
	tmp = 0.0
	if (z <= -1.66e+44)
		tmp = t_1;
	elseif (z <= -7e-58)
		tmp = t_2;
	elseif (z <= -7.8e-227)
		tmp = fma(y, Float64(-x), x);
	elseif (z <= 1.35e-6)
		tmp = fma(y, t, x);
	elseif (z <= 4.7e+61)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.66e+44], t$95$1, If[LessEqual[z, -7e-58], t$95$2, If[LessEqual[z, -7.8e-227], N[(y * (-x) + x), $MachinePrecision], If[LessEqual[z, 1.35e-6], N[(y * t + x), $MachinePrecision], If[LessEqual[z, 4.7e+61], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -7 \cdot 10^{-58}:\\
\;\;\;\;t\_2\\

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

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

\mathbf{elif}\;z \leq 4.7 \cdot 10^{+61}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.65999999999999992e44 or 4.6999999999999998e61 < 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. *-lowering-*.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. --lowering--.f6485.3

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

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

    if -1.65999999999999992e44 < z < -6.9999999999999998e-58 or 1.34999999999999999e-6 < z < 4.6999999999999998e61

    1. Initial program 99.9%

      \[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. *-lowering-*.f64N/A

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

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

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

    if -6.9999999999999998e-58 < z < -7.7999999999999999e-227

    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. accelerator-lowering-fma.f64N/A

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

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

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

      \[\leadsto \mathsf{fma}\left(y, \color{blue}{-1 \cdot x}, x\right) \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\mathsf{neg}\left(x\right)}, x\right) \]
      2. neg-lowering-neg.f6479.0

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{-x}, x\right) \]
    8. Simplified79.0%

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

    if -7.7999999999999999e-227 < z < 1.34999999999999999e-6

    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. accelerator-lowering-fma.f64N/A

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

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

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

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

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

    Alternative 3: 68.6% accurate, 0.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(t - x\right)\\ \mathbf{if}\;y \leq -1:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.6 \cdot 10^{-56}:\\ \;\;\;\;\mathsf{fma}\left(y, t, x\right)\\ \mathbf{elif}\;y \leq 10^{+15}:\\ \;\;\;\;\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 -1.0)
         t_1
         (if (<= y -1.6e-56) (fma y t x) (if (<= y 1e+15) (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 <= -1.0) {
    		tmp = t_1;
    	} else if (y <= -1.6e-56) {
    		tmp = fma(y, t, x);
    	} else if (y <= 1e+15) {
    		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 <= -1.0)
    		tmp = t_1;
    	elseif (y <= -1.6e-56)
    		tmp = fma(y, t, x);
    	elseif (y <= 1e+15)
    		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, -1.0], t$95$1, If[LessEqual[y, -1.6e-56], N[(y * t + x), $MachinePrecision], If[LessEqual[y, 1e+15], 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 -1:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;y \leq -1.6 \cdot 10^{-56}:\\
    \;\;\;\;\mathsf{fma}\left(y, t, x\right)\\
    
    \mathbf{elif}\;y \leq 10^{+15}:\\
    \;\;\;\;\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 or 1e15 < 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. *-lowering-*.f64N/A

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

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

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

      if -1 < y < -1.59999999999999993e-56

      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. accelerator-lowering-fma.f64N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{t}, x\right) \]
      7. Step-by-step derivation
        1. Simplified73.8%

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

        if -1.59999999999999993e-56 < y < 1e15

        1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{x + x \cdot z} \]
        9. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \color{blue}{x \cdot z + x} \]
          2. accelerator-lowering-fma.f6463.2

            \[\leadsto \color{blue}{\mathsf{fma}\left(x, z, x\right)} \]
        10. Simplified63.2%

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

      Alternative 4: 62.8% accurate, 0.6× speedup?

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

        1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(t - x, y, \mathsf{fma}\left(\color{blue}{t - x}, \mathsf{neg}\left(z\right), x\right)\right) \]
          12. neg-lowering-neg.f6498.3

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(t - x, y, \color{blue}{x \cdot z}\right) \]
        9. Step-by-step derivation
          1. *-lowering-*.f6470.7

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

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

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

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

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

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

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

            \[\leadsto x \cdot \color{blue}{\left(z + -1 \cdot y\right)} \]
          6. *-lowering-*.f64N/A

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

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

            \[\leadsto x \cdot \color{blue}{\left(z - y\right)} \]
          9. --lowering--.f6468.1

            \[\leadsto x \cdot \color{blue}{\left(z - y\right)} \]
        13. Simplified68.1%

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

        if -5.40000000000000022e54 < x < 9.9999999999999999e-161

        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. *-lowering-*.f64N/A

            \[\leadsto \color{blue}{t \cdot \left(y - z\right)} \]
          2. --lowering--.f6474.9

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

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

        if 9.9999999999999999e-161 < x < 6.9999999999999997e-33

        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. accelerator-lowering-fma.f64N/A

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

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

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

          \[\leadsto \mathsf{fma}\left(y, \color{blue}{t}, x\right) \]
        7. Step-by-step derivation
          1. Simplified65.4%

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

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

        Alternative 5: 54.2% accurate, 0.6× speedup?

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

          1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(t - x, y, \mathsf{fma}\left(\color{blue}{t - x}, \mathsf{neg}\left(z\right), x\right)\right) \]
            12. neg-lowering-neg.f6496.3

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

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

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

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

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

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

            \[\leadsto \color{blue}{x + x \cdot z} \]
          9. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{x \cdot z + x} \]
            2. accelerator-lowering-fma.f6456.7

              \[\leadsto \color{blue}{\mathsf{fma}\left(x, z, x\right)} \]
          10. Simplified56.7%

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

          if -3.8e-6 < z < 8.99999999999999981e93

          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. accelerator-lowering-fma.f64N/A

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

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

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

            \[\leadsto \mathsf{fma}\left(y, \color{blue}{t}, x\right) \]
          7. Step-by-step derivation
            1. Simplified62.3%

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

            if 8.99999999999999981e93 < z < 4.7999999999999998e161

            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. *-lowering-*.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. --lowering--.f6484.3

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

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

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

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

              if 4.7999999999999998e161 < z

              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. *-lowering-*.f64N/A

                  \[\leadsto \color{blue}{t \cdot \left(y - z\right)} \]
                2. --lowering--.f6468.8

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

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

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

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

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

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

                  \[\leadsto z \cdot \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} \]
                5. neg-lowering-neg.f6462.2

                  \[\leadsto z \cdot \color{blue}{\left(-t\right)} \]
              8. Simplified62.2%

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

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

            Alternative 6: 51.4% accurate, 0.6× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(-y\right)\\ \mathbf{if}\;y \leq -1.15 \cdot 10^{+232}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -3.5 \cdot 10^{-56}:\\ \;\;\;\;\mathsf{fma}\left(y, t, x\right)\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{+23}:\\ \;\;\;\;\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 (* x (- y))))
               (if (<= y -1.15e+232)
                 t_1
                 (if (<= y -3.5e-56) (fma y t x) (if (<= y 1.8e+23) (fma x z x) t_1)))))
            double code(double x, double y, double z, double t) {
            	double t_1 = x * -y;
            	double tmp;
            	if (y <= -1.15e+232) {
            		tmp = t_1;
            	} else if (y <= -3.5e-56) {
            		tmp = fma(y, t, x);
            	} else if (y <= 1.8e+23) {
            		tmp = fma(x, z, x);
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            function code(x, y, z, t)
            	t_1 = Float64(x * Float64(-y))
            	tmp = 0.0
            	if (y <= -1.15e+232)
            		tmp = t_1;
            	elseif (y <= -3.5e-56)
            		tmp = fma(y, t, x);
            	elseif (y <= 1.8e+23)
            		tmp = fma(x, z, x);
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * (-y)), $MachinePrecision]}, If[LessEqual[y, -1.15e+232], t$95$1, If[LessEqual[y, -3.5e-56], N[(y * t + x), $MachinePrecision], If[LessEqual[y, 1.8e+23], N[(x * z + x), $MachinePrecision], t$95$1]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := x \cdot \left(-y\right)\\
            \mathbf{if}\;y \leq -1.15 \cdot 10^{+232}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;y \leq -3.5 \cdot 10^{-56}:\\
            \;\;\;\;\mathsf{fma}\left(y, t, x\right)\\
            
            \mathbf{elif}\;y \leq 1.8 \cdot 10^{+23}:\\
            \;\;\;\;\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.15000000000000003e232 or 1.7999999999999999e23 < 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. accelerator-lowering-fma.f64N/A

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

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

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

                \[\leadsto \mathsf{fma}\left(y, \color{blue}{-1 \cdot x}, x\right) \]
              7. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto \mathsf{fma}\left(y, \color{blue}{\mathsf{neg}\left(x\right)}, x\right) \]
                2. neg-lowering-neg.f6457.4

                  \[\leadsto \mathsf{fma}\left(y, \color{blue}{-x}, x\right) \]
              8. Simplified57.4%

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

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

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

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

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

                  \[\leadsto y \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)} \]
                5. neg-lowering-neg.f6457.4

                  \[\leadsto y \cdot \color{blue}{\left(-x\right)} \]
              11. Simplified57.4%

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

              if -1.15000000000000003e232 < y < -3.4999999999999998e-56

              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. accelerator-lowering-fma.f64N/A

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

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

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

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

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

                if -3.4999999999999998e-56 < y < 1.7999999999999999e23

                1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{x + x \cdot z} \]
                9. Step-by-step derivation
                  1. +-commutativeN/A

                    \[\leadsto \color{blue}{x \cdot z + x} \]
                  2. accelerator-lowering-fma.f6462.7

                    \[\leadsto \color{blue}{\mathsf{fma}\left(x, z, x\right)} \]
                10. Simplified62.7%

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

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

              Alternative 7: 38.7% accurate, 0.6× speedup?

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

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

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

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

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

                  if -55 < z < -1.5499999999999999e-198

                  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. accelerator-lowering-fma.f64N/A

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

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

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

                    \[\leadsto \color{blue}{x} \]
                  7. Step-by-step derivation
                    1. Simplified37.4%

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

                    if -1.5499999999999999e-198 < z < 8.99999999999999981e93

                    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. *-lowering-*.f64N/A

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

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

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

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

                        \[\leadsto \color{blue}{y \cdot t} \]
                      2. *-lowering-*.f6441.6

                        \[\leadsto \color{blue}{y \cdot t} \]
                    8. Simplified41.6%

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -55:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{-198}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+93}:\\ \;\;\;\;y \cdot t\\ \mathbf{else}:\\ \;\;\;\;x \cdot z\\ \end{array} \]
                  10. Add Preprocessing

                  Alternative 8: 84.3% accurate, 0.7× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(x - t\right)\\ \mathbf{if}\;z \leq -2.6 \cdot 10^{+44}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7.6 \cdot 10^{+61}:\\ \;\;\;\;\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 -2.6e+44) t_1 (if (<= z 7.6e+61) (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 <= -2.6e+44) {
                  		tmp = t_1;
                  	} else if (z <= 7.6e+61) {
                  		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 <= -2.6e+44)
                  		tmp = t_1;
                  	elseif (z <= 7.6e+61)
                  		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, -2.6e+44], t$95$1, If[LessEqual[z, 7.6e+61], 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 -2.6 \cdot 10^{+44}:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;z \leq 7.6 \cdot 10^{+61}:\\
                  \;\;\;\;\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 < -2.5999999999999999e44 or 7.5999999999999999e61 < 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. *-lowering-*.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. --lowering--.f6485.3

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

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

                    if -2.5999999999999999e44 < z < 7.5999999999999999e61

                    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. accelerator-lowering-fma.f64N/A

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

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

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

                  Alternative 9: 73.0% accurate, 0.7× speedup?

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

                    1. Initial program 100.0%

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

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

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

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

                        \[\leadsto x \cdot \left(-1 \cdot \left(y - z\right)\right) + \color{blue}{x} \]
                      4. accelerator-lowering-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. --lowering--.f6480.2

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

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

                    if -3.4e52 < x < 5.5999999999999997e-183

                    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. *-lowering-*.f64N/A

                        \[\leadsto \color{blue}{t \cdot \left(y - z\right)} \]
                      2. --lowering--.f6478.9

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

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

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

                  Alternative 10: 62.1% accurate, 0.7× speedup?

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

                    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(t - x, y, \mathsf{fma}\left(\color{blue}{t - x}, \mathsf{neg}\left(z\right), x\right)\right) \]
                      12. neg-lowering-neg.f6498.3

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

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

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

                        \[\leadsto \mathsf{fma}\left(t - x, y, \color{blue}{x \cdot z + x}\right) \]
                      2. accelerator-lowering-fma.f6492.6

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

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

                      \[\leadsto \color{blue}{x + x \cdot z} \]
                    9. Step-by-step derivation
                      1. +-commutativeN/A

                        \[\leadsto \color{blue}{x \cdot z + x} \]
                      2. accelerator-lowering-fma.f6456.6

                        \[\leadsto \color{blue}{\mathsf{fma}\left(x, z, x\right)} \]
                    10. Simplified56.6%

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

                    if -2.00000000000000002e55 < x < 4.1499999999999998e-35

                    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. *-lowering-*.f64N/A

                        \[\leadsto \color{blue}{t \cdot \left(y - z\right)} \]
                      2. --lowering--.f6469.8

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

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

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

                  Alternative 11: 54.7% accurate, 0.8× speedup?

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

                    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(t - x, y, \mathsf{fma}\left(\color{blue}{t - x}, \mathsf{neg}\left(z\right), x\right)\right) \]
                      12. neg-lowering-neg.f6496.3

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

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

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

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

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

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

                      \[\leadsto \color{blue}{x + x \cdot z} \]
                    9. Step-by-step derivation
                      1. +-commutativeN/A

                        \[\leadsto \color{blue}{x \cdot z + x} \]
                      2. accelerator-lowering-fma.f6456.7

                        \[\leadsto \color{blue}{\mathsf{fma}\left(x, z, x\right)} \]
                    10. Simplified56.7%

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

                    if -1e-8 < z < 1.36e94

                    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. accelerator-lowering-fma.f64N/A

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

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

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

                      \[\leadsto \mathsf{fma}\left(y, \color{blue}{t}, x\right) \]
                    7. Step-by-step derivation
                      1. Simplified62.3%

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

                      if 1.36e94 < 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. *-lowering-*.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. --lowering--.f6487.2

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

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

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

                          \[\leadsto z \cdot \color{blue}{x} \]
                      8. Recombined 3 regimes into one program.
                      9. Final simplification57.7%

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

                      Alternative 12: 50.9% accurate, 0.8× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.6 \cdot 10^{-7}:\\ \;\;\;\;y \cdot t\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+53}:\\ \;\;\;\;\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 -1.6e-7) (* y t) (if (<= y 5.2e+53) (fma x z x) (* y t))))
                      double code(double x, double y, double z, double t) {
                      	double tmp;
                      	if (y <= -1.6e-7) {
                      		tmp = y * t;
                      	} else if (y <= 5.2e+53) {
                      		tmp = fma(x, z, x);
                      	} else {
                      		tmp = y * t;
                      	}
                      	return tmp;
                      }
                      
                      function code(x, y, z, t)
                      	tmp = 0.0
                      	if (y <= -1.6e-7)
                      		tmp = Float64(y * t);
                      	elseif (y <= 5.2e+53)
                      		tmp = fma(x, z, x);
                      	else
                      		tmp = Float64(y * t);
                      	end
                      	return tmp
                      end
                      
                      code[x_, y_, z_, t_] := If[LessEqual[y, -1.6e-7], N[(y * t), $MachinePrecision], If[LessEqual[y, 5.2e+53], N[(x * z + x), $MachinePrecision], N[(y * t), $MachinePrecision]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;y \leq -1.6 \cdot 10^{-7}:\\
                      \;\;\;\;y \cdot t\\
                      
                      \mathbf{elif}\;y \leq 5.2 \cdot 10^{+53}:\\
                      \;\;\;\;\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 < -1.6e-7 or 5.19999999999999996e53 < y

                        1. Initial program 100.0%

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

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

                            \[\leadsto \color{blue}{t \cdot \left(y - z\right)} \]
                          2. --lowering--.f6454.1

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

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

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

                            \[\leadsto \color{blue}{y \cdot t} \]
                          2. *-lowering-*.f6446.4

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

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

                        if -1.6e-7 < y < 5.19999999999999996e53

                        1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \color{blue}{x + x \cdot z} \]
                        9. Step-by-step derivation
                          1. +-commutativeN/A

                            \[\leadsto \color{blue}{x \cdot z + x} \]
                          2. accelerator-lowering-fma.f6458.6

                            \[\leadsto \color{blue}{\mathsf{fma}\left(x, z, x\right)} \]
                        10. Simplified58.6%

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

                      Alternative 13: 38.4% accurate, 0.8× speedup?

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

                        1. Initial program 100.0%

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

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

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

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

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

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

                            \[\leadsto \color{blue}{y \cdot t} \]
                          2. *-lowering-*.f6442.8

                            \[\leadsto \color{blue}{y \cdot t} \]
                        8. Simplified42.8%

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

                        if -7.00000000000000048e-8 < y < 1.20000000000000001e-27

                        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. accelerator-lowering-fma.f64N/A

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

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

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

                          \[\leadsto \color{blue}{x} \]
                        7. Step-by-step derivation
                          1. Simplified35.7%

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

                        Alternative 14: 18.5% accurate, 15.0× speedup?

                        \[\begin{array}{l} \\ x \end{array} \]
                        (FPCore (x y z t) :precision binary64 x)
                        double code(double x, double y, double z, double t) {
                        	return 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
                        end function
                        
                        public static double code(double x, double y, double z, double t) {
                        	return x;
                        }
                        
                        def code(x, y, z, t):
                        	return x
                        
                        function code(x, y, z, t)
                        	return x
                        end
                        
                        function tmp = code(x, y, z, t)
                        	tmp = x;
                        end
                        
                        code[x_, y_, z_, t_] := x
                        
                        \begin{array}{l}
                        
                        \\
                        x
                        \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 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. accelerator-lowering-fma.f64N/A

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

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

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

                          \[\leadsto \color{blue}{x} \]
                        7. Step-by-step derivation
                          1. Simplified18.5%

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

                          Developer Target 1: 96.0% 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 2024205 
                          (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))))