Data.Metrics.Snapshot:quantile from metrics-0.3.0.2

Percentage Accurate: 100.0% → 100.0%
Time: 10.1s
Alternatives: 13
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 100.0% accurate, 1.0× speedup?

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

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

Alternative 1: 100.0% accurate, 0.1× 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-define100.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: 35.4% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(-x\right)\\ \mathbf{if}\;x \leq -3.7 \cdot 10^{+185}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -3.2 \cdot 10^{+140}:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;x \leq -4.7 \cdot 10^{+80}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -5.7 \cdot 10^{-18}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{+26}:\\ \;\;\;\;z \cdot \left(-t\right)\\ \mathbf{elif}\;x \leq 2.9 \cdot 10^{+182} \lor \neg \left(x \leq 1.55 \cdot 10^{+222}\right):\\ \;\;\;\;z \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* y (- x))))
   (if (<= x -3.7e+185)
     t_1
     (if (<= x -3.2e+140)
       (* z x)
       (if (<= x -4.7e+80)
         t_1
         (if (<= x -5.7e-18)
           x
           (if (<= x 1.05e+26)
             (* z (- t))
             (if (or (<= x 2.9e+182) (not (<= x 1.55e+222)))
               (* z x)
               t_1))))))))
double code(double x, double y, double z, double t) {
	double t_1 = y * -x;
	double tmp;
	if (x <= -3.7e+185) {
		tmp = t_1;
	} else if (x <= -3.2e+140) {
		tmp = z * x;
	} else if (x <= -4.7e+80) {
		tmp = t_1;
	} else if (x <= -5.7e-18) {
		tmp = x;
	} else if (x <= 1.05e+26) {
		tmp = z * -t;
	} else if ((x <= 2.9e+182) || !(x <= 1.55e+222)) {
		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 = y * -x
    if (x <= (-3.7d+185)) then
        tmp = t_1
    else if (x <= (-3.2d+140)) then
        tmp = z * x
    else if (x <= (-4.7d+80)) then
        tmp = t_1
    else if (x <= (-5.7d-18)) then
        tmp = x
    else if (x <= 1.05d+26) then
        tmp = z * -t
    else if ((x <= 2.9d+182) .or. (.not. (x <= 1.55d+222))) 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 = y * -x;
	double tmp;
	if (x <= -3.7e+185) {
		tmp = t_1;
	} else if (x <= -3.2e+140) {
		tmp = z * x;
	} else if (x <= -4.7e+80) {
		tmp = t_1;
	} else if (x <= -5.7e-18) {
		tmp = x;
	} else if (x <= 1.05e+26) {
		tmp = z * -t;
	} else if ((x <= 2.9e+182) || !(x <= 1.55e+222)) {
		tmp = z * x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = y * -x
	tmp = 0
	if x <= -3.7e+185:
		tmp = t_1
	elif x <= -3.2e+140:
		tmp = z * x
	elif x <= -4.7e+80:
		tmp = t_1
	elif x <= -5.7e-18:
		tmp = x
	elif x <= 1.05e+26:
		tmp = z * -t
	elif (x <= 2.9e+182) or not (x <= 1.55e+222):
		tmp = z * x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(y * Float64(-x))
	tmp = 0.0
	if (x <= -3.7e+185)
		tmp = t_1;
	elseif (x <= -3.2e+140)
		tmp = Float64(z * x);
	elseif (x <= -4.7e+80)
		tmp = t_1;
	elseif (x <= -5.7e-18)
		tmp = x;
	elseif (x <= 1.05e+26)
		tmp = Float64(z * Float64(-t));
	elseif ((x <= 2.9e+182) || !(x <= 1.55e+222))
		tmp = Float64(z * x);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = y * -x;
	tmp = 0.0;
	if (x <= -3.7e+185)
		tmp = t_1;
	elseif (x <= -3.2e+140)
		tmp = z * x;
	elseif (x <= -4.7e+80)
		tmp = t_1;
	elseif (x <= -5.7e-18)
		tmp = x;
	elseif (x <= 1.05e+26)
		tmp = z * -t;
	elseif ((x <= 2.9e+182) || ~((x <= 1.55e+222)))
		tmp = z * x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * (-x)), $MachinePrecision]}, If[LessEqual[x, -3.7e+185], t$95$1, If[LessEqual[x, -3.2e+140], N[(z * x), $MachinePrecision], If[LessEqual[x, -4.7e+80], t$95$1, If[LessEqual[x, -5.7e-18], x, If[LessEqual[x, 1.05e+26], N[(z * (-t)), $MachinePrecision], If[Or[LessEqual[x, 2.9e+182], N[Not[LessEqual[x, 1.55e+222]], $MachinePrecision]], N[(z * x), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -3.2 \cdot 10^{+140}:\\
\;\;\;\;z \cdot x\\

\mathbf{elif}\;x \leq -4.7 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -5.7 \cdot 10^{-18}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 1.05 \cdot 10^{+26}:\\
\;\;\;\;z \cdot \left(-t\right)\\

\mathbf{elif}\;x \leq 2.9 \cdot 10^{+182} \lor \neg \left(x \leq 1.55 \cdot 10^{+222}\right):\\
\;\;\;\;z \cdot x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -3.6999999999999997e185 or -3.20000000000000011e140 < x < -4.70000000000000009e80 or 2.8999999999999998e182 < x < 1.5499999999999999e222

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \left(-y\right)} \]
    8. Simplified63.0%

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

    if -3.6999999999999997e185 < x < -3.20000000000000011e140 or 1.05e26 < x < 2.8999999999999998e182 or 1.5499999999999999e222 < x

    1. Initial program 100.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{z \cdot x} \]
    8. Simplified50.4%

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

    if -4.70000000000000009e80 < x < -5.69999999999999971e-18

    1. Initial program 99.9%

      \[x + \left(y - z\right) \cdot \left(t - x\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.1%

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

        \[\leadsto x + \color{blue}{{\left(\sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)}\right)}^{3}} \]
    4. Applied egg-rr99.2%

      \[\leadsto x + \color{blue}{{\left(\sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)}\right)}^{3}} \]
    5. Taylor expanded in x around inf 51.4%

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

    if -5.69999999999999971e-18 < x < 1.05e26

    1. Initial program 100.0%

      \[x + \left(y - z\right) \cdot \left(t - x\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt98.6%

        \[\leadsto x + \color{blue}{\left(\sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)} \cdot \sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)}\right) \cdot \sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)}} \]
      2. pow398.6%

        \[\leadsto x + \color{blue}{{\left(\sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)}\right)}^{3}} \]
    4. Applied egg-rr98.6%

      \[\leadsto x + \color{blue}{{\left(\sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)}\right)}^{3}} \]
    5. Taylor expanded in y around 0 55.4%

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

        \[\leadsto x + \color{blue}{\left(-{1}^{0.3333333333333333} \cdot \left(z \cdot \left(t - x\right)\right)\right)} \]
      2. pow-base-155.4%

        \[\leadsto x + \left(-\color{blue}{1} \cdot \left(z \cdot \left(t - x\right)\right)\right) \]
      3. *-lft-identity55.4%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-t\right)} \cdot z \]
    10. Simplified44.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.7 \cdot 10^{+185}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;x \leq -3.2 \cdot 10^{+140}:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;x \leq -4.7 \cdot 10^{+80}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;x \leq -5.7 \cdot 10^{-18}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{+26}:\\ \;\;\;\;z \cdot \left(-t\right)\\ \mathbf{elif}\;x \leq 2.9 \cdot 10^{+182} \lor \neg \left(x \leq 1.55 \cdot 10^{+222}\right):\\ \;\;\;\;z \cdot x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 65.7% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - z \cdot t\\ t_2 := x + y \cdot t\\ t_3 := x \cdot \left(\left(z - y\right) + 1\right)\\ \mathbf{if}\;x \leq -5.5 \cdot 10^{-64}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;x \leq -6.5 \cdot 10^{-213}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -5 \cdot 10^{-299}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq 3.9 \cdot 10^{-243}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 2.4 \cdot 10^{-212}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq 1.25 \cdot 10^{-5}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- x (* z t))) (t_2 (+ x (* y t))) (t_3 (* x (+ (- z y) 1.0))))
   (if (<= x -5.5e-64)
     t_3
     (if (<= x -6.5e-213)
       t_1
       (if (<= x -5e-299)
         t_2
         (if (<= x 3.9e-243)
           t_1
           (if (<= x 2.4e-212) t_2 (if (<= x 1.25e-5) t_1 t_3))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x - (z * t);
	double t_2 = x + (y * t);
	double t_3 = x * ((z - y) + 1.0);
	double tmp;
	if (x <= -5.5e-64) {
		tmp = t_3;
	} else if (x <= -6.5e-213) {
		tmp = t_1;
	} else if (x <= -5e-299) {
		tmp = t_2;
	} else if (x <= 3.9e-243) {
		tmp = t_1;
	} else if (x <= 2.4e-212) {
		tmp = t_2;
	} else if (x <= 1.25e-5) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	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 = x - (z * t)
    t_2 = x + (y * t)
    t_3 = x * ((z - y) + 1.0d0)
    if (x <= (-5.5d-64)) then
        tmp = t_3
    else if (x <= (-6.5d-213)) then
        tmp = t_1
    else if (x <= (-5d-299)) then
        tmp = t_2
    else if (x <= 3.9d-243) then
        tmp = t_1
    else if (x <= 2.4d-212) then
        tmp = t_2
    else if (x <= 1.25d-5) then
        tmp = t_1
    else
        tmp = t_3
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x - (z * t);
	double t_2 = x + (y * t);
	double t_3 = x * ((z - y) + 1.0);
	double tmp;
	if (x <= -5.5e-64) {
		tmp = t_3;
	} else if (x <= -6.5e-213) {
		tmp = t_1;
	} else if (x <= -5e-299) {
		tmp = t_2;
	} else if (x <= 3.9e-243) {
		tmp = t_1;
	} else if (x <= 2.4e-212) {
		tmp = t_2;
	} else if (x <= 1.25e-5) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x - (z * t)
	t_2 = x + (y * t)
	t_3 = x * ((z - y) + 1.0)
	tmp = 0
	if x <= -5.5e-64:
		tmp = t_3
	elif x <= -6.5e-213:
		tmp = t_1
	elif x <= -5e-299:
		tmp = t_2
	elif x <= 3.9e-243:
		tmp = t_1
	elif x <= 2.4e-212:
		tmp = t_2
	elif x <= 1.25e-5:
		tmp = t_1
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x - Float64(z * t))
	t_2 = Float64(x + Float64(y * t))
	t_3 = Float64(x * Float64(Float64(z - y) + 1.0))
	tmp = 0.0
	if (x <= -5.5e-64)
		tmp = t_3;
	elseif (x <= -6.5e-213)
		tmp = t_1;
	elseif (x <= -5e-299)
		tmp = t_2;
	elseif (x <= 3.9e-243)
		tmp = t_1;
	elseif (x <= 2.4e-212)
		tmp = t_2;
	elseif (x <= 1.25e-5)
		tmp = t_1;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x - (z * t);
	t_2 = x + (y * t);
	t_3 = x * ((z - y) + 1.0);
	tmp = 0.0;
	if (x <= -5.5e-64)
		tmp = t_3;
	elseif (x <= -6.5e-213)
		tmp = t_1;
	elseif (x <= -5e-299)
		tmp = t_2;
	elseif (x <= 3.9e-243)
		tmp = t_1;
	elseif (x <= 2.4e-212)
		tmp = t_2;
	elseif (x <= 1.25e-5)
		tmp = t_1;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(N[(z - y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.5e-64], t$95$3, If[LessEqual[x, -6.5e-213], t$95$1, If[LessEqual[x, -5e-299], t$95$2, If[LessEqual[x, 3.9e-243], t$95$1, If[LessEqual[x, 2.4e-212], t$95$2, If[LessEqual[x, 1.25e-5], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -6.5 \cdot 10^{-213}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -5 \cdot 10^{-299}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq 3.9 \cdot 10^{-243}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 2.4 \cdot 10^{-212}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq 1.25 \cdot 10^{-5}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -5.4999999999999999e-64 or 1.25000000000000006e-5 < x

    1. Initial program 100.0%

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

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

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

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

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

    if -5.4999999999999999e-64 < x < -6.5e-213 or -4.99999999999999956e-299 < x < 3.90000000000000015e-243 or 2.39999999999999989e-212 < x < 1.25000000000000006e-5

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

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

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

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

        \[\leadsto \color{blue}{x - t \cdot z} \]
      3. *-commutative61.2%

        \[\leadsto x - \color{blue}{z \cdot t} \]
    6. Simplified61.2%

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

    if -6.5e-213 < x < -4.99999999999999956e-299 or 3.90000000000000015e-243 < x < 2.39999999999999989e-212

    1. Initial program 99.9%

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

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

      \[\leadsto x + \color{blue}{t \cdot y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification72.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.5 \cdot 10^{-64}:\\ \;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\ \mathbf{elif}\;x \leq -6.5 \cdot 10^{-213}:\\ \;\;\;\;x - z \cdot t\\ \mathbf{elif}\;x \leq -5 \cdot 10^{-299}:\\ \;\;\;\;x + y \cdot t\\ \mathbf{elif}\;x \leq 3.9 \cdot 10^{-243}:\\ \;\;\;\;x - z \cdot t\\ \mathbf{elif}\;x \leq 2.4 \cdot 10^{-212}:\\ \;\;\;\;x + y \cdot t\\ \mathbf{elif}\;x \leq 1.25 \cdot 10^{-5}:\\ \;\;\;\;x - z \cdot t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 55.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(-t\right)\\ \mathbf{if}\;z \leq -5.6 \cdot 10^{+186}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{+153}:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;z \leq -70000000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-20}:\\ \;\;\;\;x + y \cdot t\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+163}:\\ \;\;\;\;x - z \cdot t\\ \mathbf{else}:\\ \;\;\;\;z \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* z (- t))))
   (if (<= z -5.6e+186)
     t_1
     (if (<= z -1.15e+153)
       (* z x)
       (if (<= z -70000000000000.0)
         t_1
         (if (<= z 8.2e-20)
           (+ x (* y t))
           (if (<= z 3.2e+163) (- x (* z t)) (* z x))))))))
double code(double x, double y, double z, double t) {
	double t_1 = z * -t;
	double tmp;
	if (z <= -5.6e+186) {
		tmp = t_1;
	} else if (z <= -1.15e+153) {
		tmp = z * x;
	} else if (z <= -70000000000000.0) {
		tmp = t_1;
	} else if (z <= 8.2e-20) {
		tmp = x + (y * t);
	} else if (z <= 3.2e+163) {
		tmp = x - (z * 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) :: t_1
    real(8) :: tmp
    t_1 = z * -t
    if (z <= (-5.6d+186)) then
        tmp = t_1
    else if (z <= (-1.15d+153)) then
        tmp = z * x
    else if (z <= (-70000000000000.0d0)) then
        tmp = t_1
    else if (z <= 8.2d-20) then
        tmp = x + (y * t)
    else if (z <= 3.2d+163) then
        tmp = x - (z * t)
    else
        tmp = z * x
    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 <= -5.6e+186) {
		tmp = t_1;
	} else if (z <= -1.15e+153) {
		tmp = z * x;
	} else if (z <= -70000000000000.0) {
		tmp = t_1;
	} else if (z <= 8.2e-20) {
		tmp = x + (y * t);
	} else if (z <= 3.2e+163) {
		tmp = x - (z * t);
	} else {
		tmp = z * x;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = z * -t
	tmp = 0
	if z <= -5.6e+186:
		tmp = t_1
	elif z <= -1.15e+153:
		tmp = z * x
	elif z <= -70000000000000.0:
		tmp = t_1
	elif z <= 8.2e-20:
		tmp = x + (y * t)
	elif z <= 3.2e+163:
		tmp = x - (z * t)
	else:
		tmp = z * x
	return tmp
function code(x, y, z, t)
	t_1 = Float64(z * Float64(-t))
	tmp = 0.0
	if (z <= -5.6e+186)
		tmp = t_1;
	elseif (z <= -1.15e+153)
		tmp = Float64(z * x);
	elseif (z <= -70000000000000.0)
		tmp = t_1;
	elseif (z <= 8.2e-20)
		tmp = Float64(x + Float64(y * t));
	elseif (z <= 3.2e+163)
		tmp = Float64(x - Float64(z * t));
	else
		tmp = Float64(z * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = z * -t;
	tmp = 0.0;
	if (z <= -5.6e+186)
		tmp = t_1;
	elseif (z <= -1.15e+153)
		tmp = z * x;
	elseif (z <= -70000000000000.0)
		tmp = t_1;
	elseif (z <= 8.2e-20)
		tmp = x + (y * t);
	elseif (z <= 3.2e+163)
		tmp = x - (z * t);
	else
		tmp = z * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * (-t)), $MachinePrecision]}, If[LessEqual[z, -5.6e+186], t$95$1, If[LessEqual[z, -1.15e+153], N[(z * x), $MachinePrecision], If[LessEqual[z, -70000000000000.0], t$95$1, If[LessEqual[z, 8.2e-20], N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e+163], N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision], N[(z * x), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.15 \cdot 10^{+153}:\\
\;\;\;\;z \cdot x\\

\mathbf{elif}\;z \leq -70000000000000:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 3.2 \cdot 10^{+163}:\\
\;\;\;\;x - z \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.60000000000000037e186 or -1.1500000000000001e153 < z < -7e13

    1. Initial program 100.0%

      \[x + \left(y - z\right) \cdot \left(t - x\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.0%

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

        \[\leadsto x + \color{blue}{{\left(\sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)}\right)}^{3}} \]
    4. Applied egg-rr99.0%

      \[\leadsto x + \color{blue}{{\left(\sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)}\right)}^{3}} \]
    5. Taylor expanded in y around 0 83.7%

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

        \[\leadsto x + \color{blue}{\left(-{1}^{0.3333333333333333} \cdot \left(z \cdot \left(t - x\right)\right)\right)} \]
      2. pow-base-183.7%

        \[\leadsto x + \left(-\color{blue}{1} \cdot \left(z \cdot \left(t - x\right)\right)\right) \]
      3. *-lft-identity83.7%

        \[\leadsto x + \left(-\color{blue}{z \cdot \left(t - x\right)}\right) \]
      4. unsub-neg83.7%

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

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

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

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

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

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

    if -5.60000000000000037e186 < z < -1.1500000000000001e153 or 3.1999999999999998e163 < 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 inf 71.6%

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

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

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

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

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

        \[\leadsto \color{blue}{z \cdot x} \]
    8. Simplified68.3%

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

    if -7e13 < z < 8.2000000000000002e-20

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

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

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

    if 8.2000000000000002e-20 < z < 3.1999999999999998e163

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

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

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

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

        \[\leadsto \color{blue}{x - t \cdot z} \]
      3. *-commutative46.6%

        \[\leadsto x - \color{blue}{z \cdot t} \]
    6. Simplified46.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.6 \cdot 10^{+186}:\\ \;\;\;\;z \cdot \left(-t\right)\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{+153}:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;z \leq -70000000000000:\\ \;\;\;\;z \cdot \left(-t\right)\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-20}:\\ \;\;\;\;x + y \cdot t\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+163}:\\ \;\;\;\;x - z \cdot t\\ \mathbf{else}:\\ \;\;\;\;z \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 50.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(-t\right)\\ \mathbf{if}\;z \leq -2.9 \cdot 10^{+186}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{+151}:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{+42}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+97}:\\ \;\;\;\;x \cdot \left(1 - y\right)\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{+164}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;z \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* z (- t))))
   (if (<= z -2.9e+186)
     t_1
     (if (<= z -7.5e+151)
       (* z x)
       (if (<= z -3.2e+42)
         t_1
         (if (<= z 7.2e+97)
           (* x (- 1.0 y))
           (if (<= z 1.85e+164) t_1 (* z x))))))))
double code(double x, double y, double z, double t) {
	double t_1 = z * -t;
	double tmp;
	if (z <= -2.9e+186) {
		tmp = t_1;
	} else if (z <= -7.5e+151) {
		tmp = z * x;
	} else if (z <= -3.2e+42) {
		tmp = t_1;
	} else if (z <= 7.2e+97) {
		tmp = x * (1.0 - y);
	} else if (z <= 1.85e+164) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = z * -t
    if (z <= (-2.9d+186)) then
        tmp = t_1
    else if (z <= (-7.5d+151)) then
        tmp = z * x
    else if (z <= (-3.2d+42)) then
        tmp = t_1
    else if (z <= 7.2d+97) then
        tmp = x * (1.0d0 - y)
    else if (z <= 1.85d+164) then
        tmp = t_1
    else
        tmp = z * x
    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.9e+186) {
		tmp = t_1;
	} else if (z <= -7.5e+151) {
		tmp = z * x;
	} else if (z <= -3.2e+42) {
		tmp = t_1;
	} else if (z <= 7.2e+97) {
		tmp = x * (1.0 - y);
	} else if (z <= 1.85e+164) {
		tmp = t_1;
	} else {
		tmp = z * x;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = z * -t
	tmp = 0
	if z <= -2.9e+186:
		tmp = t_1
	elif z <= -7.5e+151:
		tmp = z * x
	elif z <= -3.2e+42:
		tmp = t_1
	elif z <= 7.2e+97:
		tmp = x * (1.0 - y)
	elif z <= 1.85e+164:
		tmp = t_1
	else:
		tmp = z * x
	return tmp
function code(x, y, z, t)
	t_1 = Float64(z * Float64(-t))
	tmp = 0.0
	if (z <= -2.9e+186)
		tmp = t_1;
	elseif (z <= -7.5e+151)
		tmp = Float64(z * x);
	elseif (z <= -3.2e+42)
		tmp = t_1;
	elseif (z <= 7.2e+97)
		tmp = Float64(x * Float64(1.0 - y));
	elseif (z <= 1.85e+164)
		tmp = t_1;
	else
		tmp = Float64(z * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = z * -t;
	tmp = 0.0;
	if (z <= -2.9e+186)
		tmp = t_1;
	elseif (z <= -7.5e+151)
		tmp = z * x;
	elseif (z <= -3.2e+42)
		tmp = t_1;
	elseif (z <= 7.2e+97)
		tmp = x * (1.0 - y);
	elseif (z <= 1.85e+164)
		tmp = t_1;
	else
		tmp = z * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * (-t)), $MachinePrecision]}, If[LessEqual[z, -2.9e+186], t$95$1, If[LessEqual[z, -7.5e+151], N[(z * x), $MachinePrecision], If[LessEqual[z, -3.2e+42], t$95$1, If[LessEqual[z, 7.2e+97], N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.85e+164], t$95$1, N[(z * x), $MachinePrecision]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -3.2 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 1.85 \cdot 10^{+164}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.9e186 or -7.49999999999999977e151 < z < -3.20000000000000002e42 or 7.19999999999999932e97 < z < 1.85e164

    1. Initial program 100.0%

      \[x + \left(y - z\right) \cdot \left(t - x\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.0%

        \[\leadsto x + \color{blue}{\left(\sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)} \cdot \sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)}\right) \cdot \sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)}} \]
      2. pow398.9%

        \[\leadsto x + \color{blue}{{\left(\sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)}\right)}^{3}} \]
    4. Applied egg-rr98.9%

      \[\leadsto x + \color{blue}{{\left(\sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)}\right)}^{3}} \]
    5. Taylor expanded in y around 0 83.4%

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

        \[\leadsto x + \color{blue}{\left(-{1}^{0.3333333333333333} \cdot \left(z \cdot \left(t - x\right)\right)\right)} \]
      2. pow-base-183.4%

        \[\leadsto x + \left(-\color{blue}{1} \cdot \left(z \cdot \left(t - x\right)\right)\right) \]
      3. *-lft-identity83.4%

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

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

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

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

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

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

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

    if -2.9e186 < z < -7.49999999999999977e151 or 1.85e164 < 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 inf 71.6%

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

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

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

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

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

        \[\leadsto \color{blue}{z \cdot x} \]
    8. Simplified68.3%

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

    if -3.20000000000000002e42 < z < 7.19999999999999932e97

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+186}:\\ \;\;\;\;z \cdot \left(-t\right)\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{+151}:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{+42}:\\ \;\;\;\;z \cdot \left(-t\right)\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+97}:\\ \;\;\;\;x \cdot \left(1 - y\right)\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{+164}:\\ \;\;\;\;z \cdot \left(-t\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 55.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(-t\right)\\ \mathbf{if}\;z \leq -1.55 \cdot 10^{+186}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{+152}:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{+14}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-14}:\\ \;\;\;\;x + y \cdot t\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{+164}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;z \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* z (- t))))
   (if (<= z -1.55e+186)
     t_1
     (if (<= z -2.6e+152)
       (* z x)
       (if (<= z -3.4e+14)
         t_1
         (if (<= z 5.2e-14)
           (+ x (* y t))
           (if (<= z 1.85e+164) t_1 (* z x))))))))
double code(double x, double y, double z, double t) {
	double t_1 = z * -t;
	double tmp;
	if (z <= -1.55e+186) {
		tmp = t_1;
	} else if (z <= -2.6e+152) {
		tmp = z * x;
	} else if (z <= -3.4e+14) {
		tmp = t_1;
	} else if (z <= 5.2e-14) {
		tmp = x + (y * t);
	} else if (z <= 1.85e+164) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = z * -t
    if (z <= (-1.55d+186)) then
        tmp = t_1
    else if (z <= (-2.6d+152)) then
        tmp = z * x
    else if (z <= (-3.4d+14)) then
        tmp = t_1
    else if (z <= 5.2d-14) then
        tmp = x + (y * t)
    else if (z <= 1.85d+164) then
        tmp = t_1
    else
        tmp = z * x
    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 <= -1.55e+186) {
		tmp = t_1;
	} else if (z <= -2.6e+152) {
		tmp = z * x;
	} else if (z <= -3.4e+14) {
		tmp = t_1;
	} else if (z <= 5.2e-14) {
		tmp = x + (y * t);
	} else if (z <= 1.85e+164) {
		tmp = t_1;
	} else {
		tmp = z * x;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = z * -t
	tmp = 0
	if z <= -1.55e+186:
		tmp = t_1
	elif z <= -2.6e+152:
		tmp = z * x
	elif z <= -3.4e+14:
		tmp = t_1
	elif z <= 5.2e-14:
		tmp = x + (y * t)
	elif z <= 1.85e+164:
		tmp = t_1
	else:
		tmp = z * x
	return tmp
function code(x, y, z, t)
	t_1 = Float64(z * Float64(-t))
	tmp = 0.0
	if (z <= -1.55e+186)
		tmp = t_1;
	elseif (z <= -2.6e+152)
		tmp = Float64(z * x);
	elseif (z <= -3.4e+14)
		tmp = t_1;
	elseif (z <= 5.2e-14)
		tmp = Float64(x + Float64(y * t));
	elseif (z <= 1.85e+164)
		tmp = t_1;
	else
		tmp = Float64(z * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = z * -t;
	tmp = 0.0;
	if (z <= -1.55e+186)
		tmp = t_1;
	elseif (z <= -2.6e+152)
		tmp = z * x;
	elseif (z <= -3.4e+14)
		tmp = t_1;
	elseif (z <= 5.2e-14)
		tmp = x + (y * t);
	elseif (z <= 1.85e+164)
		tmp = t_1;
	else
		tmp = z * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * (-t)), $MachinePrecision]}, If[LessEqual[z, -1.55e+186], t$95$1, If[LessEqual[z, -2.6e+152], N[(z * x), $MachinePrecision], If[LessEqual[z, -3.4e+14], t$95$1, If[LessEqual[z, 5.2e-14], N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.85e+164], t$95$1, N[(z * x), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.6 \cdot 10^{+152}:\\
\;\;\;\;z \cdot x\\

\mathbf{elif}\;z \leq -3.4 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 1.85 \cdot 10^{+164}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.5500000000000001e186 or -2.6000000000000001e152 < z < -3.4e14 or 5.19999999999999993e-14 < z < 1.85e164

    1. Initial program 100.0%

      \[x + \left(y - z\right) \cdot \left(t - x\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt98.8%

        \[\leadsto x + \color{blue}{\left(\sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)} \cdot \sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)}\right) \cdot \sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)}} \]
      2. pow398.8%

        \[\leadsto x + \color{blue}{{\left(\sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)}\right)}^{3}} \]
    4. Applied egg-rr98.8%

      \[\leadsto x + \color{blue}{{\left(\sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)}\right)}^{3}} \]
    5. Taylor expanded in y around 0 75.0%

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

        \[\leadsto x + \color{blue}{\left(-{1}^{0.3333333333333333} \cdot \left(z \cdot \left(t - x\right)\right)\right)} \]
      2. pow-base-175.0%

        \[\leadsto x + \left(-\color{blue}{1} \cdot \left(z \cdot \left(t - x\right)\right)\right) \]
      3. *-lft-identity75.0%

        \[\leadsto x + \left(-\color{blue}{z \cdot \left(t - x\right)}\right) \]
      4. unsub-neg75.0%

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

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

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

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

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

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

    if -1.5500000000000001e186 < z < -2.6000000000000001e152 or 1.85e164 < 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 inf 71.6%

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

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

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

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

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

        \[\leadsto \color{blue}{z \cdot x} \]
    8. Simplified68.3%

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

    if -3.4e14 < z < 5.19999999999999993e-14

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{+186}:\\ \;\;\;\;z \cdot \left(-t\right)\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{+152}:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{+14}:\\ \;\;\;\;z \cdot \left(-t\right)\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-14}:\\ \;\;\;\;x + y \cdot t\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{+164}:\\ \;\;\;\;z \cdot \left(-t\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 36.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(-x\right)\\ \mathbf{if}\;y \leq -660000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.26 \cdot 10^{-185}:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;y \leq 19:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* y (- x))))
   (if (<= y -660000000000.0)
     t_1
     (if (<= y 1.26e-185) (* z x) (if (<= y 19.0) x t_1)))))
double code(double x, double y, double z, double t) {
	double t_1 = y * -x;
	double tmp;
	if (y <= -660000000000.0) {
		tmp = t_1;
	} else if (y <= 1.26e-185) {
		tmp = z * x;
	} else if (y <= 19.0) {
		tmp = 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 * -x
    if (y <= (-660000000000.0d0)) then
        tmp = t_1
    else if (y <= 1.26d-185) then
        tmp = z * x
    else if (y <= 19.0d0) then
        tmp = 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 * -x;
	double tmp;
	if (y <= -660000000000.0) {
		tmp = t_1;
	} else if (y <= 1.26e-185) {
		tmp = z * x;
	} else if (y <= 19.0) {
		tmp = x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = y * -x
	tmp = 0
	if y <= -660000000000.0:
		tmp = t_1
	elif y <= 1.26e-185:
		tmp = z * x
	elif y <= 19.0:
		tmp = x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(y * Float64(-x))
	tmp = 0.0
	if (y <= -660000000000.0)
		tmp = t_1;
	elseif (y <= 1.26e-185)
		tmp = Float64(z * x);
	elseif (y <= 19.0)
		tmp = x;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = y * -x;
	tmp = 0.0;
	if (y <= -660000000000.0)
		tmp = t_1;
	elseif (y <= 1.26e-185)
		tmp = z * x;
	elseif (y <= 19.0)
		tmp = x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * (-x)), $MachinePrecision]}, If[LessEqual[y, -660000000000.0], t$95$1, If[LessEqual[y, 1.26e-185], N[(z * x), $MachinePrecision], If[LessEqual[y, 19.0], x, t$95$1]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 1.26 \cdot 10^{-185}:\\
\;\;\;\;z \cdot x\\

\mathbf{elif}\;y \leq 19:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.6e11 or 19 < 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 inf 49.8%

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

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

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

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

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

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

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

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

    if -6.6e11 < y < 1.2599999999999999e-185

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

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

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

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

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

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

        \[\leadsto \color{blue}{z \cdot x} \]
    8. Simplified37.5%

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

    if 1.2599999999999999e-185 < y < 19

    1. Initial program 100.0%

      \[x + \left(y - z\right) \cdot \left(t - x\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.4%

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

        \[\leadsto x + \color{blue}{{\left(\sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)}\right)}^{3}} \]
    4. Applied egg-rr99.3%

      \[\leadsto x + \color{blue}{{\left(\sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)}\right)}^{3}} \]
    5. Taylor expanded in x around inf 39.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -660000000000:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;y \leq 1.26 \cdot 10^{-185}:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;y \leq 19:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 81.7% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{+29} \lor \neg \left(x \leq 1.05 \cdot 10^{+28}\right):\\
\;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -9.5000000000000003e29 or 1.04999999999999995e28 < x

    1. Initial program 100.0%

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

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

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

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

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

    if -9.5000000000000003e29 < x < 1.04999999999999995e28

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

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

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

Alternative 9: 84.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -64000000000000 \lor \neg \left(z \leq 2.2 \cdot 10^{+82}\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 -64000000000000.0) (not (<= z 2.2e+82)))
   (+ x (* z (- x t)))
   (+ x (* y (- t x)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -64000000000000.0) || !(z <= 2.2e+82)) {
		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 <= (-64000000000000.0d0)) .or. (.not. (z <= 2.2d+82))) 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 <= -64000000000000.0) || !(z <= 2.2e+82)) {
		tmp = x + (z * (x - t));
	} else {
		tmp = x + (y * (t - x));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -64000000000000.0) or not (z <= 2.2e+82):
		tmp = x + (z * (x - t))
	else:
		tmp = x + (y * (t - x))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -64000000000000.0) || !(z <= 2.2e+82))
		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 <= -64000000000000.0) || ~((z <= 2.2e+82)))
		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, -64000000000000.0], N[Not[LessEqual[z, 2.2e+82]], $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 -64000000000000 \lor \neg \left(z \leq 2.2 \cdot 10^{+82}\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 < -6.4e13 or 2.2000000000000001e82 < z

    1. Initial program 100.0%

      \[x + \left(y - z\right) \cdot \left(t - x\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.0%

        \[\leadsto x + \color{blue}{\left(\sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)} \cdot \sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)}\right) \cdot \sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)}} \]
      2. pow398.9%

        \[\leadsto x + \color{blue}{{\left(\sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)}\right)}^{3}} \]
    4. Applied egg-rr98.9%

      \[\leadsto x + \color{blue}{{\left(\sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)}\right)}^{3}} \]
    5. Taylor expanded in y around 0 86.4%

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

        \[\leadsto x + \color{blue}{\left(-{1}^{0.3333333333333333} \cdot \left(z \cdot \left(t - x\right)\right)\right)} \]
      2. pow-base-186.4%

        \[\leadsto x + \left(-\color{blue}{1} \cdot \left(z \cdot \left(t - x\right)\right)\right) \]
      3. *-lft-identity86.4%

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

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

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

    if -6.4e13 < z < 2.2000000000000001e82

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

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

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

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

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

Alternative 10: 81.7% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.7 \cdot 10^{+30}:\\
\;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.6999999999999999e30

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

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

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

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

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

    if -2.6999999999999999e30 < x < 4.4999999999999999e27

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

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

    if 4.4999999999999999e27 < x

    1. Initial program 100.0%

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

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

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

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

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

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

        \[\leadsto x + x \cdot \left(0 - \color{blue}{\left(\left(-z\right) + y\right)}\right) \]
      6. associate--r+88.6%

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

        \[\leadsto x + x \cdot \left(\color{blue}{\left(-\left(-z\right)\right)} - y\right) \]
      8. remove-double-neg88.6%

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

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

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

Alternative 11: 37.3% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -14500 \lor \neg \left(z \leq 2.7 \cdot 10^{-12}\right):\\
\;\;\;\;z \cdot x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -14500 or 2.6999999999999998e-12 < 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 inf 54.4%

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

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

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

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

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

        \[\leadsto \color{blue}{z \cdot x} \]
    8. Simplified39.2%

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

    if -14500 < z < 2.6999999999999998e-12

    1. Initial program 100.0%

      \[x + \left(y - z\right) \cdot \left(t - x\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt99.0%

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

        \[\leadsto x + \color{blue}{{\left(\sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)}\right)}^{3}} \]
    4. Applied egg-rr99.0%

      \[\leadsto x + \color{blue}{{\left(\sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)}\right)}^{3}} \]
    5. Taylor expanded in x around inf 28.8%

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

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

Alternative 12: 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 13: 17.4% accurate, 9.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
	return x;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x
end function
public static double code(double x, double y, double z, double t) {
	return x;
}
def code(x, y, z, t):
	return x
function code(x, y, z, t)
	return x
end
function tmp = code(x, y, z, t)
	tmp = x;
end
code[x_, y_, z_, t_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 100.0%

    \[x + \left(y - z\right) \cdot \left(t - x\right) \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. add-cube-cbrt99.0%

      \[\leadsto x + \color{blue}{\left(\sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)} \cdot \sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)}\right) \cdot \sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)}} \]
    2. pow398.9%

      \[\leadsto x + \color{blue}{{\left(\sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)}\right)}^{3}} \]
  4. Applied egg-rr98.9%

    \[\leadsto x + \color{blue}{{\left(\sqrt[3]{\left(y - z\right) \cdot \left(t - x\right)}\right)}^{3}} \]
  5. Taylor expanded in x around inf 15.8%

    \[\leadsto \color{blue}{x} \]
  6. Final simplification15.8%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 96.1% 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 2024043 
(FPCore (x y z t)
  :name "Data.Metrics.Snapshot:quantile from metrics-0.3.0.2"
  :precision binary64

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

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