Data.Metrics.Snapshot:quantile from metrics-0.3.0.2

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

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 11 alternatives:

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

Initial Program: 100.0% accurate, 1.0× speedup?

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

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

Alternative 1: 100.0% accurate, 1.0× speedup?

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

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

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

Alternative 2: 69.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - y\right)\\ t_2 := x + x \cdot z\\ t_3 := x + \left(y - z\right) \cdot t\\ \mathbf{if}\;t \leq -6.8 \cdot 10^{-44}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq -1.5 \cdot 10^{-82}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -2.9 \cdot 10^{-134}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -3.2 \cdot 10^{-296}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-29}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 y))) (t_2 (+ x (* x z))) (t_3 (+ x (* (- y z) t))))
   (if (<= t -6.8e-44)
     t_3
     (if (<= t -1.5e-82)
       t_1
       (if (<= t -2.9e-134)
         t_2
         (if (<= t -3.2e-296) t_1 (if (<= t 4.5e-29) t_2 t_3)))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (1.0 - y);
	double t_2 = x + (x * z);
	double t_3 = x + ((y - z) * t);
	double tmp;
	if (t <= -6.8e-44) {
		tmp = t_3;
	} else if (t <= -1.5e-82) {
		tmp = t_1;
	} else if (t <= -2.9e-134) {
		tmp = t_2;
	} else if (t <= -3.2e-296) {
		tmp = t_1;
	} else if (t <= 4.5e-29) {
		tmp = t_2;
	} 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 * (1.0d0 - y)
    t_2 = x + (x * z)
    t_3 = x + ((y - z) * t)
    if (t <= (-6.8d-44)) then
        tmp = t_3
    else if (t <= (-1.5d-82)) then
        tmp = t_1
    else if (t <= (-2.9d-134)) then
        tmp = t_2
    else if (t <= (-3.2d-296)) then
        tmp = t_1
    else if (t <= 4.5d-29) then
        tmp = t_2
    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 * (1.0 - y);
	double t_2 = x + (x * z);
	double t_3 = x + ((y - z) * t);
	double tmp;
	if (t <= -6.8e-44) {
		tmp = t_3;
	} else if (t <= -1.5e-82) {
		tmp = t_1;
	} else if (t <= -2.9e-134) {
		tmp = t_2;
	} else if (t <= -3.2e-296) {
		tmp = t_1;
	} else if (t <= 4.5e-29) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (1.0 - y)
	t_2 = x + (x * z)
	t_3 = x + ((y - z) * t)
	tmp = 0
	if t <= -6.8e-44:
		tmp = t_3
	elif t <= -1.5e-82:
		tmp = t_1
	elif t <= -2.9e-134:
		tmp = t_2
	elif t <= -3.2e-296:
		tmp = t_1
	elif t <= 4.5e-29:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(1.0 - y))
	t_2 = Float64(x + Float64(x * z))
	t_3 = Float64(x + Float64(Float64(y - z) * t))
	tmp = 0.0
	if (t <= -6.8e-44)
		tmp = t_3;
	elseif (t <= -1.5e-82)
		tmp = t_1;
	elseif (t <= -2.9e-134)
		tmp = t_2;
	elseif (t <= -3.2e-296)
		tmp = t_1;
	elseif (t <= 4.5e-29)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (1.0 - y);
	t_2 = x + (x * z);
	t_3 = x + ((y - z) * t);
	tmp = 0.0;
	if (t <= -6.8e-44)
		tmp = t_3;
	elseif (t <= -1.5e-82)
		tmp = t_1;
	elseif (t <= -2.9e-134)
		tmp = t_2;
	elseif (t <= -3.2e-296)
		tmp = t_1;
	elseif (t <= 4.5e-29)
		tmp = t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.8e-44], t$95$3, If[LessEqual[t, -1.5e-82], t$95$1, If[LessEqual[t, -2.9e-134], t$95$2, If[LessEqual[t, -3.2e-296], t$95$1, If[LessEqual[t, 4.5e-29], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.5 \cdot 10^{-82}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -2.9 \cdot 10^{-134}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -3.2 \cdot 10^{-296}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 4.5 \cdot 10^{-29}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.80000000000000033e-44 or 4.4999999999999998e-29 < 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 91.9%

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

    if -6.80000000000000033e-44 < t < -1.4999999999999999e-82 or -2.89999999999999993e-134 < t < -3.20000000000000013e-296

    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. sub-neg88.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot 1 + \color{blue}{x \cdot \left(-y\right)} \]
      4. distribute-lft-in63.8%

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

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

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

    if -1.4999999999999999e-82 < t < -2.89999999999999993e-134 or -3.20000000000000013e-296 < t < 4.4999999999999998e-29

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

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

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

        \[\leadsto x + \color{blue}{x \cdot \left(-\left(y - z\right)\right)} \]
      3. sub-neg81.9%

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

        \[\leadsto x + x \cdot \left(-\color{blue}{\left(\left(-z\right) + y\right)}\right) \]
      5. distribute-neg-in81.9%

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

        \[\leadsto x + x \cdot \left(\color{blue}{z} + \left(-y\right)\right) \]
      7. sub-neg81.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.8 \cdot 10^{-44}:\\ \;\;\;\;x + \left(y - z\right) \cdot t\\ \mathbf{elif}\;t \leq -1.5 \cdot 10^{-82}:\\ \;\;\;\;x \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq -2.9 \cdot 10^{-134}:\\ \;\;\;\;x + x \cdot z\\ \mathbf{elif}\;t \leq -3.2 \cdot 10^{-296}:\\ \;\;\;\;x \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-29}:\\ \;\;\;\;x + x \cdot z\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - z\right) \cdot t\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 54.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(-z\right)\\ \mathbf{if}\;z \leq -6.8 \cdot 10^{+184}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -5.6 \cdot 10^{+168}:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{+100}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1100000000:\\ \;\;\;\;x + y \cdot t\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+115}:\\ \;\;\;\;x + x \cdot z\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* t (- z))))
   (if (<= z -6.8e+184)
     t_1
     (if (<= z -5.6e+168)
       (* x z)
       (if (<= z -1.6e+100)
         t_1
         (if (<= z 1100000000.0)
           (+ x (* y t))
           (if (<= z 5.2e+115) (+ x (* x z)) t_1)))))))
double code(double x, double y, double z, double t) {
	double t_1 = t * -z;
	double tmp;
	if (z <= -6.8e+184) {
		tmp = t_1;
	} else if (z <= -5.6e+168) {
		tmp = x * z;
	} else if (z <= -1.6e+100) {
		tmp = t_1;
	} else if (z <= 1100000000.0) {
		tmp = x + (y * t);
	} else if (z <= 5.2e+115) {
		tmp = x + (x * z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * -z
    if (z <= (-6.8d+184)) then
        tmp = t_1
    else if (z <= (-5.6d+168)) then
        tmp = x * z
    else if (z <= (-1.6d+100)) then
        tmp = t_1
    else if (z <= 1100000000.0d0) then
        tmp = x + (y * t)
    else if (z <= 5.2d+115) then
        tmp = x + (x * z)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = t * -z;
	double tmp;
	if (z <= -6.8e+184) {
		tmp = t_1;
	} else if (z <= -5.6e+168) {
		tmp = x * z;
	} else if (z <= -1.6e+100) {
		tmp = t_1;
	} else if (z <= 1100000000.0) {
		tmp = x + (y * t);
	} else if (z <= 5.2e+115) {
		tmp = x + (x * z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t * -z
	tmp = 0
	if z <= -6.8e+184:
		tmp = t_1
	elif z <= -5.6e+168:
		tmp = x * z
	elif z <= -1.6e+100:
		tmp = t_1
	elif z <= 1100000000.0:
		tmp = x + (y * t)
	elif z <= 5.2e+115:
		tmp = x + (x * z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t * Float64(-z))
	tmp = 0.0
	if (z <= -6.8e+184)
		tmp = t_1;
	elseif (z <= -5.6e+168)
		tmp = Float64(x * z);
	elseif (z <= -1.6e+100)
		tmp = t_1;
	elseif (z <= 1100000000.0)
		tmp = Float64(x + Float64(y * t));
	elseif (z <= 5.2e+115)
		tmp = Float64(x + Float64(x * z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t * -z;
	tmp = 0.0;
	if (z <= -6.8e+184)
		tmp = t_1;
	elseif (z <= -5.6e+168)
		tmp = x * z;
	elseif (z <= -1.6e+100)
		tmp = t_1;
	elseif (z <= 1100000000.0)
		tmp = x + (y * t);
	elseif (z <= 5.2e+115)
		tmp = x + (x * z);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * (-z)), $MachinePrecision]}, If[LessEqual[z, -6.8e+184], t$95$1, If[LessEqual[z, -5.6e+168], N[(x * z), $MachinePrecision], If[LessEqual[z, -1.6e+100], t$95$1, If[LessEqual[z, 1100000000.0], N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e+115], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -5.6 \cdot 10^{+168}:\\
\;\;\;\;x \cdot z\\

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

\mathbf{elif}\;z \leq 1100000000:\\
\;\;\;\;x + y \cdot t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.8000000000000003e184 or -5.5999999999999998e168 < z < -1.5999999999999999e100 or 5.2000000000000001e115 < z

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

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

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

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

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

      \[\leadsto \color{blue}{x - t \cdot z} \]
    7. Taylor expanded in x around 0 58.4%

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

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

        \[\leadsto \color{blue}{\left(-t\right)} \cdot z \]
      3. *-commutative58.4%

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

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

    if -6.8000000000000003e184 < z < -5.5999999999999998e168

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(z \cdot x + \left(-y\right) \cdot x\right)} \]
    7. Applied egg-rr71.8%

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

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

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

        \[\leadsto \color{blue}{\left(x + z \cdot x\right) - y \cdot x} \]
      4. *-un-lft-identity71.8%

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

        \[\leadsto \color{blue}{x \cdot \left(1 + z\right)} - y \cdot x \]
    9. Applied egg-rr71.8%

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

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

        \[\leadsto \color{blue}{z \cdot x} \]
    12. Simplified86.1%

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

    if -1.5999999999999999e100 < z < 1.1e9

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

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

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

    if 1.1e9 < z < 5.2000000000000001e115

    1. Initial program 99.9%

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

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

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

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

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

        \[\leadsto x + x \cdot \left(-\color{blue}{\left(\left(-z\right) + y\right)}\right) \]
      5. distribute-neg-in62.7%

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

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

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

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

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

        \[\leadsto x + \color{blue}{z \cdot x} \]
    8. Simplified58.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{+184}:\\ \;\;\;\;t \cdot \left(-z\right)\\ \mathbf{elif}\;z \leq -5.6 \cdot 10^{+168}:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{+100}:\\ \;\;\;\;t \cdot \left(-z\right)\\ \mathbf{elif}\;z \leq 1100000000:\\ \;\;\;\;x + y \cdot t\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+115}:\\ \;\;\;\;x + x \cdot z\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(-z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 54.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(-z\right)\\ \mathbf{if}\;z \leq -3.1 \cdot 10^{+184}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -6 \cdot 10^{+168}:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{+101}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1450000000:\\ \;\;\;\;x + y \cdot t\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+116}:\\ \;\;\;\;x \cdot z\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* t (- z))))
   (if (<= z -3.1e+184)
     t_1
     (if (<= z -6e+168)
       (* x z)
       (if (<= z -2.2e+101)
         t_1
         (if (<= z 1450000000.0)
           (+ x (* y t))
           (if (<= z 7.5e+116) (* x z) t_1)))))))
double code(double x, double y, double z, double t) {
	double t_1 = t * -z;
	double tmp;
	if (z <= -3.1e+184) {
		tmp = t_1;
	} else if (z <= -6e+168) {
		tmp = x * z;
	} else if (z <= -2.2e+101) {
		tmp = t_1;
	} else if (z <= 1450000000.0) {
		tmp = x + (y * t);
	} else if (z <= 7.5e+116) {
		tmp = x * z;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * -z
    if (z <= (-3.1d+184)) then
        tmp = t_1
    else if (z <= (-6d+168)) then
        tmp = x * z
    else if (z <= (-2.2d+101)) then
        tmp = t_1
    else if (z <= 1450000000.0d0) then
        tmp = x + (y * t)
    else if (z <= 7.5d+116) then
        tmp = x * z
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = t * -z;
	double tmp;
	if (z <= -3.1e+184) {
		tmp = t_1;
	} else if (z <= -6e+168) {
		tmp = x * z;
	} else if (z <= -2.2e+101) {
		tmp = t_1;
	} else if (z <= 1450000000.0) {
		tmp = x + (y * t);
	} else if (z <= 7.5e+116) {
		tmp = x * z;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t * -z
	tmp = 0
	if z <= -3.1e+184:
		tmp = t_1
	elif z <= -6e+168:
		tmp = x * z
	elif z <= -2.2e+101:
		tmp = t_1
	elif z <= 1450000000.0:
		tmp = x + (y * t)
	elif z <= 7.5e+116:
		tmp = x * z
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t * Float64(-z))
	tmp = 0.0
	if (z <= -3.1e+184)
		tmp = t_1;
	elseif (z <= -6e+168)
		tmp = Float64(x * z);
	elseif (z <= -2.2e+101)
		tmp = t_1;
	elseif (z <= 1450000000.0)
		tmp = Float64(x + Float64(y * t));
	elseif (z <= 7.5e+116)
		tmp = Float64(x * z);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t * -z;
	tmp = 0.0;
	if (z <= -3.1e+184)
		tmp = t_1;
	elseif (z <= -6e+168)
		tmp = x * z;
	elseif (z <= -2.2e+101)
		tmp = t_1;
	elseif (z <= 1450000000.0)
		tmp = x + (y * t);
	elseif (z <= 7.5e+116)
		tmp = x * z;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * (-z)), $MachinePrecision]}, If[LessEqual[z, -3.1e+184], t$95$1, If[LessEqual[z, -6e+168], N[(x * z), $MachinePrecision], If[LessEqual[z, -2.2e+101], t$95$1, If[LessEqual[z, 1450000000.0], N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e+116], N[(x * z), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -6 \cdot 10^{+168}:\\
\;\;\;\;x \cdot z\\

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

\mathbf{elif}\;z \leq 1450000000:\\
\;\;\;\;x + y \cdot t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.0999999999999998e184 or -5.9999999999999996e168 < z < -2.2000000000000001e101 or 7.5e116 < z

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

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

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

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

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

      \[\leadsto \color{blue}{x - t \cdot z} \]
    7. Taylor expanded in x around 0 58.4%

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

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

        \[\leadsto \color{blue}{\left(-t\right)} \cdot z \]
      3. *-commutative58.4%

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

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

    if -3.0999999999999998e184 < z < -5.9999999999999996e168 or 1.45e9 < z < 7.5e116

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(z \cdot x + \left(-y\right) \cdot x\right)} \]
    7. Applied egg-rr65.0%

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

        \[\leadsto \color{blue}{\left(x + z \cdot x\right) + \left(-y\right) \cdot x} \]
      2. distribute-lft-neg-out65.0%

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

        \[\leadsto \color{blue}{\left(x + z \cdot x\right) - y \cdot x} \]
      4. *-un-lft-identity65.0%

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

        \[\leadsto \color{blue}{x \cdot \left(1 + z\right)} - y \cdot x \]
    9. Applied egg-rr65.0%

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

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

        \[\leadsto \color{blue}{z \cdot x} \]
    12. Simplified63.3%

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

    if -2.2000000000000001e101 < z < 1.45e9

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+184}:\\ \;\;\;\;t \cdot \left(-z\right)\\ \mathbf{elif}\;z \leq -6 \cdot 10^{+168}:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{+101}:\\ \;\;\;\;t \cdot \left(-z\right)\\ \mathbf{elif}\;z \leq 1450000000:\\ \;\;\;\;x + y \cdot t\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+116}:\\ \;\;\;\;x \cdot z\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(-z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 44.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(-z\right)\\ t_2 := x \cdot \left(1 - y\right)\\ \mathbf{if}\;t \leq -0.0071:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-81}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 4200000000000:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{+39}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* t (- z))) (t_2 (* x (- 1.0 y))))
   (if (<= t -0.0071)
     t_1
     (if (<= t 3.2e-81)
       t_2
       (if (<= t 4200000000000.0) (* x z) (if (<= t 3.3e+39) t_2 t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = t * -z;
	double t_2 = x * (1.0 - y);
	double tmp;
	if (t <= -0.0071) {
		tmp = t_1;
	} else if (t <= 3.2e-81) {
		tmp = t_2;
	} else if (t <= 4200000000000.0) {
		tmp = x * z;
	} else if (t <= 3.3e+39) {
		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 = t * -z
    t_2 = x * (1.0d0 - y)
    if (t <= (-0.0071d0)) then
        tmp = t_1
    else if (t <= 3.2d-81) then
        tmp = t_2
    else if (t <= 4200000000000.0d0) then
        tmp = x * z
    else if (t <= 3.3d+39) 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 = t * -z;
	double t_2 = x * (1.0 - y);
	double tmp;
	if (t <= -0.0071) {
		tmp = t_1;
	} else if (t <= 3.2e-81) {
		tmp = t_2;
	} else if (t <= 4200000000000.0) {
		tmp = x * z;
	} else if (t <= 3.3e+39) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t * -z
	t_2 = x * (1.0 - y)
	tmp = 0
	if t <= -0.0071:
		tmp = t_1
	elif t <= 3.2e-81:
		tmp = t_2
	elif t <= 4200000000000.0:
		tmp = x * z
	elif t <= 3.3e+39:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t * Float64(-z))
	t_2 = Float64(x * Float64(1.0 - y))
	tmp = 0.0
	if (t <= -0.0071)
		tmp = t_1;
	elseif (t <= 3.2e-81)
		tmp = t_2;
	elseif (t <= 4200000000000.0)
		tmp = Float64(x * z);
	elseif (t <= 3.3e+39)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t * -z;
	t_2 = x * (1.0 - y);
	tmp = 0.0;
	if (t <= -0.0071)
		tmp = t_1;
	elseif (t <= 3.2e-81)
		tmp = t_2;
	elseif (t <= 4200000000000.0)
		tmp = x * z;
	elseif (t <= 3.3e+39)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * (-z)), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -0.0071], t$95$1, If[LessEqual[t, 3.2e-81], t$95$2, If[LessEqual[t, 4200000000000.0], N[(x * z), $MachinePrecision], If[LessEqual[t, 3.3e+39], t$95$2, t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 3.2 \cdot 10^{-81}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 4200000000000:\\
\;\;\;\;x \cdot z\\

\mathbf{elif}\;t \leq 3.3 \cdot 10^{+39}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -0.0071000000000000004 or 3.30000000000000021e39 < 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 95.6%

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

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

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

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

      \[\leadsto \color{blue}{x - t \cdot z} \]
    7. Taylor expanded in x around 0 51.4%

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

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

        \[\leadsto \color{blue}{\left(-t\right)} \cdot z \]
      3. *-commutative51.4%

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

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

    if -0.0071000000000000004 < t < 3.2e-81 or 4.2e12 < t < 3.30000000000000021e39

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

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

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

        \[\leadsto x + \color{blue}{x \cdot \left(-\left(y - z\right)\right)} \]
      3. sub-neg84.9%

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

        \[\leadsto x + x \cdot \left(-\color{blue}{\left(\left(-z\right) + y\right)}\right) \]
      5. distribute-neg-in84.9%

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

        \[\leadsto x + x \cdot \left(\color{blue}{z} + \left(-y\right)\right) \]
      7. sub-neg84.9%

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

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

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

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

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

        \[\leadsto x \cdot 1 + \color{blue}{x \cdot \left(-y\right)} \]
      4. distribute-lft-in55.3%

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

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

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

    if 3.2e-81 < t < 4.2e12

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(z \cdot x + \left(-y\right) \cdot x\right)} \]
    7. Applied egg-rr54.7%

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

        \[\leadsto \color{blue}{\left(x + z \cdot x\right) + \left(-y\right) \cdot x} \]
      2. distribute-lft-neg-out54.7%

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

        \[\leadsto \color{blue}{\left(x + z \cdot x\right) - y \cdot x} \]
      4. *-un-lft-identity54.7%

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

        \[\leadsto \color{blue}{x \cdot \left(1 + z\right)} - y \cdot x \]
    9. Applied egg-rr54.7%

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

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

        \[\leadsto \color{blue}{z \cdot x} \]
    12. Simplified51.5%

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

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

Alternative 6: 35.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(-z\right)\\ \mathbf{if}\;t \leq -2.15 \cdot 10^{-18}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.2 \cdot 10^{-148}:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{-235}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 3500:\\ \;\;\;\;x \cdot z\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* t (- z))))
   (if (<= t -2.15e-18)
     t_1
     (if (<= t -1.2e-148)
       (* x z)
       (if (<= t -1.25e-235) x (if (<= t 3500.0) (* x z) t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = t * -z;
	double tmp;
	if (t <= -2.15e-18) {
		tmp = t_1;
	} else if (t <= -1.2e-148) {
		tmp = x * z;
	} else if (t <= -1.25e-235) {
		tmp = x;
	} else if (t <= 3500.0) {
		tmp = x * z;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * -z
    if (t <= (-2.15d-18)) then
        tmp = t_1
    else if (t <= (-1.2d-148)) then
        tmp = x * z
    else if (t <= (-1.25d-235)) then
        tmp = x
    else if (t <= 3500.0d0) then
        tmp = x * z
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = t * -z;
	double tmp;
	if (t <= -2.15e-18) {
		tmp = t_1;
	} else if (t <= -1.2e-148) {
		tmp = x * z;
	} else if (t <= -1.25e-235) {
		tmp = x;
	} else if (t <= 3500.0) {
		tmp = x * z;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t * -z
	tmp = 0
	if t <= -2.15e-18:
		tmp = t_1
	elif t <= -1.2e-148:
		tmp = x * z
	elif t <= -1.25e-235:
		tmp = x
	elif t <= 3500.0:
		tmp = x * z
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t * Float64(-z))
	tmp = 0.0
	if (t <= -2.15e-18)
		tmp = t_1;
	elseif (t <= -1.2e-148)
		tmp = Float64(x * z);
	elseif (t <= -1.25e-235)
		tmp = x;
	elseif (t <= 3500.0)
		tmp = Float64(x * z);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t * -z;
	tmp = 0.0;
	if (t <= -2.15e-18)
		tmp = t_1;
	elseif (t <= -1.2e-148)
		tmp = x * z;
	elseif (t <= -1.25e-235)
		tmp = x;
	elseif (t <= 3500.0)
		tmp = x * z;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * (-z)), $MachinePrecision]}, If[LessEqual[t, -2.15e-18], t$95$1, If[LessEqual[t, -1.2e-148], N[(x * z), $MachinePrecision], If[LessEqual[t, -1.25e-235], x, If[LessEqual[t, 3500.0], N[(x * z), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.2 \cdot 10^{-148}:\\
\;\;\;\;x \cdot z\\

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

\mathbf{elif}\;t \leq 3500:\\
\;\;\;\;x \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.1500000000000001e-18 or 3500 < 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 92.4%

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

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

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

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

      \[\leadsto \color{blue}{x - t \cdot z} \]
    7. Taylor expanded in x around 0 49.3%

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

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

        \[\leadsto \color{blue}{\left(-t\right)} \cdot z \]
      3. *-commutative49.3%

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

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

    if -2.1500000000000001e-18 < t < -1.2000000000000001e-148 or -1.2499999999999999e-235 < t < 3500

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

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

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

        \[\leadsto x + \color{blue}{x \cdot \left(-\left(y - z\right)\right)} \]
      3. sub-neg83.7%

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

        \[\leadsto x + x \cdot \left(-\color{blue}{\left(\left(-z\right) + y\right)}\right) \]
      5. distribute-neg-in83.7%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(z \cdot x + \left(-y\right) \cdot x\right)} \]
    7. Applied egg-rr81.6%

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

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

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

        \[\leadsto \color{blue}{\left(x + z \cdot x\right) - y \cdot x} \]
      4. *-un-lft-identity81.6%

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

        \[\leadsto \color{blue}{x \cdot \left(1 + z\right)} - y \cdot x \]
    9. Applied egg-rr81.6%

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

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

        \[\leadsto \color{blue}{z \cdot x} \]
    12. Simplified43.4%

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

    if -1.2000000000000001e-148 < t < -1.2499999999999999e-235

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.15 \cdot 10^{-18}:\\ \;\;\;\;t \cdot \left(-z\right)\\ \mathbf{elif}\;t \leq -1.2 \cdot 10^{-148}:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{-235}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 3500:\\ \;\;\;\;x \cdot z\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(-z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 51.5% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.8 \cdot 10^{+177}:\\
\;\;\;\;x + y \cdot t\\

\mathbf{elif}\;t \leq -2.55 \cdot 10^{-14} \lor \neg \left(t \leq 114\right):\\
\;\;\;\;x - z \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.80000000000000001e177

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

      \[\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} \]

    if -1.80000000000000001e177 < t < -2.5499999999999999e-14 or 114 < 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 90.8%

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

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

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

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

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

    if -2.5499999999999999e-14 < t < 114

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.8 \cdot 10^{+177}:\\ \;\;\;\;x + y \cdot t\\ \mathbf{elif}\;t \leq -2.55 \cdot 10^{-14} \lor \neg \left(t \leq 114\right):\\ \;\;\;\;x - z \cdot t\\ \mathbf{else}:\\ \;\;\;\;x + x \cdot z\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 36.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.44:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-243}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 12200000000:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot z\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -0.44)
   (* x z)
   (if (<= z 5.8e-243) x (if (<= z 12200000000.0) (* x (- y)) (* x z)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -0.44) {
		tmp = x * z;
	} else if (z <= 5.8e-243) {
		tmp = x;
	} else if (z <= 12200000000.0) {
		tmp = x * -y;
	} else {
		tmp = x * z;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= (-0.44d0)) then
        tmp = x * z
    else if (z <= 5.8d-243) then
        tmp = x
    else if (z <= 12200000000.0d0) then
        tmp = x * -y
    else
        tmp = x * z
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -0.44) {
		tmp = x * z;
	} else if (z <= 5.8e-243) {
		tmp = x;
	} else if (z <= 12200000000.0) {
		tmp = x * -y;
	} else {
		tmp = x * z;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -0.44:
		tmp = x * z
	elif z <= 5.8e-243:
		tmp = x
	elif z <= 12200000000.0:
		tmp = x * -y
	else:
		tmp = x * z
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -0.44)
		tmp = Float64(x * z);
	elseif (z <= 5.8e-243)
		tmp = x;
	elseif (z <= 12200000000.0)
		tmp = Float64(x * Float64(-y));
	else
		tmp = Float64(x * z);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -0.44)
		tmp = x * z;
	elseif (z <= 5.8e-243)
		tmp = x;
	elseif (z <= 12200000000.0)
		tmp = x * -y;
	else
		tmp = x * z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -0.44], N[(x * z), $MachinePrecision], If[LessEqual[z, 5.8e-243], x, If[LessEqual[z, 12200000000.0], N[(x * (-y)), $MachinePrecision], N[(x * z), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.44:\\
\;\;\;\;x \cdot z\\

\mathbf{elif}\;z \leq 5.8 \cdot 10^{-243}:\\
\;\;\;\;x\\

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

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


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

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

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

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

        \[\leadsto x + \color{blue}{x \cdot \left(-\left(y - z\right)\right)} \]
      3. sub-neg51.8%

        \[\leadsto x + x \cdot \left(-\color{blue}{\left(y + \left(-z\right)\right)}\right) \]
      4. +-commutative51.8%

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

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

        \[\leadsto x + x \cdot \left(\color{blue}{z} + \left(-y\right)\right) \]
      7. sub-neg51.8%

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

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

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

        \[\leadsto x + \color{blue}{\left(z \cdot x + \left(-y\right) \cdot x\right)} \]
    7. Applied egg-rr47.9%

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

        \[\leadsto \color{blue}{\left(x + z \cdot x\right) + \left(-y\right) \cdot x} \]
      2. distribute-lft-neg-out47.9%

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

        \[\leadsto \color{blue}{\left(x + z \cdot x\right) - y \cdot x} \]
      4. *-un-lft-identity47.9%

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

        \[\leadsto \color{blue}{x \cdot \left(1 + z\right)} - y \cdot x \]
    9. Applied egg-rr47.9%

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

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

        \[\leadsto \color{blue}{z \cdot x} \]
    12. Simplified43.3%

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

    if -0.440000000000000002 < z < 5.79999999999999953e-243

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

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

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

    if 5.79999999999999953e-243 < z < 1.22e10

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(z \cdot x + \left(-y\right) \cdot x\right)} \]
    7. Applied egg-rr54.1%

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

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

        \[\leadsto x + \color{blue}{\left(-x \cdot y\right)} \]
      2. *-commutative52.6%

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

        \[\leadsto \color{blue}{x - y \cdot x} \]
      4. *-commutative52.6%

        \[\leadsto x - \color{blue}{x \cdot y} \]
    10. Simplified52.6%

      \[\leadsto \color{blue}{x - x \cdot y} \]
    11. Taylor expanded in y around inf 33.6%

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot y\right)} \]
    12. Step-by-step derivation
      1. associate-*r*33.6%

        \[\leadsto \color{blue}{\left(-1 \cdot x\right) \cdot y} \]
      2. neg-mul-133.6%

        \[\leadsto \color{blue}{\left(-x\right)} \cdot y \]
      3. *-commutative33.6%

        \[\leadsto \color{blue}{y \cdot \left(-x\right)} \]
    13. Simplified33.6%

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

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

Alternative 9: 80.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.45 \cdot 10^{-34} \lor \neg \left(t \leq 1.65 \cdot 10^{+37}\right):\\ \;\;\;\;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 (or (<= t -1.45e-34) (not (<= t 1.65e+37)))
   (+ x (* (- y z) t))
   (+ x (* x (- z y)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((t <= -1.45e-34) || !(t <= 1.65e+37)) {
		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 ((t <= (-1.45d-34)) .or. (.not. (t <= 1.65d+37))) 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 ((t <= -1.45e-34) || !(t <= 1.65e+37)) {
		tmp = x + ((y - z) * t);
	} else {
		tmp = x + (x * (z - y));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (t <= -1.45e-34) or not (t <= 1.65e+37):
		tmp = x + ((y - z) * t)
	else:
		tmp = x + (x * (z - y))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((t <= -1.45e-34) || !(t <= 1.65e+37))
		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 ((t <= -1.45e-34) || ~((t <= 1.65e+37)))
		tmp = x + ((y - z) * t);
	else
		tmp = x + (x * (z - y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.45e-34], N[Not[LessEqual[t, 1.65e+37]], $MachinePrecision]], 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}\;t \leq -1.45 \cdot 10^{-34} \lor \neg \left(t \leq 1.65 \cdot 10^{+37}\right):\\
\;\;\;\;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 2 regimes
  2. if t < -1.4500000000000001e-34 or 1.65e37 < 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 95.6%

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

    if -1.4500000000000001e-34 < t < 1.65e37

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

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

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

        \[\leadsto x + \color{blue}{x \cdot \left(-\left(y - z\right)\right)} \]
      3. sub-neg82.7%

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

        \[\leadsto x + x \cdot \left(-\color{blue}{\left(\left(-z\right) + y\right)}\right) \]
      5. distribute-neg-in82.7%

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

        \[\leadsto x + x \cdot \left(\color{blue}{z} + \left(-y\right)\right) \]
      7. sub-neg82.7%

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

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

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

Alternative 10: 37.4% accurate, 0.7× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(z \cdot x + \left(-y\right) \cdot x\right)} \]
    7. Applied egg-rr48.7%

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

        \[\leadsto \color{blue}{\left(x + z \cdot x\right) + \left(-y\right) \cdot x} \]
      2. distribute-lft-neg-out48.7%

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

        \[\leadsto \color{blue}{\left(x + z \cdot x\right) - y \cdot x} \]
      4. *-un-lft-identity48.7%

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

        \[\leadsto \color{blue}{x \cdot \left(1 + z\right)} - y \cdot x \]
    9. Applied egg-rr48.7%

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

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

        \[\leadsto \color{blue}{z \cdot x} \]
    12. Simplified43.1%

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

    if -0.062 < z < 1

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

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

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

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

Alternative 11: 17.7% accurate, 9.0× speedup?

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

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

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

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

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

Developer target: 96.3% 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 2024085 
(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))))