Data.Metrics.Snapshot:quantile from metrics-0.3.0.2

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

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 11 alternatives:

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

Initial Program: 100.0% accurate, 1.0× speedup?

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

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

Alternative 1: 100.0% accurate, 1.0× speedup?

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

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

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

Alternative 2: 67.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(x - t\right)\\ \mathbf{if}\;z \leq -1.45 \cdot 10^{+32}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-83}:\\ \;\;\;\;x \cdot \left(1 - y\right)\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-63}:\\ \;\;\;\;y \cdot \left(t - x\right)\\ \mathbf{elif}\;z \leq 1.08 \cdot 10^{+105}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* z (- x t))))
   (if (<= z -1.45e+32)
     t_1
     (if (<= z -1.15e-83)
       (* x (- 1.0 y))
       (if (<= z 8.2e-63)
         (* y (- t x))
         (if (<= z 1.08e+105) (* (- y z) t) t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = z * (x - t);
	double tmp;
	if (z <= -1.45e+32) {
		tmp = t_1;
	} else if (z <= -1.15e-83) {
		tmp = x * (1.0 - y);
	} else if (z <= 8.2e-63) {
		tmp = y * (t - x);
	} else if (z <= 1.08e+105) {
		tmp = (y - z) * t;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = z * (x - t)
    if (z <= (-1.45d+32)) then
        tmp = t_1
    else if (z <= (-1.15d-83)) then
        tmp = x * (1.0d0 - y)
    else if (z <= 8.2d-63) then
        tmp = y * (t - x)
    else if (z <= 1.08d+105) then
        tmp = (y - z) * t
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = z * (x - t);
	double tmp;
	if (z <= -1.45e+32) {
		tmp = t_1;
	} else if (z <= -1.15e-83) {
		tmp = x * (1.0 - y);
	} else if (z <= 8.2e-63) {
		tmp = y * (t - x);
	} else if (z <= 1.08e+105) {
		tmp = (y - z) * t;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = z * (x - t)
	tmp = 0
	if z <= -1.45e+32:
		tmp = t_1
	elif z <= -1.15e-83:
		tmp = x * (1.0 - y)
	elif z <= 8.2e-63:
		tmp = y * (t - x)
	elif z <= 1.08e+105:
		tmp = (y - z) * t
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(z * Float64(x - t))
	tmp = 0.0
	if (z <= -1.45e+32)
		tmp = t_1;
	elseif (z <= -1.15e-83)
		tmp = Float64(x * Float64(1.0 - y));
	elseif (z <= 8.2e-63)
		tmp = Float64(y * Float64(t - x));
	elseif (z <= 1.08e+105)
		tmp = Float64(Float64(y - z) * t);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = z * (x - t);
	tmp = 0.0;
	if (z <= -1.45e+32)
		tmp = t_1;
	elseif (z <= -1.15e-83)
		tmp = x * (1.0 - y);
	elseif (z <= 8.2e-63)
		tmp = y * (t - x);
	elseif (z <= 1.08e+105)
		tmp = (y - z) * t;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.45e+32], t$95$1, If[LessEqual[z, -1.15e-83], N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e-63], N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.08e+105], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.15 \cdot 10^{-83}:\\
\;\;\;\;x \cdot \left(1 - y\right)\\

\mathbf{elif}\;z \leq 8.2 \cdot 10^{-63}:\\
\;\;\;\;y \cdot \left(t - x\right)\\

\mathbf{elif}\;z \leq 1.08 \cdot 10^{+105}:\\
\;\;\;\;\left(y - z\right) \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.45000000000000001e32 or 1.07999999999999994e105 < 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 \mathsf{neg}\left(z \cdot \left(t - x\right)\right) \]
      2. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto \mathsf{*.f64}\left(z, \left(\mathsf{neg}\left(\left(t - x\right)\right)\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\mathsf{neg}\left(\left(t + \left(\mathsf{neg}\left(x\right)\right)\right)\right)\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(x\right)\right) + t\right)\right)\right)\right) \]
      8. distribute-neg-inN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(z, \left(x - t\right)\right) \]
      11. --lowering--.f6485.5%

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(x, \color{blue}{t}\right)\right) \]
    5. Simplified85.5%

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

    if -1.45000000000000001e32 < z < -1.14999999999999995e-83

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

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

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right)\right) \]
      3. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{\left(y - z\right)}\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(y - z\right)}\right)\right) \]
      5. --lowering--.f6474.4%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
    5. Simplified74.4%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{y}\right)\right) \]
    7. Step-by-step derivation
      1. Simplified70.3%

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

      if -1.14999999999999995e-83 < z < 8.1999999999999995e-63

      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 \mathsf{*.f64}\left(y, \color{blue}{\left(t - x\right)}\right) \]
        2. --lowering--.f6472.2%

          \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(t, \color{blue}{x}\right)\right) \]
      5. Simplified72.2%

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

      if 8.1999999999999995e-63 < z < 1.07999999999999994e105

      1. Initial program 99.9%

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

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

          \[\leadsto \mathsf{*.f64}\left(t, \color{blue}{\left(y - z\right)}\right) \]
        2. --lowering--.f6478.4%

          \[\leadsto \mathsf{*.f64}\left(t, \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
      5. Simplified78.4%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{+32}:\\ \;\;\;\;z \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-83}:\\ \;\;\;\;x \cdot \left(1 - y\right)\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-63}:\\ \;\;\;\;y \cdot \left(t - x\right)\\ \mathbf{elif}\;z \leq 1.08 \cdot 10^{+105}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(x - t\right)\\ \end{array} \]
    10. Add Preprocessing

    Alternative 3: 64.3% accurate, 0.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(t - x\right)\\ t_2 := \left(y - z\right) \cdot t\\ \mathbf{if}\;y \leq -26:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 10^{-287}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 9 \cdot 10^{-86}:\\ \;\;\;\;x \cdot \left(z + 1\right)\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{+26}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (let* ((t_1 (* y (- t x))) (t_2 (* (- y z) t)))
       (if (<= y -26.0)
         t_1
         (if (<= y 1e-287)
           t_2
           (if (<= y 9e-86) (* x (+ z 1.0)) (if (<= y 3.5e+26) t_2 t_1))))))
    double code(double x, double y, double z, double t) {
    	double t_1 = y * (t - x);
    	double t_2 = (y - z) * t;
    	double tmp;
    	if (y <= -26.0) {
    		tmp = t_1;
    	} else if (y <= 1e-287) {
    		tmp = t_2;
    	} else if (y <= 9e-86) {
    		tmp = x * (z + 1.0);
    	} else if (y <= 3.5e+26) {
    		tmp = t_2;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8) :: t_1
        real(8) :: t_2
        real(8) :: tmp
        t_1 = y * (t - x)
        t_2 = (y - z) * t
        if (y <= (-26.0d0)) then
            tmp = t_1
        else if (y <= 1d-287) then
            tmp = t_2
        else if (y <= 9d-86) then
            tmp = x * (z + 1.0d0)
        else if (y <= 3.5d+26) then
            tmp = t_2
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t) {
    	double t_1 = y * (t - x);
    	double t_2 = (y - z) * t;
    	double tmp;
    	if (y <= -26.0) {
    		tmp = t_1;
    	} else if (y <= 1e-287) {
    		tmp = t_2;
    	} else if (y <= 9e-86) {
    		tmp = x * (z + 1.0);
    	} else if (y <= 3.5e+26) {
    		tmp = t_2;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t):
    	t_1 = y * (t - x)
    	t_2 = (y - z) * t
    	tmp = 0
    	if y <= -26.0:
    		tmp = t_1
    	elif y <= 1e-287:
    		tmp = t_2
    	elif y <= 9e-86:
    		tmp = x * (z + 1.0)
    	elif y <= 3.5e+26:
    		tmp = t_2
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t)
    	t_1 = Float64(y * Float64(t - x))
    	t_2 = Float64(Float64(y - z) * t)
    	tmp = 0.0
    	if (y <= -26.0)
    		tmp = t_1;
    	elseif (y <= 1e-287)
    		tmp = t_2;
    	elseif (y <= 9e-86)
    		tmp = Float64(x * Float64(z + 1.0));
    	elseif (y <= 3.5e+26)
    		tmp = t_2;
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t)
    	t_1 = y * (t - x);
    	t_2 = (y - z) * t;
    	tmp = 0.0;
    	if (y <= -26.0)
    		tmp = t_1;
    	elseif (y <= 1e-287)
    		tmp = t_2;
    	elseif (y <= 9e-86)
    		tmp = x * (z + 1.0);
    	elseif (y <= 3.5e+26)
    		tmp = t_2;
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[y, -26.0], t$95$1, If[LessEqual[y, 1e-287], t$95$2, If[LessEqual[y, 9e-86], N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e+26], t$95$2, t$95$1]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := y \cdot \left(t - x\right)\\
    t_2 := \left(y - z\right) \cdot t\\
    \mathbf{if}\;y \leq -26:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;y \leq 10^{-287}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;y \leq 9 \cdot 10^{-86}:\\
    \;\;\;\;x \cdot \left(z + 1\right)\\
    
    \mathbf{elif}\;y \leq 3.5 \cdot 10^{+26}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if y < -26 or 3.4999999999999999e26 < 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 \mathsf{*.f64}\left(y, \color{blue}{\left(t - x\right)}\right) \]
        2. --lowering--.f6481.5%

          \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(t, \color{blue}{x}\right)\right) \]
      5. Simplified81.5%

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

      if -26 < y < 1.00000000000000002e-287 or 8.9999999999999995e-86 < y < 3.4999999999999999e26

      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 \mathsf{*.f64}\left(t, \color{blue}{\left(y - z\right)}\right) \]
        2. --lowering--.f6462.7%

          \[\leadsto \mathsf{*.f64}\left(t, \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
      5. Simplified62.7%

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

      if 1.00000000000000002e-287 < y < 8.9999999999999995e-86

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

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

          \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right)\right) \]
        3. unsub-negN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{\left(y - z\right)}\right)\right) \]
        4. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(y - z\right)}\right)\right) \]
        5. --lowering--.f6473.5%

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
      5. Simplified73.5%

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

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

          \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + z\right)}\right) \]
        2. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(z + \color{blue}{1}\right)\right) \]
        3. +-lowering-+.f6473.5%

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(z, \color{blue}{1}\right)\right) \]
      8. Simplified73.5%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -26:\\ \;\;\;\;y \cdot \left(t - x\right)\\ \mathbf{elif}\;y \leq 10^{-287}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \mathbf{elif}\;y \leq 9 \cdot 10^{-86}:\\ \;\;\;\;x \cdot \left(z + 1\right)\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{+26}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(t - x\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 4: 74.8% accurate, 0.5× speedup?

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

      1. Initial program 100.0%

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

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

          \[\leadsto \mathsf{*.f64}\left(t, \color{blue}{\left(y - z\right)}\right) \]
        2. --lowering--.f6483.5%

          \[\leadsto \mathsf{*.f64}\left(t, \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
      5. Simplified83.5%

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

      if -3.55000000000000002e-8 < t < 2.44999999999999993e104

      1. Initial program 100.0%

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

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

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

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

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

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

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(x, \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right)\right) \]
        6. sub-negN/A

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

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

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

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

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(x, \left(z - y\right)\right)\right) \]
        11. --lowering--.f6477.1%

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(z, \color{blue}{y}\right)\right)\right) \]
      5. Simplified77.1%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.55 \cdot 10^{-8}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \mathbf{elif}\;t \leq 2.45 \cdot 10^{+104}:\\ \;\;\;\;x + x \cdot \left(z - y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \end{array} \]
    5. Add Preprocessing

    Alternative 5: 74.8% accurate, 0.5× speedup?

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

      1. Initial program 100.0%

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

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

          \[\leadsto \mathsf{*.f64}\left(t, \color{blue}{\left(y - z\right)}\right) \]
        2. --lowering--.f6483.5%

          \[\leadsto \mathsf{*.f64}\left(t, \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
      5. Simplified83.5%

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

      if -2.55e-8 < t < 2.0999999999999998e104

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

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

          \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right)\right) \]
        3. unsub-negN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{\left(y - z\right)}\right)\right) \]
        4. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(y - z\right)}\right)\right) \]
        5. --lowering--.f6477.0%

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
      5. Simplified77.0%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.55 \cdot 10^{-8}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{+104}:\\ \;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \end{array} \]
    5. Add Preprocessing

    Alternative 6: 63.1% accurate, 0.6× speedup?

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

      1. Initial program 100.0%

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

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

          \[\leadsto \mathsf{*.f64}\left(t, \color{blue}{\left(y - z\right)}\right) \]
        2. --lowering--.f6474.5%

          \[\leadsto \mathsf{*.f64}\left(t, \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
      5. Simplified74.5%

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

      if -2.35e-7 < t < 8.5999999999999997e-41

      1. Initial program 100.0%

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

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

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

          \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right)\right) \]
        3. unsub-negN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{\left(y - z\right)}\right)\right) \]
        4. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(y - z\right)}\right)\right) \]
        5. --lowering--.f6482.9%

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
      5. Simplified82.9%

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

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{y}\right)\right) \]
      7. Step-by-step derivation
        1. Simplified55.4%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.35 \cdot 10^{-7}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \mathbf{elif}\;t \leq 8.6 \cdot 10^{-41}:\\ \;\;\;\;x \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \end{array} \]
      10. Add Preprocessing

      Alternative 7: 62.6% accurate, 0.6× speedup?

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

        1. Initial program 100.0%

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

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

            \[\leadsto \mathsf{*.f64}\left(t, \color{blue}{\left(y - z\right)}\right) \]
          2. --lowering--.f6474.5%

            \[\leadsto \mathsf{*.f64}\left(t, \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
        5. Simplified74.5%

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

        if -2.49999999999999989e-7 < t < 1.20000000000000008e-39

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

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

            \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right)\right) \]
          3. unsub-negN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{\left(y - z\right)}\right)\right) \]
          4. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(y - z\right)}\right)\right) \]
          5. --lowering--.f6482.9%

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
        5. Simplified82.9%

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

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

            \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + z\right)}\right) \]
          2. +-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(z + \color{blue}{1}\right)\right) \]
          3. +-lowering-+.f6452.2%

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(z, \color{blue}{1}\right)\right) \]
        8. Simplified52.2%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.5 \cdot 10^{-7}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-39}:\\ \;\;\;\;x \cdot \left(z + 1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \end{array} \]
      5. Add Preprocessing

      Alternative 8: 54.1% accurate, 0.6× speedup?

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

        1. Initial program 100.0%

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

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

            \[\leadsto \mathsf{*.f64}\left(t, \color{blue}{\left(y - z\right)}\right) \]
          2. --lowering--.f6466.8%

            \[\leadsto \mathsf{*.f64}\left(t, \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
        5. Simplified66.8%

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

        if -1.19999999999999996e-68 < t < 2.9000000000000001e-147

        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 \mathsf{neg}\left(z \cdot \left(t - x\right)\right) \]
          2. distribute-rgt-neg-inN/A

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

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

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

            \[\leadsto \mathsf{*.f64}\left(z, \left(\mathsf{neg}\left(\left(t - x\right)\right)\right)\right) \]
          6. sub-negN/A

            \[\leadsto \mathsf{*.f64}\left(z, \left(\mathsf{neg}\left(\left(t + \left(\mathsf{neg}\left(x\right)\right)\right)\right)\right)\right) \]
          7. +-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(z, \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(x\right)\right) + t\right)\right)\right)\right) \]
          8. distribute-neg-inN/A

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

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

            \[\leadsto \mathsf{*.f64}\left(z, \left(x - t\right)\right) \]
          11. --lowering--.f6443.6%

            \[\leadsto \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(x, \color{blue}{t}\right)\right) \]
        5. Simplified43.6%

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

          \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{x}\right) \]
        7. Step-by-step derivation
          1. Simplified34.7%

            \[\leadsto z \cdot \color{blue}{x} \]
        8. Recombined 2 regimes into one program.
        9. Final simplification56.4%

          \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.2 \cdot 10^{-68}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-147}:\\ \;\;\;\;x \cdot z\\ \mathbf{else}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \end{array} \]
        10. Add Preprocessing

        Alternative 9: 38.1% accurate, 0.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{+41}:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{+105}:\\ \;\;\;\;y \cdot t\\ \mathbf{else}:\\ \;\;\;\;x \cdot z\\ \end{array} \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (if (<= z -1.75e+41) (* x z) (if (<= z 1.12e+105) (* y t) (* x z))))
        double code(double x, double y, double z, double t) {
        	double tmp;
        	if (z <= -1.75e+41) {
        		tmp = x * z;
        	} else if (z <= 1.12e+105) {
        		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 <= (-1.75d+41)) then
                tmp = x * z
            else if (z <= 1.12d+105) 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 <= -1.75e+41) {
        		tmp = x * z;
        	} else if (z <= 1.12e+105) {
        		tmp = y * t;
        	} else {
        		tmp = x * z;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t):
        	tmp = 0
        	if z <= -1.75e+41:
        		tmp = x * z
        	elif z <= 1.12e+105:
        		tmp = y * t
        	else:
        		tmp = x * z
        	return tmp
        
        function code(x, y, z, t)
        	tmp = 0.0
        	if (z <= -1.75e+41)
        		tmp = Float64(x * z);
        	elseif (z <= 1.12e+105)
        		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 <= -1.75e+41)
        		tmp = x * z;
        	elseif (z <= 1.12e+105)
        		tmp = y * t;
        	else
        		tmp = x * z;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_] := If[LessEqual[z, -1.75e+41], N[(x * z), $MachinePrecision], If[LessEqual[z, 1.12e+105], N[(y * t), $MachinePrecision], N[(x * z), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;z \leq -1.75 \cdot 10^{+41}:\\
        \;\;\;\;x \cdot z\\
        
        \mathbf{elif}\;z \leq 1.12 \cdot 10^{+105}:\\
        \;\;\;\;y \cdot t\\
        
        \mathbf{else}:\\
        \;\;\;\;x \cdot z\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -1.75e41 or 1.12e105 < 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 \mathsf{neg}\left(z \cdot \left(t - x\right)\right) \]
            2. distribute-rgt-neg-inN/A

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

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

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

              \[\leadsto \mathsf{*.f64}\left(z, \left(\mathsf{neg}\left(\left(t - x\right)\right)\right)\right) \]
            6. sub-negN/A

              \[\leadsto \mathsf{*.f64}\left(z, \left(\mathsf{neg}\left(\left(t + \left(\mathsf{neg}\left(x\right)\right)\right)\right)\right)\right) \]
            7. +-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(z, \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(x\right)\right) + t\right)\right)\right)\right) \]
            8. distribute-neg-inN/A

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

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

              \[\leadsto \mathsf{*.f64}\left(z, \left(x - t\right)\right) \]
            11. --lowering--.f6486.9%

              \[\leadsto \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(x, \color{blue}{t}\right)\right) \]
          5. Simplified86.9%

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

            \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{x}\right) \]
          7. Step-by-step derivation
            1. Simplified50.9%

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

            if -1.75e41 < z < 1.12e105

            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 \mathsf{*.f64}\left(y, \color{blue}{\left(t - x\right)}\right) \]
              2. --lowering--.f6463.9%

                \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(t, \color{blue}{x}\right)\right) \]
            5. Simplified63.9%

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

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{+41}:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{+105}:\\ \;\;\;\;y \cdot t\\ \mathbf{else}:\\ \;\;\;\;x \cdot z\\ \end{array} \]
            10. Add Preprocessing

            Alternative 10: 37.1% accurate, 0.7× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -25500000000000:\\ \;\;\;\;y \cdot t\\ \mathbf{elif}\;y \leq 1.75 \cdot 10^{-35}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot t\\ \end{array} \end{array} \]
            (FPCore (x y z t)
             :precision binary64
             (if (<= y -25500000000000.0) (* y t) (if (<= y 1.75e-35) x (* y t))))
            double code(double x, double y, double z, double t) {
            	double tmp;
            	if (y <= -25500000000000.0) {
            		tmp = y * t;
            	} else if (y <= 1.75e-35) {
            		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 <= (-25500000000000.0d0)) then
                    tmp = y * t
                else if (y <= 1.75d-35) 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 <= -25500000000000.0) {
            		tmp = y * t;
            	} else if (y <= 1.75e-35) {
            		tmp = x;
            	} else {
            		tmp = y * t;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t):
            	tmp = 0
            	if y <= -25500000000000.0:
            		tmp = y * t
            	elif y <= 1.75e-35:
            		tmp = x
            	else:
            		tmp = y * t
            	return tmp
            
            function code(x, y, z, t)
            	tmp = 0.0
            	if (y <= -25500000000000.0)
            		tmp = Float64(y * t);
            	elseif (y <= 1.75e-35)
            		tmp = x;
            	else
            		tmp = Float64(y * t);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t)
            	tmp = 0.0;
            	if (y <= -25500000000000.0)
            		tmp = y * t;
            	elseif (y <= 1.75e-35)
            		tmp = x;
            	else
            		tmp = y * t;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_] := If[LessEqual[y, -25500000000000.0], N[(y * t), $MachinePrecision], If[LessEqual[y, 1.75e-35], x, N[(y * t), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;y \leq -25500000000000:\\
            \;\;\;\;y \cdot t\\
            
            \mathbf{elif}\;y \leq 1.75 \cdot 10^{-35}:\\
            \;\;\;\;x\\
            
            \mathbf{else}:\\
            \;\;\;\;y \cdot t\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if y < -2.55e13 or 1.74999999999999998e-35 < 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 \mathsf{*.f64}\left(y, \color{blue}{\left(t - x\right)}\right) \]
                2. --lowering--.f6476.5%

                  \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(t, \color{blue}{x}\right)\right) \]
              5. Simplified76.5%

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

                \[\leadsto \mathsf{*.f64}\left(y, \color{blue}{t}\right) \]
              7. Step-by-step derivation
                1. Simplified43.2%

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

                if -2.55e13 < y < 1.74999999999999998e-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 inf

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

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

                    \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right)\right) \]
                  3. unsub-negN/A

                    \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{\left(y - z\right)}\right)\right) \]
                  4. --lowering--.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(y - z\right)}\right)\right) \]
                  5. --lowering--.f6456.2%

                    \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
                5. Simplified56.2%

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

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

                    \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + z\right)}\right) \]
                  2. +-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(x, \left(z + \color{blue}{1}\right)\right) \]
                  3. +-lowering-+.f6454.1%

                    \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(z, \color{blue}{1}\right)\right) \]
                8. Simplified54.1%

                  \[\leadsto \color{blue}{x \cdot \left(z + 1\right)} \]
                9. Taylor expanded in z around 0

                  \[\leadsto \color{blue}{x} \]
                10. Step-by-step derivation
                  1. Simplified34.6%

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

                Alternative 11: 17.9% accurate, 9.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 x around inf

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

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

                    \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right)\right) \]
                  3. unsub-negN/A

                    \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{\left(y - z\right)}\right)\right) \]
                  4. --lowering--.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(y - z\right)}\right)\right) \]
                  5. --lowering--.f6454.8%

                    \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
                5. Simplified54.8%

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

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

                    \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + z\right)}\right) \]
                  2. +-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(x, \left(z + \color{blue}{1}\right)\right) \]
                  3. +-lowering-+.f6435.4%

                    \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(z, \color{blue}{1}\right)\right) \]
                8. Simplified35.4%

                  \[\leadsto \color{blue}{x \cdot \left(z + 1\right)} \]
                9. Taylor expanded in z around 0

                  \[\leadsto \color{blue}{x} \]
                10. Step-by-step derivation
                  1. Simplified16.2%

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

                  Developer Target 1: 96.2% 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 2024192 
                  (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))))