Data.Metrics.Snapshot:quantile from metrics-0.3.0.2

Percentage Accurate: 100.0% → 100.0%
Time: 7.6s
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(t - x\right) \cdot \left(z - y\right) \end{array} \]
(FPCore (x y z t) :precision binary64 (- x (* (- t x) (- z y))))
double code(double x, double y, double z, double t) {
	return x - ((t - x) * (z - y));
}
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 - x) * (z - y))
end function
public static double code(double x, double y, double z, double t) {
	return x - ((t - x) * (z - y));
}
def code(x, y, z, t):
	return x - ((t - x) * (z - y))
function code(x, y, z, t)
	return Float64(x - Float64(Float64(t - x) * Float64(z - y)))
end
function tmp = code(x, y, z, t)
	tmp = x - ((t - x) * (z - y));
end
code[x_, y_, z_, t_] := N[(x - N[(N[(t - x), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

    \[x + \left(y - z\right) \cdot \left(t - x\right) \]
  2. Final simplification100.0%

    \[\leadsto x - \left(t - x\right) \cdot \left(z - y\right) \]

Alternative 2: 50.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - x \cdot y\\ t_2 := x + x \cdot z\\ \mathbf{if}\;x \leq -1.15 \cdot 10^{+223}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -3.2 \cdot 10^{+124}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -1.5 \cdot 10^{+69}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 0.007:\\ \;\;\;\;x - z \cdot t\\ \mathbf{elif}\;x \leq 3.3 \cdot 10^{+251} \lor \neg \left(x \leq 3.3 \cdot 10^{+280}\right):\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- x (* x y))) (t_2 (+ x (* x z))))
   (if (<= x -1.15e+223)
     t_1
     (if (<= x -3.2e+124)
       t_2
       (if (<= x -1.5e+69)
         t_1
         (if (<= x 0.007)
           (- x (* z t))
           (if (or (<= x 3.3e+251) (not (<= x 3.3e+280))) t_2 t_1)))))))
double code(double x, double y, double z, double t) {
	double t_1 = x - (x * y);
	double t_2 = x + (x * z);
	double tmp;
	if (x <= -1.15e+223) {
		tmp = t_1;
	} else if (x <= -3.2e+124) {
		tmp = t_2;
	} else if (x <= -1.5e+69) {
		tmp = t_1;
	} else if (x <= 0.007) {
		tmp = x - (z * t);
	} else if ((x <= 3.3e+251) || !(x <= 3.3e+280)) {
		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 = x - (x * y)
    t_2 = x + (x * z)
    if (x <= (-1.15d+223)) then
        tmp = t_1
    else if (x <= (-3.2d+124)) then
        tmp = t_2
    else if (x <= (-1.5d+69)) then
        tmp = t_1
    else if (x <= 0.007d0) then
        tmp = x - (z * t)
    else if ((x <= 3.3d+251) .or. (.not. (x <= 3.3d+280))) 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 = x - (x * y);
	double t_2 = x + (x * z);
	double tmp;
	if (x <= -1.15e+223) {
		tmp = t_1;
	} else if (x <= -3.2e+124) {
		tmp = t_2;
	} else if (x <= -1.5e+69) {
		tmp = t_1;
	} else if (x <= 0.007) {
		tmp = x - (z * t);
	} else if ((x <= 3.3e+251) || !(x <= 3.3e+280)) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x - (x * y)
	t_2 = x + (x * z)
	tmp = 0
	if x <= -1.15e+223:
		tmp = t_1
	elif x <= -3.2e+124:
		tmp = t_2
	elif x <= -1.5e+69:
		tmp = t_1
	elif x <= 0.007:
		tmp = x - (z * t)
	elif (x <= 3.3e+251) or not (x <= 3.3e+280):
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x - Float64(x * y))
	t_2 = Float64(x + Float64(x * z))
	tmp = 0.0
	if (x <= -1.15e+223)
		tmp = t_1;
	elseif (x <= -3.2e+124)
		tmp = t_2;
	elseif (x <= -1.5e+69)
		tmp = t_1;
	elseif (x <= 0.007)
		tmp = Float64(x - Float64(z * t));
	elseif ((x <= 3.3e+251) || !(x <= 3.3e+280))
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x - (x * y);
	t_2 = x + (x * z);
	tmp = 0.0;
	if (x <= -1.15e+223)
		tmp = t_1;
	elseif (x <= -3.2e+124)
		tmp = t_2;
	elseif (x <= -1.5e+69)
		tmp = t_1;
	elseif (x <= 0.007)
		tmp = x - (z * t);
	elseif ((x <= 3.3e+251) || ~((x <= 3.3e+280)))
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.15e+223], t$95$1, If[LessEqual[x, -3.2e+124], t$95$2, If[LessEqual[x, -1.5e+69], t$95$1, If[LessEqual[x, 0.007], N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 3.3e+251], N[Not[LessEqual[x, 3.3e+280]], $MachinePrecision]], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - x \cdot y\\
t_2 := x + x \cdot z\\
\mathbf{if}\;x \leq -1.15 \cdot 10^{+223}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq -3.2 \cdot 10^{+124}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq -1.5 \cdot 10^{+69}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 3.3 \cdot 10^{+251} \lor \neg \left(x \leq 3.3 \cdot 10^{+280}\right):\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.15000000000000002e223 or -3.19999999999999993e124 < x < -1.49999999999999992e69 or 3.30000000000000018e251 < x < 3.30000000000000003e280

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - x \cdot y} \]
    7. Simplified85.6%

      \[\leadsto \color{blue}{x - x \cdot y} \]

    if -1.15000000000000002e223 < x < -3.19999999999999993e124 or 0.00700000000000000015 < x < 3.30000000000000018e251 or 3.30000000000000003e280 < x

    1. Initial program 100.0%

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

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

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

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

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

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

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

    if -1.49999999999999992e69 < x < 0.00700000000000000015

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.15 \cdot 10^{+223}:\\ \;\;\;\;x - x \cdot y\\ \mathbf{elif}\;x \leq -3.2 \cdot 10^{+124}:\\ \;\;\;\;x + x \cdot z\\ \mathbf{elif}\;x \leq -1.5 \cdot 10^{+69}:\\ \;\;\;\;x - x \cdot y\\ \mathbf{elif}\;x \leq 0.007:\\ \;\;\;\;x - z \cdot t\\ \mathbf{elif}\;x \leq 3.3 \cdot 10^{+251} \lor \neg \left(x \leq 3.3 \cdot 10^{+280}\right):\\ \;\;\;\;x + x \cdot z\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot y\\ \end{array} \]

Alternative 3: 69.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - x \cdot y\\ t_2 := x + x \cdot z\\ \mathbf{if}\;x \leq -1.14 \cdot 10^{+223}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.22 \cdot 10^{+124}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -3.4 \cdot 10^{+69}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.08 \cdot 10^{+187}:\\ \;\;\;\;x - t \cdot \left(z - y\right)\\ \mathbf{elif}\;x \leq 1.45 \cdot 10^{+255} \lor \neg \left(x \leq 3.8 \cdot 10^{+280}\right):\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- x (* x y))) (t_2 (+ x (* x z))))
   (if (<= x -1.14e+223)
     t_1
     (if (<= x -1.22e+124)
       t_2
       (if (<= x -3.4e+69)
         t_1
         (if (<= x 1.08e+187)
           (- x (* t (- z y)))
           (if (or (<= x 1.45e+255) (not (<= x 3.8e+280))) t_2 t_1)))))))
double code(double x, double y, double z, double t) {
	double t_1 = x - (x * y);
	double t_2 = x + (x * z);
	double tmp;
	if (x <= -1.14e+223) {
		tmp = t_1;
	} else if (x <= -1.22e+124) {
		tmp = t_2;
	} else if (x <= -3.4e+69) {
		tmp = t_1;
	} else if (x <= 1.08e+187) {
		tmp = x - (t * (z - y));
	} else if ((x <= 1.45e+255) || !(x <= 3.8e+280)) {
		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 = x - (x * y)
    t_2 = x + (x * z)
    if (x <= (-1.14d+223)) then
        tmp = t_1
    else if (x <= (-1.22d+124)) then
        tmp = t_2
    else if (x <= (-3.4d+69)) then
        tmp = t_1
    else if (x <= 1.08d+187) then
        tmp = x - (t * (z - y))
    else if ((x <= 1.45d+255) .or. (.not. (x <= 3.8d+280))) 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 = x - (x * y);
	double t_2 = x + (x * z);
	double tmp;
	if (x <= -1.14e+223) {
		tmp = t_1;
	} else if (x <= -1.22e+124) {
		tmp = t_2;
	} else if (x <= -3.4e+69) {
		tmp = t_1;
	} else if (x <= 1.08e+187) {
		tmp = x - (t * (z - y));
	} else if ((x <= 1.45e+255) || !(x <= 3.8e+280)) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x - (x * y)
	t_2 = x + (x * z)
	tmp = 0
	if x <= -1.14e+223:
		tmp = t_1
	elif x <= -1.22e+124:
		tmp = t_2
	elif x <= -3.4e+69:
		tmp = t_1
	elif x <= 1.08e+187:
		tmp = x - (t * (z - y))
	elif (x <= 1.45e+255) or not (x <= 3.8e+280):
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x - Float64(x * y))
	t_2 = Float64(x + Float64(x * z))
	tmp = 0.0
	if (x <= -1.14e+223)
		tmp = t_1;
	elseif (x <= -1.22e+124)
		tmp = t_2;
	elseif (x <= -3.4e+69)
		tmp = t_1;
	elseif (x <= 1.08e+187)
		tmp = Float64(x - Float64(t * Float64(z - y)));
	elseif ((x <= 1.45e+255) || !(x <= 3.8e+280))
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x - (x * y);
	t_2 = x + (x * z);
	tmp = 0.0;
	if (x <= -1.14e+223)
		tmp = t_1;
	elseif (x <= -1.22e+124)
		tmp = t_2;
	elseif (x <= -3.4e+69)
		tmp = t_1;
	elseif (x <= 1.08e+187)
		tmp = x - (t * (z - y));
	elseif ((x <= 1.45e+255) || ~((x <= 3.8e+280)))
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.14e+223], t$95$1, If[LessEqual[x, -1.22e+124], t$95$2, If[LessEqual[x, -3.4e+69], t$95$1, If[LessEqual[x, 1.08e+187], N[(x - N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 1.45e+255], N[Not[LessEqual[x, 3.8e+280]], $MachinePrecision]], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - x \cdot y\\
t_2 := x + x \cdot z\\
\mathbf{if}\;x \leq -1.14 \cdot 10^{+223}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq -1.22 \cdot 10^{+124}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq -3.4 \cdot 10^{+69}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 1.45 \cdot 10^{+255} \lor \neg \left(x \leq 3.8 \cdot 10^{+280}\right):\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.13999999999999999e223 or -1.22e124 < x < -3.39999999999999986e69 or 1.4500000000000001e255 < x < 3.79999999999999964e280

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - x \cdot y} \]
    7. Simplified85.6%

      \[\leadsto \color{blue}{x - x \cdot y} \]

    if -1.13999999999999999e223 < x < -1.22e124 or 1.08e187 < x < 1.4500000000000001e255 or 3.79999999999999964e280 < x

    1. Initial program 100.0%

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

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

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

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

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

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

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

    if -3.39999999999999986e69 < x < 1.08e187

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.14 \cdot 10^{+223}:\\ \;\;\;\;x - x \cdot y\\ \mathbf{elif}\;x \leq -1.22 \cdot 10^{+124}:\\ \;\;\;\;x + x \cdot z\\ \mathbf{elif}\;x \leq -3.4 \cdot 10^{+69}:\\ \;\;\;\;x - x \cdot y\\ \mathbf{elif}\;x \leq 1.08 \cdot 10^{+187}:\\ \;\;\;\;x - t \cdot \left(z - y\right)\\ \mathbf{elif}\;x \leq 1.45 \cdot 10^{+255} \lor \neg \left(x \leq 3.8 \cdot 10^{+280}\right):\\ \;\;\;\;x + x \cdot z\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot y\\ \end{array} \]

Alternative 4: 81.6% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.3e42 or 6.69999999999999969e66 < x

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.3e42 < x < 6.69999999999999969e66

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.3 \cdot 10^{+42} \lor \neg \left(x \leq 6.7 \cdot 10^{+66}\right):\\ \;\;\;\;x + x \cdot \left(z - y\right)\\ \mathbf{else}:\\ \;\;\;\;x - t \cdot \left(z - y\right)\\ \end{array} \]

Alternative 5: 84.0% accurate, 0.8× speedup?

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

    1. Initial program 100.0%

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

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

        \[\leadsto x + \color{blue}{\left(-z \cdot \left(t - x\right)\right)} \]
      2. distribute-lft-neg-out82.3%

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

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

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

    if -9.99999999999999955e-7 < z < 1.4e-8

    1. Initial program 100.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{-6} \lor \neg \left(z \leq 1.4 \cdot 10^{-8}\right):\\ \;\;\;\;x + z \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(t - x\right)\\ \end{array} \]

Alternative 6: 37.1% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;z \leq 4.5 \cdot 10^{-192}:\\
\;\;\;\;x\\

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

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


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

    1. Initial program 100.0%

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

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

        \[\leadsto x + \color{blue}{\left(-z \cdot \left(t - x\right)\right)} \]
      2. distribute-lft-neg-out85.3%

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

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

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

      \[\leadsto x + \color{blue}{x \cdot z} \]
    6. Taylor expanded in z around inf 44.4%

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

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

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

    if -1 < z < 4.50000000000000024e-192

    1. Initial program 100.0%

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

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

        \[\leadsto x + \color{blue}{\left(-z \cdot \left(t - x\right)\right)} \]
      2. distribute-lft-neg-out41.4%

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

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

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

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

    if 4.50000000000000024e-192 < z < 2.0499999999999999e73

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-x \cdot y} \]
      2. *-commutative33.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-192}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{+73}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot z\\ \end{array} \]

Alternative 7: 49.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+36} \lor \neg \left(y \leq 3 \cdot 10^{+19}\right):\\
\;\;\;\;x \cdot \left(-y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.00000000000000034e36 or 3e19 < y

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-x \cdot y} \]
      2. *-commutative39.9%

        \[\leadsto -\color{blue}{y \cdot x} \]
      3. distribute-lft-neg-in39.9%

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

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

    if -8.00000000000000034e36 < y < 3e19

    1. Initial program 100.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{+36} \lor \neg \left(y \leq 3 \cdot 10^{+19}\right):\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;x + x \cdot z\\ \end{array} \]

Alternative 8: 54.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{-8} \lor \neg \left(z \leq 2.15 \cdot 10^{+73}\right):\\
\;\;\;\;x + x \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.79999999999999997e-8 or 2.15000000000000007e73 < z

    1. Initial program 100.0%

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

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

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

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

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

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

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

    if -4.79999999999999997e-8 < z < 2.15000000000000007e73

    1. Initial program 100.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{-8} \lor \neg \left(z \leq 2.15 \cdot 10^{+73}\right):\\ \;\;\;\;x + x \cdot z\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot t\\ \end{array} \]

Alternative 9: 51.1% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.95e12 or 1.1000000000000001 < x

    1. Initial program 100.0%

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

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

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

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

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

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

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

    if -1.95e12 < x < 1.1000000000000001

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1950000000000 \lor \neg \left(x \leq 1.1\right):\\ \;\;\;\;x + x \cdot z\\ \mathbf{else}:\\ \;\;\;\;x - z \cdot t\\ \end{array} \]

Alternative 10: 37.3% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 100.0%

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{x \cdot z} \]
    6. Taylor expanded in z around inf 42.3%

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

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

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

    if -1 < z < 5.6e12

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

Alternative 11: 18.2% accurate, 9.0× speedup?

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

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

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

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

      \[\leadsto x + \color{blue}{\left(-z \cdot \left(t - x\right)\right)} \]
    2. distribute-lft-neg-out64.4%

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

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

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

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

    \[\leadsto x \]

Developer target: 96.2% accurate, 0.6× speedup?

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

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

Reproduce

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

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

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