Data.Metrics.Snapshot:quantile from metrics-0.3.0.2

Percentage Accurate: 100.0% → 100.0%
Time: 11.0s
Alternatives: 17
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 17 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, 0.2× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(y - z, t - x, x\right) \end{array} \]
(FPCore (x y z t) :precision binary64 (fma (- y z) (- t x) x))
double code(double x, double y, double z, double t) {
	return fma((y - z), (t - x), x);
}
function code(x, y, z, t)
	return fma(Float64(y - z), Float64(t - x), x)
end
code[x_, y_, z_, t_] := N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}

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

    \[x + \left(y - z\right) \cdot \left(t - x\right) \]
  2. Step-by-step derivation
    1. +-commutative100.0%

      \[\leadsto \color{blue}{\left(y - z\right) \cdot \left(t - x\right) + x} \]
    2. fma-def100.0%

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, t - x, x\right)} \]
  4. Add Preprocessing
  5. Final simplification100.0%

    \[\leadsto \mathsf{fma}\left(y - z, t - x, x\right) \]
  6. Add Preprocessing

Alternative 2: 62.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot t\\ t_2 := x \cdot \left(z + 1\right)\\ t_3 := x \cdot \left(1 - y\right)\\ \mathbf{if}\;t \leq -9.6 \cdot 10^{-6}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{-75}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -6.1 \cdot 10^{-93}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.4 \cdot 10^{-209}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -2.1 \cdot 10^{-293}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{-269}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-90}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-54}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (- y z) t)) (t_2 (* x (+ z 1.0))) (t_3 (* x (- 1.0 y))))
   (if (<= t -9.6e-6)
     t_1
     (if (<= t -2.6e-75)
       t_3
       (if (<= t -6.1e-93)
         t_1
         (if (<= t -1.4e-209)
           t_2
           (if (<= t -2.1e-293)
             t_3
             (if (<= t 1.85e-269)
               t_2
               (if (<= t 7.5e-90) t_3 (if (<= t 3.1e-54) t_2 t_1))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * t;
	double t_2 = x * (z + 1.0);
	double t_3 = x * (1.0 - y);
	double tmp;
	if (t <= -9.6e-6) {
		tmp = t_1;
	} else if (t <= -2.6e-75) {
		tmp = t_3;
	} else if (t <= -6.1e-93) {
		tmp = t_1;
	} else if (t <= -1.4e-209) {
		tmp = t_2;
	} else if (t <= -2.1e-293) {
		tmp = t_3;
	} else if (t <= 1.85e-269) {
		tmp = t_2;
	} else if (t <= 7.5e-90) {
		tmp = t_3;
	} else if (t <= 3.1e-54) {
		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) :: t_3
    real(8) :: tmp
    t_1 = (y - z) * t
    t_2 = x * (z + 1.0d0)
    t_3 = x * (1.0d0 - y)
    if (t <= (-9.6d-6)) then
        tmp = t_1
    else if (t <= (-2.6d-75)) then
        tmp = t_3
    else if (t <= (-6.1d-93)) then
        tmp = t_1
    else if (t <= (-1.4d-209)) then
        tmp = t_2
    else if (t <= (-2.1d-293)) then
        tmp = t_3
    else if (t <= 1.85d-269) then
        tmp = t_2
    else if (t <= 7.5d-90) then
        tmp = t_3
    else if (t <= 3.1d-54) 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 - z) * t;
	double t_2 = x * (z + 1.0);
	double t_3 = x * (1.0 - y);
	double tmp;
	if (t <= -9.6e-6) {
		tmp = t_1;
	} else if (t <= -2.6e-75) {
		tmp = t_3;
	} else if (t <= -6.1e-93) {
		tmp = t_1;
	} else if (t <= -1.4e-209) {
		tmp = t_2;
	} else if (t <= -2.1e-293) {
		tmp = t_3;
	} else if (t <= 1.85e-269) {
		tmp = t_2;
	} else if (t <= 7.5e-90) {
		tmp = t_3;
	} else if (t <= 3.1e-54) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (y - z) * t
	t_2 = x * (z + 1.0)
	t_3 = x * (1.0 - y)
	tmp = 0
	if t <= -9.6e-6:
		tmp = t_1
	elif t <= -2.6e-75:
		tmp = t_3
	elif t <= -6.1e-93:
		tmp = t_1
	elif t <= -1.4e-209:
		tmp = t_2
	elif t <= -2.1e-293:
		tmp = t_3
	elif t <= 1.85e-269:
		tmp = t_2
	elif t <= 7.5e-90:
		tmp = t_3
	elif t <= 3.1e-54:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(y - z) * t)
	t_2 = Float64(x * Float64(z + 1.0))
	t_3 = Float64(x * Float64(1.0 - y))
	tmp = 0.0
	if (t <= -9.6e-6)
		tmp = t_1;
	elseif (t <= -2.6e-75)
		tmp = t_3;
	elseif (t <= -6.1e-93)
		tmp = t_1;
	elseif (t <= -1.4e-209)
		tmp = t_2;
	elseif (t <= -2.1e-293)
		tmp = t_3;
	elseif (t <= 1.85e-269)
		tmp = t_2;
	elseif (t <= 7.5e-90)
		tmp = t_3;
	elseif (t <= 3.1e-54)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (y - z) * t;
	t_2 = x * (z + 1.0);
	t_3 = x * (1.0 - y);
	tmp = 0.0;
	if (t <= -9.6e-6)
		tmp = t_1;
	elseif (t <= -2.6e-75)
		tmp = t_3;
	elseif (t <= -6.1e-93)
		tmp = t_1;
	elseif (t <= -1.4e-209)
		tmp = t_2;
	elseif (t <= -2.1e-293)
		tmp = t_3;
	elseif (t <= 1.85e-269)
		tmp = t_2;
	elseif (t <= 7.5e-90)
		tmp = t_3;
	elseif (t <= 3.1e-54)
		tmp = t_2;
	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]}, Block[{t$95$2 = N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.6e-6], t$95$1, If[LessEqual[t, -2.6e-75], t$95$3, If[LessEqual[t, -6.1e-93], t$95$1, If[LessEqual[t, -1.4e-209], t$95$2, If[LessEqual[t, -2.1e-293], t$95$3, If[LessEqual[t, 1.85e-269], t$95$2, If[LessEqual[t, 7.5e-90], t$95$3, If[LessEqual[t, 3.1e-54], t$95$2, t$95$1]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot t\\
t_2 := x \cdot \left(z + 1\right)\\
t_3 := x \cdot \left(1 - y\right)\\
\mathbf{if}\;t \leq -9.6 \cdot 10^{-6}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -2.6 \cdot 10^{-75}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq -6.1 \cdot 10^{-93}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -1.4 \cdot 10^{-209}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -2.1 \cdot 10^{-293}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq 1.85 \cdot 10^{-269}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 7.5 \cdot 10^{-90}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq 3.1 \cdot 10^{-54}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.5999999999999996e-6 or -2.6e-75 < t < -6.09999999999999971e-93 or 3.10000000000000004e-54 < 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 88.5%

      \[\leadsto \color{blue}{t \cdot \left(y - z\right) + x \cdot \left(1 + -1 \cdot \left(y - z\right)\right)} \]
    4. Step-by-step derivation
      1. +-commutative88.5%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-1 \cdot \left(y - z\right) + 1\right)} \]
      2. mul-1-neg88.5%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right) \]
      3. neg-sub088.5%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(0 - \left(y - z\right)\right)} + 1\right) \]
      4. associate-+l-88.5%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(0 - \left(\left(y - z\right) - 1\right)\right)} \]
      5. associate--r+88.5%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \color{blue}{\left(y - \left(z + 1\right)\right)}\right) \]
      6. +-commutative88.5%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \left(y - \color{blue}{\left(1 + z\right)}\right)\right) \]
      7. neg-sub088.5%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-\left(y - \left(1 + z\right)\right)\right)} \]
      8. distribute-rgt-neg-in88.5%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{\left(-x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      9. mul-1-neg88.5%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{-1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      10. fma-def94.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, y - z, -1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)\right)} \]
      11. mul-1-neg94.2%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{-x \cdot \left(y - \left(1 + z\right)\right)}\right) \]
      12. distribute-rgt-neg-in94.2%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{x \cdot \left(-\left(y - \left(1 + z\right)\right)\right)}\right) \]
      13. neg-sub094.2%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(0 - \left(y - \left(1 + z\right)\right)\right)}\right) \]
      14. +-commutative94.2%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \left(y - \color{blue}{\left(z + 1\right)}\right)\right)\right) \]
      15. associate--r+94.2%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \color{blue}{\left(\left(y - z\right) - 1\right)}\right)\right) \]
      16. associate-+l-94.2%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(\left(0 - \left(y - z\right)\right) + 1\right)}\right) \]
      17. neg-sub094.2%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right)\right) \]
      18. mul-1-neg94.2%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{-1 \cdot \left(y - z\right)} + 1\right)\right) \]
      19. +-commutative94.2%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(1 + -1 \cdot \left(y - z\right)\right)}\right) \]
      20. mul-1-neg94.2%

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

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

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

    if -9.5999999999999996e-6 < t < -2.6e-75 or -1.40000000000000006e-209 < t < -2.10000000000000005e-293 or 1.84999999999999989e-269 < t < 7.4999999999999999e-90

    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 83.9%

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\left(y - z\right)\right)}\right) \]
      2. unsub-neg83.9%

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

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

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

    if -6.09999999999999971e-93 < t < -1.40000000000000006e-209 or -2.10000000000000005e-293 < t < 1.84999999999999989e-269 or 7.4999999999999999e-90 < t < 3.10000000000000004e-54

    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 86.7%

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\left(y - z\right)\right)}\right) \]
      2. unsub-neg86.7%

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(z + 1\right)} \]
    8. Simplified76.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.6 \cdot 10^{-6}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{-75}:\\ \;\;\;\;x \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq -6.1 \cdot 10^{-93}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \mathbf{elif}\;t \leq -1.4 \cdot 10^{-209}:\\ \;\;\;\;x \cdot \left(z + 1\right)\\ \mathbf{elif}\;t \leq -2.1 \cdot 10^{-293}:\\ \;\;\;\;x \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{-269}:\\ \;\;\;\;x \cdot \left(z + 1\right)\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-90}:\\ \;\;\;\;x \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-54}:\\ \;\;\;\;x \cdot \left(z + 1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 53.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot t\\ \mathbf{if}\;t \leq -7.2 \cdot 10^{-94}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -9.6 \cdot 10^{-120}:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;t \leq -8.8 \cdot 10^{-133}:\\ \;\;\;\;y \cdot t\\ \mathbf{elif}\;t \leq -3.7 \cdot 10^{-147}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.16 \cdot 10^{-265}:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{-134}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (- y z) t)))
   (if (<= t -7.2e-94)
     t_1
     (if (<= t -9.6e-120)
       (* z x)
       (if (<= t -8.8e-133)
         (* y t)
         (if (<= t -3.7e-147)
           x
           (if (<= t 1.16e-265)
             (* z x)
             (if (<= t 3.3e-134) (* y (- x)) t_1))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * t;
	double tmp;
	if (t <= -7.2e-94) {
		tmp = t_1;
	} else if (t <= -9.6e-120) {
		tmp = z * x;
	} else if (t <= -8.8e-133) {
		tmp = y * t;
	} else if (t <= -3.7e-147) {
		tmp = x;
	} else if (t <= 1.16e-265) {
		tmp = z * x;
	} else if (t <= 3.3e-134) {
		tmp = y * -x;
	} 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 <= (-7.2d-94)) then
        tmp = t_1
    else if (t <= (-9.6d-120)) then
        tmp = z * x
    else if (t <= (-8.8d-133)) then
        tmp = y * t
    else if (t <= (-3.7d-147)) then
        tmp = x
    else if (t <= 1.16d-265) then
        tmp = z * x
    else if (t <= 3.3d-134) then
        tmp = y * -x
    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 <= -7.2e-94) {
		tmp = t_1;
	} else if (t <= -9.6e-120) {
		tmp = z * x;
	} else if (t <= -8.8e-133) {
		tmp = y * t;
	} else if (t <= -3.7e-147) {
		tmp = x;
	} else if (t <= 1.16e-265) {
		tmp = z * x;
	} else if (t <= 3.3e-134) {
		tmp = y * -x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (y - z) * t
	tmp = 0
	if t <= -7.2e-94:
		tmp = t_1
	elif t <= -9.6e-120:
		tmp = z * x
	elif t <= -8.8e-133:
		tmp = y * t
	elif t <= -3.7e-147:
		tmp = x
	elif t <= 1.16e-265:
		tmp = z * x
	elif t <= 3.3e-134:
		tmp = y * -x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(y - z) * t)
	tmp = 0.0
	if (t <= -7.2e-94)
		tmp = t_1;
	elseif (t <= -9.6e-120)
		tmp = Float64(z * x);
	elseif (t <= -8.8e-133)
		tmp = Float64(y * t);
	elseif (t <= -3.7e-147)
		tmp = x;
	elseif (t <= 1.16e-265)
		tmp = Float64(z * x);
	elseif (t <= 3.3e-134)
		tmp = Float64(y * Float64(-x));
	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 <= -7.2e-94)
		tmp = t_1;
	elseif (t <= -9.6e-120)
		tmp = z * x;
	elseif (t <= -8.8e-133)
		tmp = y * t;
	elseif (t <= -3.7e-147)
		tmp = x;
	elseif (t <= 1.16e-265)
		tmp = z * x;
	elseif (t <= 3.3e-134)
		tmp = y * -x;
	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, -7.2e-94], t$95$1, If[LessEqual[t, -9.6e-120], N[(z * x), $MachinePrecision], If[LessEqual[t, -8.8e-133], N[(y * t), $MachinePrecision], If[LessEqual[t, -3.7e-147], x, If[LessEqual[t, 1.16e-265], N[(z * x), $MachinePrecision], If[LessEqual[t, 3.3e-134], N[(y * (-x)), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot t\\
\mathbf{if}\;t \leq -7.2 \cdot 10^{-94}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -9.6 \cdot 10^{-120}:\\
\;\;\;\;z \cdot x\\

\mathbf{elif}\;t \leq -8.8 \cdot 10^{-133}:\\
\;\;\;\;y \cdot t\\

\mathbf{elif}\;t \leq -3.7 \cdot 10^{-147}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 1.16 \cdot 10^{-265}:\\
\;\;\;\;z \cdot x\\

\mathbf{elif}\;t \leq 3.3 \cdot 10^{-134}:\\
\;\;\;\;y \cdot \left(-x\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -7.2e-94 or 3.30000000000000019e-134 < 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 90.3%

      \[\leadsto \color{blue}{t \cdot \left(y - z\right) + x \cdot \left(1 + -1 \cdot \left(y - z\right)\right)} \]
    4. Step-by-step derivation
      1. +-commutative90.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-1 \cdot \left(y - z\right) + 1\right)} \]
      2. mul-1-neg90.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right) \]
      3. neg-sub090.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(0 - \left(y - z\right)\right)} + 1\right) \]
      4. associate-+l-90.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(0 - \left(\left(y - z\right) - 1\right)\right)} \]
      5. associate--r+90.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \color{blue}{\left(y - \left(z + 1\right)\right)}\right) \]
      6. +-commutative90.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \left(y - \color{blue}{\left(1 + z\right)}\right)\right) \]
      7. neg-sub090.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-\left(y - \left(1 + z\right)\right)\right)} \]
      8. distribute-rgt-neg-in90.3%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{\left(-x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      9. mul-1-neg90.3%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{-1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      10. fma-def95.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, y - z, -1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)\right)} \]
      11. mul-1-neg95.1%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{-x \cdot \left(y - \left(1 + z\right)\right)}\right) \]
      12. distribute-rgt-neg-in95.1%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{x \cdot \left(-\left(y - \left(1 + z\right)\right)\right)}\right) \]
      13. neg-sub095.1%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(0 - \left(y - \left(1 + z\right)\right)\right)}\right) \]
      14. +-commutative95.1%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \left(y - \color{blue}{\left(z + 1\right)}\right)\right)\right) \]
      15. associate--r+95.1%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \color{blue}{\left(\left(y - z\right) - 1\right)}\right)\right) \]
      16. associate-+l-95.1%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(\left(0 - \left(y - z\right)\right) + 1\right)}\right) \]
      17. neg-sub095.1%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right)\right) \]
      18. mul-1-neg95.1%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{-1 \cdot \left(y - z\right)} + 1\right)\right) \]
      19. +-commutative95.1%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(1 + -1 \cdot \left(y - z\right)\right)}\right) \]
      20. mul-1-neg95.1%

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

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

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

    if -7.2e-94 < t < -9.5999999999999998e-120 or -3.7000000000000002e-147 < t < 1.15999999999999998e-265

    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 100.0%

      \[\leadsto \color{blue}{t \cdot \left(y - z\right) + x \cdot \left(1 + -1 \cdot \left(y - z\right)\right)} \]
    4. Step-by-step derivation
      1. +-commutative100.0%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-1 \cdot \left(y - z\right) + 1\right)} \]
      2. mul-1-neg100.0%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right) \]
      3. neg-sub0100.0%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(0 - \left(y - z\right)\right)} + 1\right) \]
      4. associate-+l-100.0%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(0 - \left(\left(y - z\right) - 1\right)\right)} \]
      5. associate--r+100.0%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \color{blue}{\left(y - \left(z + 1\right)\right)}\right) \]
      6. +-commutative100.0%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \left(y - \color{blue}{\left(1 + z\right)}\right)\right) \]
      7. neg-sub0100.0%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-\left(y - \left(1 + z\right)\right)\right)} \]
      8. distribute-rgt-neg-in100.0%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{\left(-x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      9. mul-1-neg100.0%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{-1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      10. fma-def100.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, y - z, -1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)\right)} \]
      11. mul-1-neg100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{-x \cdot \left(y - \left(1 + z\right)\right)}\right) \]
      12. distribute-rgt-neg-in100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{x \cdot \left(-\left(y - \left(1 + z\right)\right)\right)}\right) \]
      13. neg-sub0100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(0 - \left(y - \left(1 + z\right)\right)\right)}\right) \]
      14. +-commutative100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \left(y - \color{blue}{\left(z + 1\right)}\right)\right)\right) \]
      15. associate--r+100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \color{blue}{\left(\left(y - z\right) - 1\right)}\right)\right) \]
      16. associate-+l-100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(\left(0 - \left(y - z\right)\right) + 1\right)}\right) \]
      17. neg-sub0100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right)\right) \]
      18. mul-1-neg100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{-1 \cdot \left(y - z\right)} + 1\right)\right) \]
      19. +-commutative100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(1 + -1 \cdot \left(y - z\right)\right)}\right) \]
      20. mul-1-neg100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(1 + \color{blue}{\left(-\left(y - z\right)\right)}\right)\right) \]
    5. Simplified100.0%

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

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

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

    if -9.5999999999999998e-120 < t < -8.8000000000000003e-133

    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 76.3%

      \[\leadsto x + \color{blue}{y \cdot \left(t - x\right)} \]
    4. Step-by-step derivation
      1. *-commutative76.3%

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

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

      \[\leadsto x + \color{blue}{t \cdot y} \]
    7. Step-by-step derivation
      1. *-commutative75.2%

        \[\leadsto x + \color{blue}{y \cdot t} \]
    8. Simplified75.2%

      \[\leadsto x + \color{blue}{y \cdot t} \]
    9. Taylor expanded in x around 0 75.2%

      \[\leadsto \color{blue}{t \cdot y} \]
    10. Step-by-step derivation
      1. *-commutative75.2%

        \[\leadsto \color{blue}{y \cdot t} \]
    11. Simplified75.2%

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

    if -8.8000000000000003e-133 < 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 y around inf 76.5%

      \[\leadsto x + \color{blue}{y \cdot \left(t - x\right)} \]
    4. Step-by-step derivation
      1. *-commutative76.5%

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

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

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

    if 1.15999999999999998e-265 < t < 3.30000000000000019e-134

    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 99.9%

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

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-1 \cdot \left(y - z\right) + 1\right)} \]
      2. mul-1-neg99.9%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right) \]
      3. neg-sub099.9%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(0 - \left(y - z\right)\right)} + 1\right) \]
      4. associate-+l-99.9%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(0 - \left(\left(y - z\right) - 1\right)\right)} \]
      5. associate--r+99.9%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \color{blue}{\left(y - \left(z + 1\right)\right)}\right) \]
      6. +-commutative99.9%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \left(y - \color{blue}{\left(1 + z\right)}\right)\right) \]
      7. neg-sub099.9%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-\left(y - \left(1 + z\right)\right)\right)} \]
      8. distribute-rgt-neg-in99.9%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{\left(-x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      9. mul-1-neg99.9%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{-1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      10. fma-def100.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, y - z, -1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)\right)} \]
      11. mul-1-neg100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{-x \cdot \left(y - \left(1 + z\right)\right)}\right) \]
      12. distribute-rgt-neg-in100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{x \cdot \left(-\left(y - \left(1 + z\right)\right)\right)}\right) \]
      13. neg-sub0100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(0 - \left(y - \left(1 + z\right)\right)\right)}\right) \]
      14. +-commutative100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \left(y - \color{blue}{\left(z + 1\right)}\right)\right)\right) \]
      15. associate--r+100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \color{blue}{\left(\left(y - z\right) - 1\right)}\right)\right) \]
      16. associate-+l-100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(\left(0 - \left(y - z\right)\right) + 1\right)}\right) \]
      17. neg-sub0100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right)\right) \]
      18. mul-1-neg100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{-1 \cdot \left(y - z\right)} + 1\right)\right) \]
      19. +-commutative100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(1 + -1 \cdot \left(y - z\right)\right)}\right) \]
      20. mul-1-neg100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(1 + \color{blue}{\left(-\left(y - z\right)\right)}\right)\right) \]
    5. Simplified100.0%

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

      \[\leadsto \color{blue}{y \cdot \left(t + -1 \cdot x\right)} \]
    7. Step-by-step derivation
      1. neg-mul-150.9%

        \[\leadsto y \cdot \left(t + \color{blue}{\left(-x\right)}\right) \]
      2. sub-neg50.9%

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

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

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

        \[\leadsto \color{blue}{-x \cdot y} \]
      2. distribute-rgt-neg-in50.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.2 \cdot 10^{-94}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \mathbf{elif}\;t \leq -9.6 \cdot 10^{-120}:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;t \leq -8.8 \cdot 10^{-133}:\\ \;\;\;\;y \cdot t\\ \mathbf{elif}\;t \leq -3.7 \cdot 10^{-147}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.16 \cdot 10^{-265}:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{-134}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 37.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(-t\right)\\ \mathbf{if}\;z \leq -2.25 \cdot 10^{-61}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-129}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{-197}:\\ \;\;\;\;y \cdot t\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-293}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 58000000000:\\ \;\;\;\;y \cdot t\\ \mathbf{elif}\;z \leq 10^{+218}:\\ \;\;\;\;z \cdot x\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* z (- t))))
   (if (<= z -2.25e-61)
     t_1
     (if (<= z -4.8e-129)
       (* y (- x))
       (if (<= z -8.2e-197)
         (* y t)
         (if (<= z 9.5e-293)
           x
           (if (<= z 58000000000.0)
             (* y t)
             (if (<= z 1e+218) (* z x) t_1))))))))
double code(double x, double y, double z, double t) {
	double t_1 = z * -t;
	double tmp;
	if (z <= -2.25e-61) {
		tmp = t_1;
	} else if (z <= -4.8e-129) {
		tmp = y * -x;
	} else if (z <= -8.2e-197) {
		tmp = y * t;
	} else if (z <= 9.5e-293) {
		tmp = x;
	} else if (z <= 58000000000.0) {
		tmp = y * t;
	} else if (z <= 1e+218) {
		tmp = z * x;
	} 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 * -t
    if (z <= (-2.25d-61)) then
        tmp = t_1
    else if (z <= (-4.8d-129)) then
        tmp = y * -x
    else if (z <= (-8.2d-197)) then
        tmp = y * t
    else if (z <= 9.5d-293) then
        tmp = x
    else if (z <= 58000000000.0d0) then
        tmp = y * t
    else if (z <= 1d+218) then
        tmp = z * x
    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 * -t;
	double tmp;
	if (z <= -2.25e-61) {
		tmp = t_1;
	} else if (z <= -4.8e-129) {
		tmp = y * -x;
	} else if (z <= -8.2e-197) {
		tmp = y * t;
	} else if (z <= 9.5e-293) {
		tmp = x;
	} else if (z <= 58000000000.0) {
		tmp = y * t;
	} else if (z <= 1e+218) {
		tmp = z * x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = z * -t
	tmp = 0
	if z <= -2.25e-61:
		tmp = t_1
	elif z <= -4.8e-129:
		tmp = y * -x
	elif z <= -8.2e-197:
		tmp = y * t
	elif z <= 9.5e-293:
		tmp = x
	elif z <= 58000000000.0:
		tmp = y * t
	elif z <= 1e+218:
		tmp = z * x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(z * Float64(-t))
	tmp = 0.0
	if (z <= -2.25e-61)
		tmp = t_1;
	elseif (z <= -4.8e-129)
		tmp = Float64(y * Float64(-x));
	elseif (z <= -8.2e-197)
		tmp = Float64(y * t);
	elseif (z <= 9.5e-293)
		tmp = x;
	elseif (z <= 58000000000.0)
		tmp = Float64(y * t);
	elseif (z <= 1e+218)
		tmp = Float64(z * x);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = z * -t;
	tmp = 0.0;
	if (z <= -2.25e-61)
		tmp = t_1;
	elseif (z <= -4.8e-129)
		tmp = y * -x;
	elseif (z <= -8.2e-197)
		tmp = y * t;
	elseif (z <= 9.5e-293)
		tmp = x;
	elseif (z <= 58000000000.0)
		tmp = y * t;
	elseif (z <= 1e+218)
		tmp = z * x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * (-t)), $MachinePrecision]}, If[LessEqual[z, -2.25e-61], t$95$1, If[LessEqual[z, -4.8e-129], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, -8.2e-197], N[(y * t), $MachinePrecision], If[LessEqual[z, 9.5e-293], x, If[LessEqual[z, 58000000000.0], N[(y * t), $MachinePrecision], If[LessEqual[z, 1e+218], N[(z * x), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := z \cdot \left(-t\right)\\
\mathbf{if}\;z \leq -2.25 \cdot 10^{-61}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -4.8 \cdot 10^{-129}:\\
\;\;\;\;y \cdot \left(-x\right)\\

\mathbf{elif}\;z \leq -8.2 \cdot 10^{-197}:\\
\;\;\;\;y \cdot t\\

\mathbf{elif}\;z \leq 9.5 \cdot 10^{-293}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 58000000000:\\
\;\;\;\;y \cdot t\\

\mathbf{elif}\;z \leq 10^{+218}:\\
\;\;\;\;z \cdot x\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.25e-61 or 1.00000000000000008e218 < z

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{x + -1 \cdot \left(z \cdot \left(t - x\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg86.3%

        \[\leadsto x + \color{blue}{\left(-z \cdot \left(t - x\right)\right)} \]
      2. unsub-neg86.3%

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot t\right) \cdot z} \]
      2. neg-mul-151.9%

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

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

    if -2.25e-61 < z < -4.79999999999999977e-129

    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 94.4%

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

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-1 \cdot \left(y - z\right) + 1\right)} \]
      2. mul-1-neg94.4%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right) \]
      3. neg-sub094.4%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(0 - \left(y - z\right)\right)} + 1\right) \]
      4. associate-+l-94.4%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(0 - \left(\left(y - z\right) - 1\right)\right)} \]
      5. associate--r+94.4%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \color{blue}{\left(y - \left(z + 1\right)\right)}\right) \]
      6. +-commutative94.4%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \left(y - \color{blue}{\left(1 + z\right)}\right)\right) \]
      7. neg-sub094.4%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-\left(y - \left(1 + z\right)\right)\right)} \]
      8. distribute-rgt-neg-in94.4%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{\left(-x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      9. mul-1-neg94.4%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{-1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      10. fma-def100.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, y - z, -1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)\right)} \]
      11. mul-1-neg100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{-x \cdot \left(y - \left(1 + z\right)\right)}\right) \]
      12. distribute-rgt-neg-in100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{x \cdot \left(-\left(y - \left(1 + z\right)\right)\right)}\right) \]
      13. neg-sub0100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(0 - \left(y - \left(1 + z\right)\right)\right)}\right) \]
      14. +-commutative100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \left(y - \color{blue}{\left(z + 1\right)}\right)\right)\right) \]
      15. associate--r+100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \color{blue}{\left(\left(y - z\right) - 1\right)}\right)\right) \]
      16. associate-+l-100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(\left(0 - \left(y - z\right)\right) + 1\right)}\right) \]
      17. neg-sub0100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right)\right) \]
      18. mul-1-neg100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{-1 \cdot \left(y - z\right)} + 1\right)\right) \]
      19. +-commutative100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(1 + -1 \cdot \left(y - z\right)\right)}\right) \]
      20. mul-1-neg100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(1 + \color{blue}{\left(-\left(y - z\right)\right)}\right)\right) \]
    5. Simplified100.0%

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

      \[\leadsto \color{blue}{y \cdot \left(t + -1 \cdot x\right)} \]
    7. Step-by-step derivation
      1. neg-mul-162.3%

        \[\leadsto y \cdot \left(t + \color{blue}{\left(-x\right)}\right) \]
      2. sub-neg62.3%

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot y\right)} \]
    10. Step-by-step derivation
      1. mul-1-neg46.3%

        \[\leadsto \color{blue}{-x \cdot y} \]
      2. distribute-rgt-neg-in46.3%

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

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

    if -4.79999999999999977e-129 < z < -8.2e-197 or 9.50000000000000049e-293 < z < 5.8e10

    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 89.9%

      \[\leadsto x + \color{blue}{y \cdot \left(t - x\right)} \]
    4. Step-by-step derivation
      1. *-commutative89.9%

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

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

      \[\leadsto x + \color{blue}{t \cdot y} \]
    7. Step-by-step derivation
      1. *-commutative70.4%

        \[\leadsto x + \color{blue}{y \cdot t} \]
    8. Simplified70.4%

      \[\leadsto x + \color{blue}{y \cdot t} \]
    9. Taylor expanded in x around 0 49.7%

      \[\leadsto \color{blue}{t \cdot y} \]
    10. Step-by-step derivation
      1. *-commutative49.7%

        \[\leadsto \color{blue}{y \cdot t} \]
    11. Simplified49.7%

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

    if -8.2e-197 < z < 9.50000000000000049e-293

    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 100.0%

      \[\leadsto x + \color{blue}{y \cdot \left(t - x\right)} \]
    4. Step-by-step derivation
      1. *-commutative100.0%

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

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

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

    if 5.8e10 < z < 1.00000000000000008e218

    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 94.1%

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

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-1 \cdot \left(y - z\right) + 1\right)} \]
      2. mul-1-neg94.1%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right) \]
      3. neg-sub094.1%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(0 - \left(y - z\right)\right)} + 1\right) \]
      4. associate-+l-94.1%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(0 - \left(\left(y - z\right) - 1\right)\right)} \]
      5. associate--r+94.1%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \color{blue}{\left(y - \left(z + 1\right)\right)}\right) \]
      6. +-commutative94.1%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \left(y - \color{blue}{\left(1 + z\right)}\right)\right) \]
      7. neg-sub094.1%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-\left(y - \left(1 + z\right)\right)\right)} \]
      8. distribute-rgt-neg-in94.1%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{\left(-x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      9. mul-1-neg94.1%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{-1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      10. fma-def98.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, y - z, -1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)\right)} \]
      11. mul-1-neg98.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{-x \cdot \left(y - \left(1 + z\right)\right)}\right) \]
      12. distribute-rgt-neg-in98.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{x \cdot \left(-\left(y - \left(1 + z\right)\right)\right)}\right) \]
      13. neg-sub098.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(0 - \left(y - \left(1 + z\right)\right)\right)}\right) \]
      14. +-commutative98.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \left(y - \color{blue}{\left(z + 1\right)}\right)\right)\right) \]
      15. associate--r+98.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \color{blue}{\left(\left(y - z\right) - 1\right)}\right)\right) \]
      16. associate-+l-98.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(\left(0 - \left(y - z\right)\right) + 1\right)}\right) \]
      17. neg-sub098.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right)\right) \]
      18. mul-1-neg98.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{-1 \cdot \left(y - z\right)} + 1\right)\right) \]
      19. +-commutative98.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(1 + -1 \cdot \left(y - z\right)\right)}\right) \]
      20. mul-1-neg98.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(1 + \color{blue}{\left(-\left(y - z\right)\right)}\right)\right) \]
    5. Simplified98.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.25 \cdot 10^{-61}:\\ \;\;\;\;z \cdot \left(-t\right)\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-129}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{-197}:\\ \;\;\;\;y \cdot t\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-293}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 58000000000:\\ \;\;\;\;y \cdot t\\ \mathbf{elif}\;z \leq 10^{+218}:\\ \;\;\;\;z \cdot x\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 67.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(t - x\right)\\ t_2 := x \cdot \left(z + 1\right)\\ \mathbf{if}\;y \leq -0.00024:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 6 \cdot 10^{-131}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{-53}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \mathbf{elif}\;y \leq 0.0126:\\ \;\;\;\;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 (* x (+ z 1.0))))
   (if (<= y -0.00024)
     t_1
     (if (<= y 6e-131)
       t_2
       (if (<= y 7.5e-53) (* (- y z) t) (if (<= y 0.0126) t_2 t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = y * (t - x);
	double t_2 = x * (z + 1.0);
	double tmp;
	if (y <= -0.00024) {
		tmp = t_1;
	} else if (y <= 6e-131) {
		tmp = t_2;
	} else if (y <= 7.5e-53) {
		tmp = (y - z) * t;
	} else if (y <= 0.0126) {
		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 = x * (z + 1.0d0)
    if (y <= (-0.00024d0)) then
        tmp = t_1
    else if (y <= 6d-131) then
        tmp = t_2
    else if (y <= 7.5d-53) then
        tmp = (y - z) * t
    else if (y <= 0.0126d0) 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 = x * (z + 1.0);
	double tmp;
	if (y <= -0.00024) {
		tmp = t_1;
	} else if (y <= 6e-131) {
		tmp = t_2;
	} else if (y <= 7.5e-53) {
		tmp = (y - z) * t;
	} else if (y <= 0.0126) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = y * (t - x)
	t_2 = x * (z + 1.0)
	tmp = 0
	if y <= -0.00024:
		tmp = t_1
	elif y <= 6e-131:
		tmp = t_2
	elif y <= 7.5e-53:
		tmp = (y - z) * t
	elif y <= 0.0126:
		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(x * Float64(z + 1.0))
	tmp = 0.0
	if (y <= -0.00024)
		tmp = t_1;
	elseif (y <= 6e-131)
		tmp = t_2;
	elseif (y <= 7.5e-53)
		tmp = Float64(Float64(y - z) * t);
	elseif (y <= 0.0126)
		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 = x * (z + 1.0);
	tmp = 0.0;
	if (y <= -0.00024)
		tmp = t_1;
	elseif (y <= 6e-131)
		tmp = t_2;
	elseif (y <= 7.5e-53)
		tmp = (y - z) * t;
	elseif (y <= 0.0126)
		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[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -0.00024], t$95$1, If[LessEqual[y, 6e-131], t$95$2, If[LessEqual[y, 7.5e-53], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, 0.0126], t$95$2, t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 6 \cdot 10^{-131}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 7.5 \cdot 10^{-53}:\\
\;\;\;\;\left(y - z\right) \cdot t\\

\mathbf{elif}\;y \leq 0.0126:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.40000000000000006e-4 or 0.0126 < y

    1. Initial program 100.0%

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

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

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-1 \cdot \left(y - z\right) + 1\right)} \]
      2. mul-1-neg93.4%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right) \]
      3. neg-sub093.4%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(0 - \left(y - z\right)\right)} + 1\right) \]
      4. associate-+l-93.4%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(0 - \left(\left(y - z\right) - 1\right)\right)} \]
      5. associate--r+93.4%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \color{blue}{\left(y - \left(z + 1\right)\right)}\right) \]
      6. +-commutative93.4%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \left(y - \color{blue}{\left(1 + z\right)}\right)\right) \]
      7. neg-sub093.4%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-\left(y - \left(1 + z\right)\right)\right)} \]
      8. distribute-rgt-neg-in93.4%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{\left(-x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      9. mul-1-neg93.4%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{-1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      10. fma-def97.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, y - z, -1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)\right)} \]
      11. mul-1-neg97.1%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{-x \cdot \left(y - \left(1 + z\right)\right)}\right) \]
      12. distribute-rgt-neg-in97.1%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{x \cdot \left(-\left(y - \left(1 + z\right)\right)\right)}\right) \]
      13. neg-sub097.1%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(0 - \left(y - \left(1 + z\right)\right)\right)}\right) \]
      14. +-commutative97.1%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \left(y - \color{blue}{\left(z + 1\right)}\right)\right)\right) \]
      15. associate--r+97.1%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \color{blue}{\left(\left(y - z\right) - 1\right)}\right)\right) \]
      16. associate-+l-97.1%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(\left(0 - \left(y - z\right)\right) + 1\right)}\right) \]
      17. neg-sub097.1%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right)\right) \]
      18. mul-1-neg97.1%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{-1 \cdot \left(y - z\right)} + 1\right)\right) \]
      19. +-commutative97.1%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(1 + -1 \cdot \left(y - z\right)\right)}\right) \]
      20. mul-1-neg97.1%

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

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

      \[\leadsto \color{blue}{y \cdot \left(t + -1 \cdot x\right)} \]
    7. Step-by-step derivation
      1. neg-mul-176.1%

        \[\leadsto y \cdot \left(t + \color{blue}{\left(-x\right)}\right) \]
      2. sub-neg76.1%

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

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

    if -2.40000000000000006e-4 < y < 5.99999999999999992e-131 or 7.5000000000000001e-53 < y < 0.0126

    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 65.5%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \left(y - z\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg65.5%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\left(y - z\right)\right)}\right) \]
      2. unsub-neg65.5%

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(z + 1\right)} \]
    8. Simplified64.6%

      \[\leadsto \color{blue}{x \cdot \left(z + 1\right)} \]

    if 5.99999999999999992e-131 < y < 7.5000000000000001e-53

    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 99.9%

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

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-1 \cdot \left(y - z\right) + 1\right)} \]
      2. mul-1-neg99.9%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right) \]
      3. neg-sub099.9%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(0 - \left(y - z\right)\right)} + 1\right) \]
      4. associate-+l-99.9%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(0 - \left(\left(y - z\right) - 1\right)\right)} \]
      5. associate--r+99.9%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \color{blue}{\left(y - \left(z + 1\right)\right)}\right) \]
      6. +-commutative99.9%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \left(y - \color{blue}{\left(1 + z\right)}\right)\right) \]
      7. neg-sub099.9%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-\left(y - \left(1 + z\right)\right)\right)} \]
      8. distribute-rgt-neg-in99.9%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{\left(-x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      9. mul-1-neg99.9%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{-1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      10. fma-def100.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, y - z, -1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)\right)} \]
      11. mul-1-neg100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{-x \cdot \left(y - \left(1 + z\right)\right)}\right) \]
      12. distribute-rgt-neg-in100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{x \cdot \left(-\left(y - \left(1 + z\right)\right)\right)}\right) \]
      13. neg-sub0100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(0 - \left(y - \left(1 + z\right)\right)\right)}\right) \]
      14. +-commutative100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \left(y - \color{blue}{\left(z + 1\right)}\right)\right)\right) \]
      15. associate--r+100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \color{blue}{\left(\left(y - z\right) - 1\right)}\right)\right) \]
      16. associate-+l-100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(\left(0 - \left(y - z\right)\right) + 1\right)}\right) \]
      17. neg-sub0100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right)\right) \]
      18. mul-1-neg100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{-1 \cdot \left(y - z\right)} + 1\right)\right) \]
      19. +-commutative100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(1 + -1 \cdot \left(y - z\right)\right)}\right) \]
      20. mul-1-neg100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(1 + \color{blue}{\left(-\left(y - z\right)\right)}\right)\right) \]
    5. Simplified100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -0.00024:\\ \;\;\;\;y \cdot \left(t - x\right)\\ \mathbf{elif}\;y \leq 6 \cdot 10^{-131}:\\ \;\;\;\;x \cdot \left(z + 1\right)\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{-53}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \mathbf{elif}\;y \leq 0.0126:\\ \;\;\;\;x \cdot \left(z + 1\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(t - x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 71.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(x - t\right)\\ \mathbf{if}\;z \leq -620000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.35 \cdot 10^{-144}:\\ \;\;\;\;x \cdot \left(1 - y\right)\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-58}:\\ \;\;\;\;x + y \cdot t\\ \mathbf{elif}\;z \leq 450000000000:\\ \;\;\;\;y \cdot \left(t - x\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* z (- x t))))
   (if (<= z -620000000.0)
     t_1
     (if (<= z -1.35e-144)
       (* x (- 1.0 y))
       (if (<= z 7.5e-58)
         (+ x (* y t))
         (if (<= z 450000000000.0) (* y (- t x)) t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = z * (x - t);
	double tmp;
	if (z <= -620000000.0) {
		tmp = t_1;
	} else if (z <= -1.35e-144) {
		tmp = x * (1.0 - y);
	} else if (z <= 7.5e-58) {
		tmp = x + (y * t);
	} else if (z <= 450000000000.0) {
		tmp = y * (t - x);
	} 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 <= (-620000000.0d0)) then
        tmp = t_1
    else if (z <= (-1.35d-144)) then
        tmp = x * (1.0d0 - y)
    else if (z <= 7.5d-58) then
        tmp = x + (y * t)
    else if (z <= 450000000000.0d0) then
        tmp = y * (t - x)
    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 <= -620000000.0) {
		tmp = t_1;
	} else if (z <= -1.35e-144) {
		tmp = x * (1.0 - y);
	} else if (z <= 7.5e-58) {
		tmp = x + (y * t);
	} else if (z <= 450000000000.0) {
		tmp = y * (t - x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = z * (x - t)
	tmp = 0
	if z <= -620000000.0:
		tmp = t_1
	elif z <= -1.35e-144:
		tmp = x * (1.0 - y)
	elif z <= 7.5e-58:
		tmp = x + (y * t)
	elif z <= 450000000000.0:
		tmp = y * (t - x)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(z * Float64(x - t))
	tmp = 0.0
	if (z <= -620000000.0)
		tmp = t_1;
	elseif (z <= -1.35e-144)
		tmp = Float64(x * Float64(1.0 - y));
	elseif (z <= 7.5e-58)
		tmp = Float64(x + Float64(y * t));
	elseif (z <= 450000000000.0)
		tmp = Float64(y * Float64(t - x));
	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 <= -620000000.0)
		tmp = t_1;
	elseif (z <= -1.35e-144)
		tmp = x * (1.0 - y);
	elseif (z <= 7.5e-58)
		tmp = x + (y * t);
	elseif (z <= 450000000000.0)
		tmp = y * (t - x);
	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, -620000000.0], t$95$1, If[LessEqual[z, -1.35e-144], N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e-58], N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 450000000000.0], N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;z \leq 450000000000:\\
\;\;\;\;y \cdot \left(t - x\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.2e8 or 4.5e11 < z

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{t \cdot \left(y - z\right) + x \cdot \left(1 + -1 \cdot \left(y - z\right)\right)} \]
    4. Step-by-step derivation
      1. +-commutative91.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-1 \cdot \left(y - z\right) + 1\right)} \]
      2. mul-1-neg91.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right) \]
      3. neg-sub091.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(0 - \left(y - z\right)\right)} + 1\right) \]
      4. associate-+l-91.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(0 - \left(\left(y - z\right) - 1\right)\right)} \]
      5. associate--r+91.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \color{blue}{\left(y - \left(z + 1\right)\right)}\right) \]
      6. +-commutative91.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \left(y - \color{blue}{\left(1 + z\right)}\right)\right) \]
      7. neg-sub091.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-\left(y - \left(1 + z\right)\right)\right)} \]
      8. distribute-rgt-neg-in91.3%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{\left(-x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      9. mul-1-neg91.3%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{-1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      10. fma-def94.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, y - z, -1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)\right)} \]
      11. mul-1-neg94.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{-x \cdot \left(y - \left(1 + z\right)\right)}\right) \]
      12. distribute-rgt-neg-in94.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{x \cdot \left(-\left(y - \left(1 + z\right)\right)\right)}\right) \]
      13. neg-sub094.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(0 - \left(y - \left(1 + z\right)\right)\right)}\right) \]
      14. +-commutative94.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \left(y - \color{blue}{\left(z + 1\right)}\right)\right)\right) \]
      15. associate--r+94.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \color{blue}{\left(\left(y - z\right) - 1\right)}\right)\right) \]
      16. associate-+l-94.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(\left(0 - \left(y - z\right)\right) + 1\right)}\right) \]
      17. neg-sub094.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right)\right) \]
      18. mul-1-neg94.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{-1 \cdot \left(y - z\right)} + 1\right)\right) \]
      19. +-commutative94.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(1 + -1 \cdot \left(y - z\right)\right)}\right) \]
      20. mul-1-neg94.5%

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

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

      \[\leadsto \color{blue}{z \cdot \left(x + -1 \cdot t\right)} \]
    7. Step-by-step derivation
      1. neg-mul-183.6%

        \[\leadsto z \cdot \left(x + \color{blue}{\left(-t\right)}\right) \]
      2. sub-neg83.6%

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

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

    if -6.2e8 < z < -1.34999999999999988e-144

    1. Initial program 99.9%

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

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\left(y - z\right)\right)}\right) \]
      2. unsub-neg72.4%

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

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

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

    if -1.34999999999999988e-144 < z < 7.50000000000000002e-58

    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 94.8%

      \[\leadsto x + \color{blue}{y \cdot \left(t - x\right)} \]
    4. Step-by-step derivation
      1. *-commutative94.8%

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

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

      \[\leadsto x + \color{blue}{t \cdot y} \]
    7. Step-by-step derivation
      1. *-commutative76.6%

        \[\leadsto x + \color{blue}{y \cdot t} \]
    8. Simplified76.6%

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

    if 7.50000000000000002e-58 < z < 4.5e11

    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 95.5%

      \[\leadsto \color{blue}{t \cdot \left(y - z\right) + x \cdot \left(1 + -1 \cdot \left(y - z\right)\right)} \]
    4. Step-by-step derivation
      1. +-commutative95.5%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-1 \cdot \left(y - z\right) + 1\right)} \]
      2. mul-1-neg95.5%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right) \]
      3. neg-sub095.5%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(0 - \left(y - z\right)\right)} + 1\right) \]
      4. associate-+l-95.5%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(0 - \left(\left(y - z\right) - 1\right)\right)} \]
      5. associate--r+95.5%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \color{blue}{\left(y - \left(z + 1\right)\right)}\right) \]
      6. +-commutative95.5%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \left(y - \color{blue}{\left(1 + z\right)}\right)\right) \]
      7. neg-sub095.5%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-\left(y - \left(1 + z\right)\right)\right)} \]
      8. distribute-rgt-neg-in95.5%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{\left(-x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      9. mul-1-neg95.5%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{-1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      10. fma-def100.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, y - z, -1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)\right)} \]
      11. mul-1-neg100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{-x \cdot \left(y - \left(1 + z\right)\right)}\right) \]
      12. distribute-rgt-neg-in100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{x \cdot \left(-\left(y - \left(1 + z\right)\right)\right)}\right) \]
      13. neg-sub0100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(0 - \left(y - \left(1 + z\right)\right)\right)}\right) \]
      14. +-commutative100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \left(y - \color{blue}{\left(z + 1\right)}\right)\right)\right) \]
      15. associate--r+100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \color{blue}{\left(\left(y - z\right) - 1\right)}\right)\right) \]
      16. associate-+l-100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(\left(0 - \left(y - z\right)\right) + 1\right)}\right) \]
      17. neg-sub0100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right)\right) \]
      18. mul-1-neg100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{-1 \cdot \left(y - z\right)} + 1\right)\right) \]
      19. +-commutative100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(1 + -1 \cdot \left(y - z\right)\right)}\right) \]
      20. mul-1-neg100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(1 + \color{blue}{\left(-\left(y - z\right)\right)}\right)\right) \]
    5. Simplified100.0%

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

      \[\leadsto \color{blue}{y \cdot \left(t + -1 \cdot x\right)} \]
    7. Step-by-step derivation
      1. neg-mul-173.2%

        \[\leadsto y \cdot \left(t + \color{blue}{\left(-x\right)}\right) \]
      2. sub-neg73.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -620000000:\\ \;\;\;\;z \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq -1.35 \cdot 10^{-144}:\\ \;\;\;\;x \cdot \left(1 - y\right)\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-58}:\\ \;\;\;\;x + y \cdot t\\ \mathbf{elif}\;z \leq 450000000000:\\ \;\;\;\;y \cdot \left(t - x\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(x - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 69.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(x - t\right)\\ \mathbf{if}\;z \leq -50000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-293}:\\ \;\;\;\;x \cdot \left(1 - y\right)\\ \mathbf{elif}\;z \leq 200000000000:\\ \;\;\;\;y \cdot \left(t - x\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* z (- x t))))
   (if (<= z -50000000.0)
     t_1
     (if (<= z 3.2e-293)
       (* x (- 1.0 y))
       (if (<= z 200000000000.0) (* y (- t x)) t_1)))))
double code(double x, double y, double z, double t) {
	double t_1 = z * (x - t);
	double tmp;
	if (z <= -50000000.0) {
		tmp = t_1;
	} else if (z <= 3.2e-293) {
		tmp = x * (1.0 - y);
	} else if (z <= 200000000000.0) {
		tmp = y * (t - x);
	} 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 <= (-50000000.0d0)) then
        tmp = t_1
    else if (z <= 3.2d-293) then
        tmp = x * (1.0d0 - y)
    else if (z <= 200000000000.0d0) then
        tmp = y * (t - x)
    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 <= -50000000.0) {
		tmp = t_1;
	} else if (z <= 3.2e-293) {
		tmp = x * (1.0 - y);
	} else if (z <= 200000000000.0) {
		tmp = y * (t - x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = z * (x - t)
	tmp = 0
	if z <= -50000000.0:
		tmp = t_1
	elif z <= 3.2e-293:
		tmp = x * (1.0 - y)
	elif z <= 200000000000.0:
		tmp = y * (t - x)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(z * Float64(x - t))
	tmp = 0.0
	if (z <= -50000000.0)
		tmp = t_1;
	elseif (z <= 3.2e-293)
		tmp = Float64(x * Float64(1.0 - y));
	elseif (z <= 200000000000.0)
		tmp = Float64(y * Float64(t - x));
	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 <= -50000000.0)
		tmp = t_1;
	elseif (z <= 3.2e-293)
		tmp = x * (1.0 - y);
	elseif (z <= 200000000000.0)
		tmp = y * (t - x);
	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, -50000000.0], t$95$1, If[LessEqual[z, 3.2e-293], N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 200000000000.0], N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 200000000000:\\
\;\;\;\;y \cdot \left(t - x\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5e7 or 2e11 < z

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{t \cdot \left(y - z\right) + x \cdot \left(1 + -1 \cdot \left(y - z\right)\right)} \]
    4. Step-by-step derivation
      1. +-commutative91.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-1 \cdot \left(y - z\right) + 1\right)} \]
      2. mul-1-neg91.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right) \]
      3. neg-sub091.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(0 - \left(y - z\right)\right)} + 1\right) \]
      4. associate-+l-91.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(0 - \left(\left(y - z\right) - 1\right)\right)} \]
      5. associate--r+91.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \color{blue}{\left(y - \left(z + 1\right)\right)}\right) \]
      6. +-commutative91.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \left(y - \color{blue}{\left(1 + z\right)}\right)\right) \]
      7. neg-sub091.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-\left(y - \left(1 + z\right)\right)\right)} \]
      8. distribute-rgt-neg-in91.3%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{\left(-x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      9. mul-1-neg91.3%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{-1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      10. fma-def94.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, y - z, -1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)\right)} \]
      11. mul-1-neg94.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{-x \cdot \left(y - \left(1 + z\right)\right)}\right) \]
      12. distribute-rgt-neg-in94.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{x \cdot \left(-\left(y - \left(1 + z\right)\right)\right)}\right) \]
      13. neg-sub094.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(0 - \left(y - \left(1 + z\right)\right)\right)}\right) \]
      14. +-commutative94.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \left(y - \color{blue}{\left(z + 1\right)}\right)\right)\right) \]
      15. associate--r+94.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \color{blue}{\left(\left(y - z\right) - 1\right)}\right)\right) \]
      16. associate-+l-94.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(\left(0 - \left(y - z\right)\right) + 1\right)}\right) \]
      17. neg-sub094.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right)\right) \]
      18. mul-1-neg94.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{-1 \cdot \left(y - z\right)} + 1\right)\right) \]
      19. +-commutative94.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(1 + -1 \cdot \left(y - z\right)\right)}\right) \]
      20. mul-1-neg94.5%

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

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

      \[\leadsto \color{blue}{z \cdot \left(x + -1 \cdot t\right)} \]
    7. Step-by-step derivation
      1. neg-mul-183.6%

        \[\leadsto z \cdot \left(x + \color{blue}{\left(-t\right)}\right) \]
      2. sub-neg83.6%

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

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

    if -5e7 < z < 3.20000000000000005e-293

    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 70.0%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \left(y - z\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg70.0%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\left(y - z\right)\right)}\right) \]
      2. unsub-neg70.0%

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

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

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

    if 3.20000000000000005e-293 < z < 2e11

    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 95.3%

      \[\leadsto \color{blue}{t \cdot \left(y - z\right) + x \cdot \left(1 + -1 \cdot \left(y - z\right)\right)} \]
    4. Step-by-step derivation
      1. +-commutative95.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-1 \cdot \left(y - z\right) + 1\right)} \]
      2. mul-1-neg95.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right) \]
      3. neg-sub095.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(0 - \left(y - z\right)\right)} + 1\right) \]
      4. associate-+l-95.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(0 - \left(\left(y - z\right) - 1\right)\right)} \]
      5. associate--r+95.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \color{blue}{\left(y - \left(z + 1\right)\right)}\right) \]
      6. +-commutative95.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \left(y - \color{blue}{\left(1 + z\right)}\right)\right) \]
      7. neg-sub095.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-\left(y - \left(1 + z\right)\right)\right)} \]
      8. distribute-rgt-neg-in95.3%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{\left(-x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      9. mul-1-neg95.3%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{-1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      10. fma-def100.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, y - z, -1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)\right)} \]
      11. mul-1-neg100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{-x \cdot \left(y - \left(1 + z\right)\right)}\right) \]
      12. distribute-rgt-neg-in100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{x \cdot \left(-\left(y - \left(1 + z\right)\right)\right)}\right) \]
      13. neg-sub0100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(0 - \left(y - \left(1 + z\right)\right)\right)}\right) \]
      14. +-commutative100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \left(y - \color{blue}{\left(z + 1\right)}\right)\right)\right) \]
      15. associate--r+100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \color{blue}{\left(\left(y - z\right) - 1\right)}\right)\right) \]
      16. associate-+l-100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(\left(0 - \left(y - z\right)\right) + 1\right)}\right) \]
      17. neg-sub0100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right)\right) \]
      18. mul-1-neg100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{-1 \cdot \left(y - z\right)} + 1\right)\right) \]
      19. +-commutative100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(1 + -1 \cdot \left(y - z\right)\right)}\right) \]
      20. mul-1-neg100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(1 + \color{blue}{\left(-\left(y - z\right)\right)}\right)\right) \]
    5. Simplified100.0%

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

      \[\leadsto \color{blue}{y \cdot \left(t + -1 \cdot x\right)} \]
    7. Step-by-step derivation
      1. neg-mul-168.3%

        \[\leadsto y \cdot \left(t + \color{blue}{\left(-x\right)}\right) \]
      2. sub-neg68.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -50000000:\\ \;\;\;\;z \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-293}:\\ \;\;\;\;x \cdot \left(1 - y\right)\\ \mathbf{elif}\;z \leq 200000000000:\\ \;\;\;\;y \cdot \left(t - x\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(x - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 76.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -70000000000000 \lor \neg \left(t \leq 1.7 \cdot 10^{+46}\right):\\ \;\;\;\;\left(y - z\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= t -70000000000000.0) (not (<= t 1.7e+46)))
   (* (- y z) t)
   (* x (+ (- z y) 1.0))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((t <= -70000000000000.0) || !(t <= 1.7e+46)) {
		tmp = (y - z) * t;
	} else {
		tmp = x * ((z - y) + 1.0);
	}
	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 ((t <= (-70000000000000.0d0)) .or. (.not. (t <= 1.7d+46))) then
        tmp = (y - z) * t
    else
        tmp = x * ((z - y) + 1.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((t <= -70000000000000.0) || !(t <= 1.7e+46)) {
		tmp = (y - z) * t;
	} else {
		tmp = x * ((z - y) + 1.0);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (t <= -70000000000000.0) or not (t <= 1.7e+46):
		tmp = (y - z) * t
	else:
		tmp = x * ((z - y) + 1.0)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((t <= -70000000000000.0) || !(t <= 1.7e+46))
		tmp = Float64(Float64(y - z) * t);
	else
		tmp = Float64(x * Float64(Float64(z - y) + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((t <= -70000000000000.0) || ~((t <= 1.7e+46)))
		tmp = (y - z) * t;
	else
		tmp = x * ((z - y) + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -70000000000000.0], N[Not[LessEqual[t, 1.7e+46]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], N[(x * N[(N[(z - y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -70000000000000 \lor \neg \left(t \leq 1.7 \cdot 10^{+46}\right):\\
\;\;\;\;\left(y - z\right) \cdot t\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7e13 or 1.6999999999999999e46 < 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 85.9%

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

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-1 \cdot \left(y - z\right) + 1\right)} \]
      2. mul-1-neg85.9%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right) \]
      3. neg-sub085.9%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(0 - \left(y - z\right)\right)} + 1\right) \]
      4. associate-+l-85.9%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(0 - \left(\left(y - z\right) - 1\right)\right)} \]
      5. associate--r+85.9%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \color{blue}{\left(y - \left(z + 1\right)\right)}\right) \]
      6. +-commutative85.9%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \left(y - \color{blue}{\left(1 + z\right)}\right)\right) \]
      7. neg-sub085.9%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-\left(y - \left(1 + z\right)\right)\right)} \]
      8. distribute-rgt-neg-in85.9%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{\left(-x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      9. mul-1-neg85.9%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{-1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      10. fma-def92.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, y - z, -1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)\right)} \]
      11. mul-1-neg92.9%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{-x \cdot \left(y - \left(1 + z\right)\right)}\right) \]
      12. distribute-rgt-neg-in92.9%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{x \cdot \left(-\left(y - \left(1 + z\right)\right)\right)}\right) \]
      13. neg-sub092.9%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(0 - \left(y - \left(1 + z\right)\right)\right)}\right) \]
      14. +-commutative92.9%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \left(y - \color{blue}{\left(z + 1\right)}\right)\right)\right) \]
      15. associate--r+92.9%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \color{blue}{\left(\left(y - z\right) - 1\right)}\right)\right) \]
      16. associate-+l-92.9%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(\left(0 - \left(y - z\right)\right) + 1\right)}\right) \]
      17. neg-sub092.9%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right)\right) \]
      18. mul-1-neg92.9%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{-1 \cdot \left(y - z\right)} + 1\right)\right) \]
      19. +-commutative92.9%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(1 + -1 \cdot \left(y - z\right)\right)}\right) \]
      20. mul-1-neg92.9%

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

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

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

    if -7e13 < t < 1.6999999999999999e46

    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 78.9%

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\left(y - z\right)\right)}\right) \]
      2. unsub-neg78.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -70000000000000 \lor \neg \left(t \leq 1.7 \cdot 10^{+46}\right):\\ \;\;\;\;\left(y - z\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 81.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.35 \cdot 10^{+16} \lor \neg \left(t \leq 6.8 \cdot 10^{-13}\right):\\ \;\;\;\;x + \left(y - z\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= t -1.35e+16) (not (<= t 6.8e-13)))
   (+ x (* (- y z) t))
   (* x (+ (- z y) 1.0))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((t <= -1.35e+16) || !(t <= 6.8e-13)) {
		tmp = x + ((y - z) * t);
	} else {
		tmp = x * ((z - y) + 1.0);
	}
	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 ((t <= (-1.35d+16)) .or. (.not. (t <= 6.8d-13))) then
        tmp = x + ((y - z) * t)
    else
        tmp = x * ((z - y) + 1.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((t <= -1.35e+16) || !(t <= 6.8e-13)) {
		tmp = x + ((y - z) * t);
	} else {
		tmp = x * ((z - y) + 1.0);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (t <= -1.35e+16) or not (t <= 6.8e-13):
		tmp = x + ((y - z) * t)
	else:
		tmp = x * ((z - y) + 1.0)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((t <= -1.35e+16) || !(t <= 6.8e-13))
		tmp = Float64(x + Float64(Float64(y - z) * t));
	else
		tmp = Float64(x * Float64(Float64(z - y) + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((t <= -1.35e+16) || ~((t <= 6.8e-13)))
		tmp = x + ((y - z) * t);
	else
		tmp = x * ((z - y) + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.35e+16], N[Not[LessEqual[t, 6.8e-13]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(z - y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{+16} \lor \neg \left(t \leq 6.8 \cdot 10^{-13}\right):\\
\;\;\;\;x + \left(y - z\right) \cdot t\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.35e16 or 6.80000000000000031e-13 < t

    1. Initial program 100.0%

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

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

    if -1.35e16 < t < 6.80000000000000031e-13

    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 80.3%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \left(y - z\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg80.3%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\left(y - z\right)\right)}\right) \]
      2. unsub-neg80.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.35 \cdot 10^{+16} \lor \neg \left(t \leq 6.8 \cdot 10^{-13}\right):\\ \;\;\;\;x + \left(y - z\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 84.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -165000000000 \lor \neg \left(z \leq 480000000000\right):\\ \;\;\;\;z \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(t - x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -165000000000.0) (not (<= z 480000000000.0)))
   (* z (- x t))
   (+ x (* y (- t x)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -165000000000.0) || !(z <= 480000000000.0)) {
		tmp = z * (x - t);
	} else {
		tmp = x + (y * (t - x));
	}
	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 <= (-165000000000.0d0)) .or. (.not. (z <= 480000000000.0d0))) then
        tmp = z * (x - t)
    else
        tmp = x + (y * (t - x))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -165000000000.0) || !(z <= 480000000000.0)) {
		tmp = z * (x - t);
	} else {
		tmp = x + (y * (t - x));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -165000000000.0) or not (z <= 480000000000.0):
		tmp = z * (x - t)
	else:
		tmp = x + (y * (t - x))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -165000000000.0) || !(z <= 480000000000.0))
		tmp = Float64(z * Float64(x - t));
	else
		tmp = Float64(x + Float64(y * Float64(t - x)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -165000000000.0) || ~((z <= 480000000000.0)))
		tmp = z * (x - t);
	else
		tmp = x + (y * (t - x));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -165000000000.0], N[Not[LessEqual[z, 480000000000.0]], $MachinePrecision]], N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -165000000000 \lor \neg \left(z \leq 480000000000\right):\\
\;\;\;\;z \cdot \left(x - t\right)\\

\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(t - x\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.65e11 or 4.8e11 < z

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{t \cdot \left(y - z\right) + x \cdot \left(1 + -1 \cdot \left(y - z\right)\right)} \]
    4. Step-by-step derivation
      1. +-commutative91.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-1 \cdot \left(y - z\right) + 1\right)} \]
      2. mul-1-neg91.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right) \]
      3. neg-sub091.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(0 - \left(y - z\right)\right)} + 1\right) \]
      4. associate-+l-91.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(0 - \left(\left(y - z\right) - 1\right)\right)} \]
      5. associate--r+91.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \color{blue}{\left(y - \left(z + 1\right)\right)}\right) \]
      6. +-commutative91.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \left(y - \color{blue}{\left(1 + z\right)}\right)\right) \]
      7. neg-sub091.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-\left(y - \left(1 + z\right)\right)\right)} \]
      8. distribute-rgt-neg-in91.3%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{\left(-x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      9. mul-1-neg91.3%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{-1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      10. fma-def94.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, y - z, -1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)\right)} \]
      11. mul-1-neg94.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{-x \cdot \left(y - \left(1 + z\right)\right)}\right) \]
      12. distribute-rgt-neg-in94.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{x \cdot \left(-\left(y - \left(1 + z\right)\right)\right)}\right) \]
      13. neg-sub094.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(0 - \left(y - \left(1 + z\right)\right)\right)}\right) \]
      14. +-commutative94.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \left(y - \color{blue}{\left(z + 1\right)}\right)\right)\right) \]
      15. associate--r+94.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \color{blue}{\left(\left(y - z\right) - 1\right)}\right)\right) \]
      16. associate-+l-94.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(\left(0 - \left(y - z\right)\right) + 1\right)}\right) \]
      17. neg-sub094.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right)\right) \]
      18. mul-1-neg94.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{-1 \cdot \left(y - z\right)} + 1\right)\right) \]
      19. +-commutative94.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(1 + -1 \cdot \left(y - z\right)\right)}\right) \]
      20. mul-1-neg94.5%

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

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

      \[\leadsto \color{blue}{z \cdot \left(x + -1 \cdot t\right)} \]
    7. Step-by-step derivation
      1. neg-mul-183.6%

        \[\leadsto z \cdot \left(x + \color{blue}{\left(-t\right)}\right) \]
      2. sub-neg83.6%

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

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

    if -1.65e11 < z < 4.8e11

    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 88.8%

      \[\leadsto x + \color{blue}{y \cdot \left(t - x\right)} \]
    4. Step-by-step derivation
      1. *-commutative88.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -165000000000 \lor \neg \left(z \leq 480000000000\right):\\ \;\;\;\;z \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(t - x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 83.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{-61} \lor \neg \left(z \leq 115000000000\right):\\ \;\;\;\;x + z \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(t - x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -4e-61) (not (<= z 115000000000.0)))
   (+ x (* z (- x t)))
   (+ x (* y (- t x)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -4e-61) || !(z <= 115000000000.0)) {
		tmp = x + (z * (x - t));
	} else {
		tmp = x + (y * (t - x));
	}
	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 <= (-4d-61)) .or. (.not. (z <= 115000000000.0d0))) then
        tmp = x + (z * (x - t))
    else
        tmp = x + (y * (t - x))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -4e-61) || !(z <= 115000000000.0)) {
		tmp = x + (z * (x - t));
	} else {
		tmp = x + (y * (t - x));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -4e-61) or not (z <= 115000000000.0):
		tmp = x + (z * (x - t))
	else:
		tmp = x + (y * (t - x))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -4e-61) || !(z <= 115000000000.0))
		tmp = Float64(x + Float64(z * Float64(x - t)));
	else
		tmp = Float64(x + Float64(y * Float64(t - x)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -4e-61) || ~((z <= 115000000000.0)))
		tmp = x + (z * (x - t));
	else
		tmp = x + (y * (t - x));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4e-61], N[Not[LessEqual[z, 115000000000.0]], $MachinePrecision]], N[(x + N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{-61} \lor \neg \left(z \leq 115000000000\right):\\
\;\;\;\;x + z \cdot \left(x - t\right)\\

\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(t - x\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.0000000000000002e-61 or 1.15e11 < z

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{x + -1 \cdot \left(z \cdot \left(t - x\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg82.6%

        \[\leadsto x + \color{blue}{\left(-z \cdot \left(t - x\right)\right)} \]
      2. unsub-neg82.6%

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

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

    if -4.0000000000000002e-61 < z < 1.15e11

    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 91.9%

      \[\leadsto x + \color{blue}{y \cdot \left(t - x\right)} \]
    4. Step-by-step derivation
      1. *-commutative91.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{-61} \lor \neg \left(z \leq 115000000000\right):\\ \;\;\;\;x + z \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(t - x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 37.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+19}:\\
\;\;\;\;z \cdot x\\

\mathbf{elif}\;z \leq 9.5 \cdot 10^{-293}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 62000000000:\\
\;\;\;\;y \cdot t\\

\mathbf{else}:\\
\;\;\;\;z \cdot x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.3e19 or 6.2e10 < z

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{t \cdot \left(y - z\right) + x \cdot \left(1 + -1 \cdot \left(y - z\right)\right)} \]
    4. Step-by-step derivation
      1. +-commutative91.2%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-1 \cdot \left(y - z\right) + 1\right)} \]
      2. mul-1-neg91.2%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right) \]
      3. neg-sub091.2%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(0 - \left(y - z\right)\right)} + 1\right) \]
      4. associate-+l-91.2%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(0 - \left(\left(y - z\right) - 1\right)\right)} \]
      5. associate--r+91.2%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \color{blue}{\left(y - \left(z + 1\right)\right)}\right) \]
      6. +-commutative91.2%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \left(y - \color{blue}{\left(1 + z\right)}\right)\right) \]
      7. neg-sub091.2%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-\left(y - \left(1 + z\right)\right)\right)} \]
      8. distribute-rgt-neg-in91.2%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{\left(-x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      9. mul-1-neg91.2%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{-1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      10. fma-def94.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, y - z, -1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)\right)} \]
      11. mul-1-neg94.4%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{-x \cdot \left(y - \left(1 + z\right)\right)}\right) \]
      12. distribute-rgt-neg-in94.4%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{x \cdot \left(-\left(y - \left(1 + z\right)\right)\right)}\right) \]
      13. neg-sub094.4%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(0 - \left(y - \left(1 + z\right)\right)\right)}\right) \]
      14. +-commutative94.4%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \left(y - \color{blue}{\left(z + 1\right)}\right)\right)\right) \]
      15. associate--r+94.4%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \color{blue}{\left(\left(y - z\right) - 1\right)}\right)\right) \]
      16. associate-+l-94.4%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(\left(0 - \left(y - z\right)\right) + 1\right)}\right) \]
      17. neg-sub094.4%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right)\right) \]
      18. mul-1-neg94.4%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{-1 \cdot \left(y - z\right)} + 1\right)\right) \]
      19. +-commutative94.4%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(1 + -1 \cdot \left(y - z\right)\right)}\right) \]
      20. mul-1-neg94.4%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(1 + \color{blue}{\left(-\left(y - z\right)\right)}\right)\right) \]
    5. Simplified94.4%

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

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

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

    if -2.3e19 < z < 9.50000000000000049e-293

    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 87.3%

      \[\leadsto x + \color{blue}{y \cdot \left(t - x\right)} \]
    4. Step-by-step derivation
      1. *-commutative87.3%

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

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

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

    if 9.50000000000000049e-293 < z < 6.2e10

    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 87.7%

      \[\leadsto x + \color{blue}{y \cdot \left(t - x\right)} \]
    4. Step-by-step derivation
      1. *-commutative87.7%

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

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

      \[\leadsto x + \color{blue}{t \cdot y} \]
    7. Step-by-step derivation
      1. *-commutative67.0%

        \[\leadsto x + \color{blue}{y \cdot t} \]
    8. Simplified67.0%

      \[\leadsto x + \color{blue}{y \cdot t} \]
    9. Taylor expanded in x around 0 48.6%

      \[\leadsto \color{blue}{t \cdot y} \]
    10. Step-by-step derivation
      1. *-commutative48.6%

        \[\leadsto \color{blue}{y \cdot t} \]
    11. Simplified48.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+19}:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-293}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 62000000000:\\ \;\;\;\;y \cdot t\\ \mathbf{else}:\\ \;\;\;\;z \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 37.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.1 \cdot 10^{+65}:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;z \leq -8.8 \cdot 10^{-129}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 800000000:\\ \;\;\;\;y \cdot t\\ \mathbf{else}:\\ \;\;\;\;z \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -4.1e+65)
   (* z x)
   (if (<= z -8.8e-129) (* y (- x)) (if (<= z 800000000.0) (* y t) (* z x)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -4.1e+65) {
		tmp = z * x;
	} else if (z <= -8.8e-129) {
		tmp = y * -x;
	} else if (z <= 800000000.0) {
		tmp = y * t;
	} else {
		tmp = z * x;
	}
	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 <= (-4.1d+65)) then
        tmp = z * x
    else if (z <= (-8.8d-129)) then
        tmp = y * -x
    else if (z <= 800000000.0d0) then
        tmp = y * t
    else
        tmp = z * x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -4.1e+65) {
		tmp = z * x;
	} else if (z <= -8.8e-129) {
		tmp = y * -x;
	} else if (z <= 800000000.0) {
		tmp = y * t;
	} else {
		tmp = z * x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -4.1e+65:
		tmp = z * x
	elif z <= -8.8e-129:
		tmp = y * -x
	elif z <= 800000000.0:
		tmp = y * t
	else:
		tmp = z * x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -4.1e+65)
		tmp = Float64(z * x);
	elseif (z <= -8.8e-129)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 800000000.0)
		tmp = Float64(y * t);
	else
		tmp = Float64(z * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -4.1e+65)
		tmp = z * x;
	elseif (z <= -8.8e-129)
		tmp = y * -x;
	elseif (z <= 800000000.0)
		tmp = y * t;
	else
		tmp = z * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -4.1e+65], N[(z * x), $MachinePrecision], If[LessEqual[z, -8.8e-129], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 800000000.0], N[(y * t), $MachinePrecision], N[(z * x), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.1 \cdot 10^{+65}:\\
\;\;\;\;z \cdot x\\

\mathbf{elif}\;z \leq -8.8 \cdot 10^{-129}:\\
\;\;\;\;y \cdot \left(-x\right)\\

\mathbf{elif}\;z \leq 800000000:\\
\;\;\;\;y \cdot t\\

\mathbf{else}:\\
\;\;\;\;z \cdot x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.1000000000000001e65 or 8e8 < z

    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 90.9%

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

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-1 \cdot \left(y - z\right) + 1\right)} \]
      2. mul-1-neg90.9%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right) \]
      3. neg-sub090.9%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(0 - \left(y - z\right)\right)} + 1\right) \]
      4. associate-+l-90.9%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(0 - \left(\left(y - z\right) - 1\right)\right)} \]
      5. associate--r+90.9%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \color{blue}{\left(y - \left(z + 1\right)\right)}\right) \]
      6. +-commutative90.9%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \left(y - \color{blue}{\left(1 + z\right)}\right)\right) \]
      7. neg-sub090.9%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-\left(y - \left(1 + z\right)\right)\right)} \]
      8. distribute-rgt-neg-in90.9%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{\left(-x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      9. mul-1-neg90.9%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{-1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      10. fma-def94.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, y - z, -1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)\right)} \]
      11. mul-1-neg94.2%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{-x \cdot \left(y - \left(1 + z\right)\right)}\right) \]
      12. distribute-rgt-neg-in94.2%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{x \cdot \left(-\left(y - \left(1 + z\right)\right)\right)}\right) \]
      13. neg-sub094.2%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(0 - \left(y - \left(1 + z\right)\right)\right)}\right) \]
      14. +-commutative94.2%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \left(y - \color{blue}{\left(z + 1\right)}\right)\right)\right) \]
      15. associate--r+94.2%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \color{blue}{\left(\left(y - z\right) - 1\right)}\right)\right) \]
      16. associate-+l-94.2%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(\left(0 - \left(y - z\right)\right) + 1\right)}\right) \]
      17. neg-sub094.2%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right)\right) \]
      18. mul-1-neg94.2%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{-1 \cdot \left(y - z\right)} + 1\right)\right) \]
      19. +-commutative94.2%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(1 + -1 \cdot \left(y - z\right)\right)}\right) \]
      20. mul-1-neg94.2%

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

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

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

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

    if -4.1000000000000001e65 < z < -8.80000000000000012e-129

    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 97.3%

      \[\leadsto \color{blue}{t \cdot \left(y - z\right) + x \cdot \left(1 + -1 \cdot \left(y - z\right)\right)} \]
    4. Step-by-step derivation
      1. +-commutative97.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-1 \cdot \left(y - z\right) + 1\right)} \]
      2. mul-1-neg97.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right) \]
      3. neg-sub097.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(0 - \left(y - z\right)\right)} + 1\right) \]
      4. associate-+l-97.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(0 - \left(\left(y - z\right) - 1\right)\right)} \]
      5. associate--r+97.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \color{blue}{\left(y - \left(z + 1\right)\right)}\right) \]
      6. +-commutative97.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \left(y - \color{blue}{\left(1 + z\right)}\right)\right) \]
      7. neg-sub097.3%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-\left(y - \left(1 + z\right)\right)\right)} \]
      8. distribute-rgt-neg-in97.3%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{\left(-x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      9. mul-1-neg97.3%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{-1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      10. fma-def100.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, y - z, -1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)\right)} \]
      11. mul-1-neg100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{-x \cdot \left(y - \left(1 + z\right)\right)}\right) \]
      12. distribute-rgt-neg-in100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{x \cdot \left(-\left(y - \left(1 + z\right)\right)\right)}\right) \]
      13. neg-sub0100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(0 - \left(y - \left(1 + z\right)\right)\right)}\right) \]
      14. +-commutative100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \left(y - \color{blue}{\left(z + 1\right)}\right)\right)\right) \]
      15. associate--r+100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \color{blue}{\left(\left(y - z\right) - 1\right)}\right)\right) \]
      16. associate-+l-100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(\left(0 - \left(y - z\right)\right) + 1\right)}\right) \]
      17. neg-sub0100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right)\right) \]
      18. mul-1-neg100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{-1 \cdot \left(y - z\right)} + 1\right)\right) \]
      19. +-commutative100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(1 + -1 \cdot \left(y - z\right)\right)}\right) \]
      20. mul-1-neg100.0%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(1 + \color{blue}{\left(-\left(y - z\right)\right)}\right)\right) \]
    5. Simplified100.0%

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

      \[\leadsto \color{blue}{y \cdot \left(t + -1 \cdot x\right)} \]
    7. Step-by-step derivation
      1. neg-mul-147.1%

        \[\leadsto y \cdot \left(t + \color{blue}{\left(-x\right)}\right) \]
      2. sub-neg47.1%

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

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

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

        \[\leadsto \color{blue}{-x \cdot y} \]
      2. distribute-rgt-neg-in39.2%

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

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

    if -8.80000000000000012e-129 < z < 8e8

    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 92.2%

      \[\leadsto x + \color{blue}{y \cdot \left(t - x\right)} \]
    4. Step-by-step derivation
      1. *-commutative92.2%

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

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

      \[\leadsto x + \color{blue}{t \cdot y} \]
    7. Step-by-step derivation
      1. *-commutative72.0%

        \[\leadsto x + \color{blue}{y \cdot t} \]
    8. Simplified72.0%

      \[\leadsto x + \color{blue}{y \cdot t} \]
    9. Taylor expanded in x around 0 45.1%

      \[\leadsto \color{blue}{t \cdot y} \]
    10. Step-by-step derivation
      1. *-commutative45.1%

        \[\leadsto \color{blue}{y \cdot t} \]
    11. Simplified45.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.1 \cdot 10^{+65}:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;z \leq -8.8 \cdot 10^{-129}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 800000000:\\ \;\;\;\;y \cdot t\\ \mathbf{else}:\\ \;\;\;\;z \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 62.7% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{-93} \lor \neg \left(t \leq 1.3 \cdot 10^{-55}\right):\\ \;\;\;\;\left(y - z\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(z + 1\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= t -6.5e-93) (not (<= t 1.3e-55))) (* (- y z) t) (* x (+ z 1.0))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((t <= -6.5e-93) || !(t <= 1.3e-55)) {
		tmp = (y - z) * t;
	} else {
		tmp = x * (z + 1.0);
	}
	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 ((t <= (-6.5d-93)) .or. (.not. (t <= 1.3d-55))) then
        tmp = (y - z) * t
    else
        tmp = x * (z + 1.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((t <= -6.5e-93) || !(t <= 1.3e-55)) {
		tmp = (y - z) * t;
	} else {
		tmp = x * (z + 1.0);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (t <= -6.5e-93) or not (t <= 1.3e-55):
		tmp = (y - z) * t
	else:
		tmp = x * (z + 1.0)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((t <= -6.5e-93) || !(t <= 1.3e-55))
		tmp = Float64(Float64(y - z) * t);
	else
		tmp = Float64(x * Float64(z + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((t <= -6.5e-93) || ~((t <= 1.3e-55)))
		tmp = (y - z) * t;
	else
		tmp = x * (z + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -6.5e-93], N[Not[LessEqual[t, 1.3e-55]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{-93} \lor \neg \left(t \leq 1.3 \cdot 10^{-55}\right):\\
\;\;\;\;\left(y - z\right) \cdot t\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(z + 1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.5e-93 or 1.2999999999999999e-55 < 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 89.4%

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

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-1 \cdot \left(y - z\right) + 1\right)} \]
      2. mul-1-neg89.4%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right) \]
      3. neg-sub089.4%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(0 - \left(y - z\right)\right)} + 1\right) \]
      4. associate-+l-89.4%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(0 - \left(\left(y - z\right) - 1\right)\right)} \]
      5. associate--r+89.4%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \color{blue}{\left(y - \left(z + 1\right)\right)}\right) \]
      6. +-commutative89.4%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \left(y - \color{blue}{\left(1 + z\right)}\right)\right) \]
      7. neg-sub089.4%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-\left(y - \left(1 + z\right)\right)\right)} \]
      8. distribute-rgt-neg-in89.4%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{\left(-x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      9. mul-1-neg89.4%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{-1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      10. fma-def94.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, y - z, -1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)\right)} \]
      11. mul-1-neg94.7%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{-x \cdot \left(y - \left(1 + z\right)\right)}\right) \]
      12. distribute-rgt-neg-in94.7%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{x \cdot \left(-\left(y - \left(1 + z\right)\right)\right)}\right) \]
      13. neg-sub094.7%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(0 - \left(y - \left(1 + z\right)\right)\right)}\right) \]
      14. +-commutative94.7%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \left(y - \color{blue}{\left(z + 1\right)}\right)\right)\right) \]
      15. associate--r+94.7%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \color{blue}{\left(\left(y - z\right) - 1\right)}\right)\right) \]
      16. associate-+l-94.7%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(\left(0 - \left(y - z\right)\right) + 1\right)}\right) \]
      17. neg-sub094.7%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right)\right) \]
      18. mul-1-neg94.7%

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

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(1 + -1 \cdot \left(y - z\right)\right)}\right) \]
      20. mul-1-neg94.7%

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

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

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

    if -6.5e-93 < t < 1.2999999999999999e-55

    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 85.2%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \left(y - z\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg85.2%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\left(y - z\right)\right)}\right) \]
      2. unsub-neg85.2%

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(z + 1\right)} \]
    8. Simplified59.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{-93} \lor \neg \left(t \leq 1.3 \cdot 10^{-55}\right):\\ \;\;\;\;\left(y - z\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(z + 1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 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. Final simplification100.0%

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

Alternative 16: 37.3% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+19} \lor \neg \left(z \leq 0.0106\right):\\ \;\;\;\;z \cdot x\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -2.3e+19) (not (<= z 0.0106))) (* z x) x))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -2.3e+19) || !(z <= 0.0106)) {
		tmp = z * x;
	} else {
		tmp = x;
	}
	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 <= (-2.3d+19)) .or. (.not. (z <= 0.0106d0))) then
        tmp = z * x
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -2.3e+19) || !(z <= 0.0106)) {
		tmp = z * x;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -2.3e+19) or not (z <= 0.0106):
		tmp = z * x
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -2.3e+19) || !(z <= 0.0106))
		tmp = Float64(z * x);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -2.3e+19) || ~((z <= 0.0106)))
		tmp = z * x;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -2.3e+19], N[Not[LessEqual[z, 0.0106]], $MachinePrecision]], N[(z * x), $MachinePrecision], x]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+19} \lor \neg \left(z \leq 0.0106\right):\\
\;\;\;\;z \cdot x\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.3e19 or 0.0106 < z

    1. Initial program 100.0%

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

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

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-1 \cdot \left(y - z\right) + 1\right)} \]
      2. mul-1-neg91.4%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right) \]
      3. neg-sub091.4%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(\color{blue}{\left(0 - \left(y - z\right)\right)} + 1\right) \]
      4. associate-+l-91.4%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(0 - \left(\left(y - z\right) - 1\right)\right)} \]
      5. associate--r+91.4%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \color{blue}{\left(y - \left(z + 1\right)\right)}\right) \]
      6. +-commutative91.4%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \left(0 - \left(y - \color{blue}{\left(1 + z\right)}\right)\right) \]
      7. neg-sub091.4%

        \[\leadsto t \cdot \left(y - z\right) + x \cdot \color{blue}{\left(-\left(y - \left(1 + z\right)\right)\right)} \]
      8. distribute-rgt-neg-in91.4%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{\left(-x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      9. mul-1-neg91.4%

        \[\leadsto t \cdot \left(y - z\right) + \color{blue}{-1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)} \]
      10. fma-def94.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, y - z, -1 \cdot \left(x \cdot \left(y - \left(1 + z\right)\right)\right)\right)} \]
      11. mul-1-neg94.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{-x \cdot \left(y - \left(1 + z\right)\right)}\right) \]
      12. distribute-rgt-neg-in94.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, \color{blue}{x \cdot \left(-\left(y - \left(1 + z\right)\right)\right)}\right) \]
      13. neg-sub094.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(0 - \left(y - \left(1 + z\right)\right)\right)}\right) \]
      14. +-commutative94.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \left(y - \color{blue}{\left(z + 1\right)}\right)\right)\right) \]
      15. associate--r+94.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(0 - \color{blue}{\left(\left(y - z\right) - 1\right)}\right)\right) \]
      16. associate-+l-94.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(\left(0 - \left(y - z\right)\right) + 1\right)}\right) \]
      17. neg-sub094.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{\left(-\left(y - z\right)\right)} + 1\right)\right) \]
      18. mul-1-neg94.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \left(\color{blue}{-1 \cdot \left(y - z\right)} + 1\right)\right) \]
      19. +-commutative94.5%

        \[\leadsto \mathsf{fma}\left(t, y - z, x \cdot \color{blue}{\left(1 + -1 \cdot \left(y - z\right)\right)}\right) \]
      20. mul-1-neg94.5%

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

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

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

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

    if -2.3e19 < z < 0.0106

    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 87.2%

      \[\leadsto x + \color{blue}{y \cdot \left(t - x\right)} \]
    4. Step-by-step derivation
      1. *-commutative87.2%

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

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification38.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+19} \lor \neg \left(z \leq 0.0106\right):\\ \;\;\;\;z \cdot x\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 18.2% accurate, 17.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 y around inf 59.3%

    \[\leadsto x + \color{blue}{y \cdot \left(t - x\right)} \]
  4. Step-by-step derivation
    1. *-commutative59.3%

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

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

    \[\leadsto \color{blue}{x} \]
  7. Final simplification16.8%

    \[\leadsto x \]
  8. Add Preprocessing

Developer target: 96.5% accurate, 0.6× speedup?

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

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

Reproduce

?
herbie shell --seed 2024011 
(FPCore (x y z t)
  :name "Data.Metrics.Snapshot:quantile from metrics-0.3.0.2"
  :precision binary64

  :herbie-target
  (+ x (+ (* t (- y z)) (* (- x) (- y z))))

  (+ x (* (- y z) (- t x))))