Data.Metrics.Snapshot:quantile from metrics-0.3.0.2

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

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 11 alternatives:

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

Initial Program: 100.0% accurate, 1.0× speedup?

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

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

Alternative 1: 100.0% accurate, 1.0× speedup?

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

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

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

Alternative 2: 69.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(t - x\right)\\ \mathbf{if}\;y \leq -4 \cdot 10^{+52}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.12 \cdot 10^{-255}:\\ \;\;\;\;z \cdot \left(x - t\right)\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{+38}:\\ \;\;\;\;x - z \cdot t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* y (- t x))))
   (if (<= y -4e+52)
     t_1
     (if (<= y 1.12e-255)
       (* z (- x t))
       (if (<= y 1.05e+38) (- x (* z t)) t_1)))))
double code(double x, double y, double z, double t) {
	double t_1 = y * (t - x);
	double tmp;
	if (y <= -4e+52) {
		tmp = t_1;
	} else if (y <= 1.12e-255) {
		tmp = z * (x - t);
	} else if (y <= 1.05e+38) {
		tmp = x - (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 = y * (t - x)
    if (y <= (-4d+52)) then
        tmp = t_1
    else if (y <= 1.12d-255) then
        tmp = z * (x - t)
    else if (y <= 1.05d+38) then
        tmp = x - (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 = y * (t - x);
	double tmp;
	if (y <= -4e+52) {
		tmp = t_1;
	} else if (y <= 1.12e-255) {
		tmp = z * (x - t);
	} else if (y <= 1.05e+38) {
		tmp = x - (z * t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = y * (t - x)
	tmp = 0
	if y <= -4e+52:
		tmp = t_1
	elif y <= 1.12e-255:
		tmp = z * (x - t)
	elif y <= 1.05e+38:
		tmp = x - (z * t)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(y * Float64(t - x))
	tmp = 0.0
	if (y <= -4e+52)
		tmp = t_1;
	elseif (y <= 1.12e-255)
		tmp = Float64(z * Float64(x - t));
	elseif (y <= 1.05e+38)
		tmp = Float64(x - Float64(z * t));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = y * (t - x);
	tmp = 0.0;
	if (y <= -4e+52)
		tmp = t_1;
	elseif (y <= 1.12e-255)
		tmp = z * (x - t);
	elseif (y <= 1.05e+38)
		tmp = x - (z * t);
	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]}, If[LessEqual[y, -4e+52], t$95$1, If[LessEqual[y, 1.12e-255], N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.05e+38], N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq 1.05 \cdot 10^{+38}:\\
\;\;\;\;x - z \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4e52 or 1.05e38 < 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--.f6487.5%

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

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

    if -4e52 < y < 1.12000000000000009e-255

    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--.f6470.9%

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

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

    if 1.12000000000000009e-255 < y < 1.05e38

    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 \mathsf{+.f64}\left(x, \left(\left(t - x\right) \cdot \color{blue}{\left(y - z\right)}\right)\right) \]
      2. flip--N/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\left(t - x\right) \cdot \frac{y \cdot y - z \cdot z}{\color{blue}{y + z}}\right)\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(\left(t - x\right) \cdot \frac{1}{\color{blue}{\frac{y + z}{y \cdot y - z \cdot z}}}\right)\right) \]
      4. un-div-invN/A

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{\color{blue}{y + z}}{y \cdot y - z \cdot z}\right)\right)\right) \]
      7. clear-numN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{1}{\color{blue}{\frac{y \cdot y - z \cdot z}{y + z}}}\right)\right)\right) \]
      8. flip--N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{1}{y - \color{blue}{z}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(1, \color{blue}{\left(y - z\right)}\right)\right)\right) \]
      10. --lowering--.f6499.8%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right)\right)\right) \]
    4. Applied egg-rr99.8%

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{1}{y - z}}} \]
    5. Taylor expanded in t around inf

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{t \cdot z} \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(t \cdot z\right)}\right) \]
      4. *-lowering-*.f6468.3%

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

      \[\leadsto \color{blue}{x - t \cdot z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification77.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4 \cdot 10^{+52}:\\ \;\;\;\;y \cdot \left(t - x\right)\\ \mathbf{elif}\;y \leq 1.12 \cdot 10^{-255}:\\ \;\;\;\;z \cdot \left(x - t\right)\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{+38}:\\ \;\;\;\;x - z \cdot t\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(t - x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 67.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(t - x\right)\\ \mathbf{if}\;y \leq -7.6 \cdot 10^{+55}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 9 \cdot 10^{-137}:\\ \;\;\;\;z \cdot \left(x - t\right)\\ \mathbf{elif}\;y \leq 2.25 \cdot 10^{+35}:\\ \;\;\;\;x + x \cdot z\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* y (- t x))))
   (if (<= y -7.6e+55)
     t_1
     (if (<= y 9e-137) (* z (- x t)) (if (<= y 2.25e+35) (+ x (* x z)) t_1)))))
double code(double x, double y, double z, double t) {
	double t_1 = y * (t - x);
	double tmp;
	if (y <= -7.6e+55) {
		tmp = t_1;
	} else if (y <= 9e-137) {
		tmp = z * (x - t);
	} else if (y <= 2.25e+35) {
		tmp = x + (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 * (t - x)
    if (y <= (-7.6d+55)) then
        tmp = t_1
    else if (y <= 9d-137) then
        tmp = z * (x - t)
    else if (y <= 2.25d+35) then
        tmp = x + (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 * (t - x);
	double tmp;
	if (y <= -7.6e+55) {
		tmp = t_1;
	} else if (y <= 9e-137) {
		tmp = z * (x - t);
	} else if (y <= 2.25e+35) {
		tmp = x + (x * z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = y * (t - x)
	tmp = 0
	if y <= -7.6e+55:
		tmp = t_1
	elif y <= 9e-137:
		tmp = z * (x - t)
	elif y <= 2.25e+35:
		tmp = x + (x * z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(y * Float64(t - x))
	tmp = 0.0
	if (y <= -7.6e+55)
		tmp = t_1;
	elseif (y <= 9e-137)
		tmp = Float64(z * Float64(x - t));
	elseif (y <= 2.25e+35)
		tmp = Float64(x + Float64(x * z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = y * (t - x);
	tmp = 0.0;
	if (y <= -7.6e+55)
		tmp = t_1;
	elseif (y <= 9e-137)
		tmp = z * (x - t);
	elseif (y <= 2.25e+35)
		tmp = x + (x * z);
	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]}, If[LessEqual[y, -7.6e+55], t$95$1, If[LessEqual[y, 9e-137], N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.25e+35], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq 2.25 \cdot 10^{+35}:\\
\;\;\;\;x + x \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.5999999999999999e55 or 2.2499999999999998e35 < 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--.f6486.8%

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

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

    if -7.5999999999999999e55 < y < 8.9999999999999994e-137

    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--.f6470.1%

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

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

    if 8.9999999999999994e-137 < y < 2.2499999999999998e35

    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--.f6467.4%

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

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

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

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

      \[\leadsto x + \color{blue}{x \cdot z} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 4: 35.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.4 \cdot 10^{+64}:\\ \;\;\;\;y \cdot t\\ \mathbf{elif}\;y \leq 8.4 \cdot 10^{-255}:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{-40}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -3.4e+64)
   (* y t)
   (if (<= y 8.4e-255) (* x z) (if (<= y 4.5e-40) x (* y t)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -3.4e+64) {
		tmp = y * t;
	} else if (y <= 8.4e-255) {
		tmp = x * z;
	} else if (y <= 4.5e-40) {
		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 <= (-3.4d+64)) then
        tmp = y * t
    else if (y <= 8.4d-255) then
        tmp = x * z
    else if (y <= 4.5d-40) 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 <= -3.4e+64) {
		tmp = y * t;
	} else if (y <= 8.4e-255) {
		tmp = x * z;
	} else if (y <= 4.5e-40) {
		tmp = x;
	} else {
		tmp = y * t;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -3.4e+64:
		tmp = y * t
	elif y <= 8.4e-255:
		tmp = x * z
	elif y <= 4.5e-40:
		tmp = x
	else:
		tmp = y * t
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -3.4e+64)
		tmp = Float64(y * t);
	elseif (y <= 8.4e-255)
		tmp = Float64(x * z);
	elseif (y <= 4.5e-40)
		tmp = x;
	else
		tmp = Float64(y * t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -3.4e+64)
		tmp = y * t;
	elseif (y <= 8.4e-255)
		tmp = x * z;
	elseif (y <= 4.5e-40)
		tmp = x;
	else
		tmp = y * t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.4e+64], N[(y * t), $MachinePrecision], If[LessEqual[y, 8.4e-255], N[(x * z), $MachinePrecision], If[LessEqual[y, 4.5e-40], x, N[(y * t), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{+64}:\\
\;\;\;\;y \cdot t\\

\mathbf{elif}\;y \leq 8.4 \cdot 10^{-255}:\\
\;\;\;\;x \cdot z\\

\mathbf{elif}\;y \leq 4.5 \cdot 10^{-40}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;y \cdot t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.4000000000000002e64 or 4.5000000000000001e-40 < 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.0%

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

      \[\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. Simplified51.3%

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

      if -3.4000000000000002e64 < y < 8.3999999999999999e-255

      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--.f6469.6%

          \[\leadsto \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(x, \color{blue}{t}\right)\right) \]
      5. Simplified69.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. Simplified35.9%

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

        if 8.3999999999999999e-255 < y < 4.5000000000000001e-40

        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 \mathsf{+.f64}\left(x, \left(\left(t - x\right) \cdot \color{blue}{\left(y - z\right)}\right)\right) \]
          2. flip--N/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(\left(t - x\right) \cdot \frac{y \cdot y - z \cdot z}{\color{blue}{y + z}}\right)\right) \]
          3. clear-numN/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(\left(t - x\right) \cdot \frac{1}{\color{blue}{\frac{y + z}{y \cdot y - z \cdot z}}}\right)\right) \]
          4. un-div-invN/A

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

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

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{\color{blue}{y + z}}{y \cdot y - z \cdot z}\right)\right)\right) \]
          7. clear-numN/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{1}{\color{blue}{\frac{y \cdot y - z \cdot z}{y + z}}}\right)\right)\right) \]
          8. flip--N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{1}{y - \color{blue}{z}}\right)\right)\right) \]
          9. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(1, \color{blue}{\left(y - z\right)}\right)\right)\right) \]
          10. --lowering--.f6499.8%

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right)\right)\right) \]
        4. Applied egg-rr99.8%

          \[\leadsto x + \color{blue}{\frac{t - x}{\frac{1}{y - z}}} \]
        5. Taylor expanded in t around inf

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

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

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

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

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

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

            \[\leadsto \color{blue}{x} \]
        10. Recombined 3 regimes into one program.
        11. Final simplification44.8%

          \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.4 \cdot 10^{+64}:\\ \;\;\;\;y \cdot t\\ \mathbf{elif}\;y \leq 8.4 \cdot 10^{-255}:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{-40}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot t\\ \end{array} \]
        12. Add Preprocessing

        Alternative 5: 83.8% accurate, 0.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(t - x\right)\\ \mathbf{if}\;y \leq -6 \cdot 10^{+52}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{+39}:\\ \;\;\;\;x + z \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (let* ((t_1 (* y (- t x))))
           (if (<= y -6e+52) t_1 (if (<= y 2.1e+39) (+ x (* z (- x t))) t_1))))
        double code(double x, double y, double z, double t) {
        	double t_1 = y * (t - x);
        	double tmp;
        	if (y <= -6e+52) {
        		tmp = t_1;
        	} else if (y <= 2.1e+39) {
        		tmp = x + (z * (x - t));
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        real(8) function code(x, y, z, t)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8), intent (in) :: t
            real(8) :: t_1
            real(8) :: tmp
            t_1 = y * (t - x)
            if (y <= (-6d+52)) then
                tmp = t_1
            else if (y <= 2.1d+39) then
                tmp = x + (z * (x - t))
            else
                tmp = t_1
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t) {
        	double t_1 = y * (t - x);
        	double tmp;
        	if (y <= -6e+52) {
        		tmp = t_1;
        	} else if (y <= 2.1e+39) {
        		tmp = x + (z * (x - t));
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t):
        	t_1 = y * (t - x)
        	tmp = 0
        	if y <= -6e+52:
        		tmp = t_1
        	elif y <= 2.1e+39:
        		tmp = x + (z * (x - t))
        	else:
        		tmp = t_1
        	return tmp
        
        function code(x, y, z, t)
        	t_1 = Float64(y * Float64(t - x))
        	tmp = 0.0
        	if (y <= -6e+52)
        		tmp = t_1;
        	elseif (y <= 2.1e+39)
        		tmp = Float64(x + Float64(z * Float64(x - t)));
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t)
        	t_1 = y * (t - x);
        	tmp = 0.0;
        	if (y <= -6e+52)
        		tmp = t_1;
        	elseif (y <= 2.1e+39)
        		tmp = x + (z * (x - t));
        	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]}, If[LessEqual[y, -6e+52], t$95$1, If[LessEqual[y, 2.1e+39], N[(x + N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := y \cdot \left(t - x\right)\\
        \mathbf{if}\;y \leq -6 \cdot 10^{+52}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;y \leq 2.1 \cdot 10^{+39}:\\
        \;\;\;\;x + z \cdot \left(x - t\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if y < -6e52 or 2.0999999999999999e39 < 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--.f6487.5%

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

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

          if -6e52 < y < 2.0999999999999999e39

          1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{+.f64}\left(x, \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)\right) \]
            10. unsub-negN/A

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

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(z, \left(x - t\right)\right)\right) \]
            12. --lowering--.f6488.3%

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

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

        Alternative 6: 76.6% accurate, 0.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot t\\ \mathbf{if}\;t \leq -1.6 \cdot 10^{-11}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{+53}:\\ \;\;\;\;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 -1.6e-11) t_1 (if (<= t 5.4e+53) (+ 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 <= -1.6e-11) {
        		tmp = t_1;
        	} else if (t <= 5.4e+53) {
        		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 <= (-1.6d-11)) then
                tmp = t_1
            else if (t <= 5.4d+53) 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 <= -1.6e-11) {
        		tmp = t_1;
        	} else if (t <= 5.4e+53) {
        		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 <= -1.6e-11:
        		tmp = t_1
        	elif t <= 5.4e+53:
        		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 <= -1.6e-11)
        		tmp = t_1;
        	elseif (t <= 5.4e+53)
        		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 <= -1.6e-11)
        		tmp = t_1;
        	elseif (t <= 5.4e+53)
        		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, -1.6e-11], t$95$1, If[LessEqual[t, 5.4e+53], 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 -1.6 \cdot 10^{-11}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t \leq 5.4 \cdot 10^{+53}:\\
        \;\;\;\;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 < -1.59999999999999997e-11 or 5.40000000000000039e53 < 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--.f6482.9%

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

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

          if -1.59999999999999997e-11 < t < 5.40000000000000039e53

          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--.f6474.9%

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

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

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

        Alternative 7: 68.1% accurate, 0.6× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(t - x\right)\\ \mathbf{if}\;y \leq -3.5 \cdot 10^{+52}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{+38}:\\ \;\;\;\;z \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (let* ((t_1 (* y (- t x))))
           (if (<= y -3.5e+52) t_1 (if (<= y 1.4e+38) (* z (- x t)) t_1))))
        double code(double x, double y, double z, double t) {
        	double t_1 = y * (t - x);
        	double tmp;
        	if (y <= -3.5e+52) {
        		tmp = t_1;
        	} else if (y <= 1.4e+38) {
        		tmp = z * (x - t);
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        real(8) function code(x, y, z, t)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8), intent (in) :: t
            real(8) :: t_1
            real(8) :: tmp
            t_1 = y * (t - x)
            if (y <= (-3.5d+52)) then
                tmp = t_1
            else if (y <= 1.4d+38) then
                tmp = z * (x - t)
            else
                tmp = t_1
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t) {
        	double t_1 = y * (t - x);
        	double tmp;
        	if (y <= -3.5e+52) {
        		tmp = t_1;
        	} else if (y <= 1.4e+38) {
        		tmp = z * (x - t);
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t):
        	t_1 = y * (t - x)
        	tmp = 0
        	if y <= -3.5e+52:
        		tmp = t_1
        	elif y <= 1.4e+38:
        		tmp = z * (x - t)
        	else:
        		tmp = t_1
        	return tmp
        
        function code(x, y, z, t)
        	t_1 = Float64(y * Float64(t - x))
        	tmp = 0.0
        	if (y <= -3.5e+52)
        		tmp = t_1;
        	elseif (y <= 1.4e+38)
        		tmp = Float64(z * Float64(x - t));
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t)
        	t_1 = y * (t - x);
        	tmp = 0.0;
        	if (y <= -3.5e+52)
        		tmp = t_1;
        	elseif (y <= 1.4e+38)
        		tmp = z * (x - t);
        	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]}, If[LessEqual[y, -3.5e+52], t$95$1, If[LessEqual[y, 1.4e+38], N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := y \cdot \left(t - x\right)\\
        \mathbf{if}\;y \leq -3.5 \cdot 10^{+52}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;y \leq 1.4 \cdot 10^{+38}:\\
        \;\;\;\;z \cdot \left(x - t\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if y < -3.5e52 or 1.4e38 < 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--.f6487.5%

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

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

          if -3.5e52 < y < 1.4e38

          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--.f6465.2%

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

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

        Alternative 8: 61.4% accurate, 0.6× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(t - x\right)\\ \mathbf{if}\;y \leq -1.8 \cdot 10^{+41}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{+39}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (let* ((t_1 (* y (- t x))))
           (if (<= y -1.8e+41) t_1 (if (<= y 4.2e+39) (* (- y z) t) t_1))))
        double code(double x, double y, double z, double t) {
        	double t_1 = y * (t - x);
        	double tmp;
        	if (y <= -1.8e+41) {
        		tmp = t_1;
        	} else if (y <= 4.2e+39) {
        		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 = y * (t - x)
            if (y <= (-1.8d+41)) then
                tmp = t_1
            else if (y <= 4.2d+39) 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 = y * (t - x);
        	double tmp;
        	if (y <= -1.8e+41) {
        		tmp = t_1;
        	} else if (y <= 4.2e+39) {
        		tmp = (y - z) * t;
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t):
        	t_1 = y * (t - x)
        	tmp = 0
        	if y <= -1.8e+41:
        		tmp = t_1
        	elif y <= 4.2e+39:
        		tmp = (y - z) * t
        	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.8e+41)
        		tmp = t_1;
        	elseif (y <= 4.2e+39)
        		tmp = Float64(Float64(y - z) * t);
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t)
        	t_1 = y * (t - x);
        	tmp = 0.0;
        	if (y <= -1.8e+41)
        		tmp = t_1;
        	elseif (y <= 4.2e+39)
        		tmp = (y - z) * t;
        	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]}, If[LessEqual[y, -1.8e+41], t$95$1, If[LessEqual[y, 4.2e+39], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := y \cdot \left(t - x\right)\\
        \mathbf{if}\;y \leq -1.8 \cdot 10^{+41}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;y \leq 4.2 \cdot 10^{+39}:\\
        \;\;\;\;\left(y - z\right) \cdot t\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if y < -1.80000000000000013e41 or 4.1999999999999997e39 < 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--.f6486.9%

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

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

          if -1.80000000000000013e41 < y < 4.1999999999999997e39

          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--.f6448.8%

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

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

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

        Alternative 9: 55.3% 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^{-91}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 3.7 \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 -2.35e-91) t_1 (if (<= t 3.7e-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 <= -2.35e-91) {
        		tmp = t_1;
        	} else if (t <= 3.7e-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 <= (-2.35d-91)) then
                tmp = t_1
            else if (t <= 3.7d-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 <= -2.35e-91) {
        		tmp = t_1;
        	} else if (t <= 3.7e-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 <= -2.35e-91:
        		tmp = t_1
        	elif t <= 3.7e-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 <= -2.35e-91)
        		tmp = t_1;
        	elseif (t <= 3.7e-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 <= -2.35e-91)
        		tmp = t_1;
        	elseif (t <= 3.7e-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, -2.35e-91], t$95$1, If[LessEqual[t, 3.7e-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 -2.35 \cdot 10^{-91}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t \leq 3.7 \cdot 10^{-147}:\\
        \;\;\;\;x \cdot z\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if t < -2.35000000000000003e-91 or 3.7000000000000002e-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--.f6470.4%

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

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

          if -2.35000000000000003e-91 < t < 3.7000000000000002e-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--.f6444.9%

              \[\leadsto \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(x, \color{blue}{t}\right)\right) \]
          5. Simplified44.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. Simplified39.0%

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

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

          Alternative 10: 36.6% accurate, 0.7× speedup?

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

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

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

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

              if -2.79999999999999988e-106 < y < 2.3e-37

              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 \mathsf{+.f64}\left(x, \left(\left(t - x\right) \cdot \color{blue}{\left(y - z\right)}\right)\right) \]
                2. flip--N/A

                  \[\leadsto \mathsf{+.f64}\left(x, \left(\left(t - x\right) \cdot \frac{y \cdot y - z \cdot z}{\color{blue}{y + z}}\right)\right) \]
                3. clear-numN/A

                  \[\leadsto \mathsf{+.f64}\left(x, \left(\left(t - x\right) \cdot \frac{1}{\color{blue}{\frac{y + z}{y \cdot y - z \cdot z}}}\right)\right) \]
                4. un-div-invN/A

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

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

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{\color{blue}{y + z}}{y \cdot y - z \cdot z}\right)\right)\right) \]
                7. clear-numN/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{1}{\color{blue}{\frac{y \cdot y - z \cdot z}{y + z}}}\right)\right)\right) \]
                8. flip--N/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{1}{y - \color{blue}{z}}\right)\right)\right) \]
                9. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(1, \color{blue}{\left(y - z\right)}\right)\right)\right) \]
                10. --lowering--.f6499.8%

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right)\right)\right) \]
              4. Applied egg-rr99.8%

                \[\leadsto x + \color{blue}{\frac{t - x}{\frac{1}{y - z}}} \]
              5. Taylor expanded in t around inf

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

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

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

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, z\right), t\right)\right) \]
              7. Simplified75.7%

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

                \[\leadsto \color{blue}{x} \]
              9. Step-by-step derivation
                1. Simplified33.0%

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

              Alternative 11: 18.2% 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. Step-by-step derivation
                1. *-commutativeN/A

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

                  \[\leadsto \mathsf{+.f64}\left(x, \left(\left(t - x\right) \cdot \frac{y \cdot y - z \cdot z}{\color{blue}{y + z}}\right)\right) \]
                3. clear-numN/A

                  \[\leadsto \mathsf{+.f64}\left(x, \left(\left(t - x\right) \cdot \frac{1}{\color{blue}{\frac{y + z}{y \cdot y - z \cdot z}}}\right)\right) \]
                4. un-div-invN/A

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

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

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{\color{blue}{y + z}}{y \cdot y - z \cdot z}\right)\right)\right) \]
                7. clear-numN/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{1}{\color{blue}{\frac{y \cdot y - z \cdot z}{y + z}}}\right)\right)\right) \]
                8. flip--N/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \left(\frac{1}{y - \color{blue}{z}}\right)\right)\right) \]
                9. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(1, \color{blue}{\left(y - z\right)}\right)\right)\right) \]
                10. --lowering--.f6499.8%

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, x\right), \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right)\right)\right) \]
              4. Applied egg-rr99.8%

                \[\leadsto x + \color{blue}{\frac{t - x}{\frac{1}{y - z}}} \]
              5. Taylor expanded in t around inf

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

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

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

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, z\right), t\right)\right) \]
              7. Simplified66.9%

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

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

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

                Developer Target 1: 96.7% 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 2024163 
                (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))))