Numeric.Histogram:binBounds from Chart-1.5.3

Percentage Accurate: 92.4% → 98.7%
Time: 13.2s
Alternatives: 13
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 92.4% accurate, 1.0× speedup?

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

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

Alternative 1: 98.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{z \cdot \left(y - x\right)}{t}\\ \mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 10^{+291}\right):\\ \;\;\;\;x + z \cdot \frac{y - x}{t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (+ x (/ (* z (- y x)) t))))
   (if (or (<= t_1 (- INFINITY)) (not (<= t_1 1e+291)))
     (+ x (* z (/ (- y x) t)))
     t_1)))
double code(double x, double y, double z, double t) {
	double t_1 = x + ((z * (y - x)) / t);
	double tmp;
	if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 1e+291)) {
		tmp = x + (z * ((y - x) / t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	double t_1 = x + ((z * (y - x)) / t);
	double tmp;
	if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 1e+291)) {
		tmp = x + (z * ((y - x) / t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x + ((z * (y - x)) / t)
	tmp = 0
	if (t_1 <= -math.inf) or not (t_1 <= 1e+291):
		tmp = x + (z * ((y - x) / t))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x + Float64(Float64(z * Float64(y - x)) / t))
	tmp = 0.0
	if ((t_1 <= Float64(-Inf)) || !(t_1 <= 1e+291))
		tmp = Float64(x + Float64(z * Float64(Float64(y - x) / t)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x + ((z * (y - x)) / t);
	tmp = 0.0;
	if ((t_1 <= -Inf) || ~((t_1 <= 1e+291)))
		tmp = x + (z * ((y - x) / t));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 1e+291]], $MachinePrecision]], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{z \cdot \left(y - x\right)}{t}\\
\mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 10^{+291}\right):\\
\;\;\;\;x + z \cdot \frac{y - x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y x) z) t)) < -inf.0 or 9.9999999999999996e290 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) z) t))

    1. Initial program 78.6%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. associate-*l/99.9%

        \[\leadsto x + \color{blue}{\frac{y - x}{t} \cdot z} \]
    3. Simplified99.9%

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) z) t)) < 9.9999999999999996e290

    1. Initial program 98.8%

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

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

Alternative 2: 97.3% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq 4.5 \cdot 10^{-123}:\\ \;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y - x}{t}, z, x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z 4.5e-123) (+ x (/ (- y x) (/ t z))) (fma (/ (- y x) t) z x)))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= 4.5e-123) {
		tmp = x + ((y - x) / (t / z));
	} else {
		tmp = fma(((y - x) / t), z, x);
	}
	return tmp;
}
function code(x, y, z, t)
	tmp = 0.0
	if (z <= 4.5e-123)
		tmp = Float64(x + Float64(Float64(y - x) / Float64(t / z)));
	else
		tmp = fma(Float64(Float64(y - x) / t), z, x);
	end
	return tmp
end
code[x_, y_, z_, t_] := If[LessEqual[z, 4.5e-123], N[(x + N[(N[(y - x), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * z + x), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq 4.5 \cdot 10^{-123}:\\
\;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - x}{t}, z, x\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 4.49999999999999993e-123

    1. Initial program 91.9%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. associate-/l*97.2%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
    3. Simplified97.2%

      \[\leadsto \color{blue}{x + \frac{y - x}{\frac{t}{z}}} \]

    if 4.49999999999999993e-123 < z

    1. Initial program 92.9%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. +-commutative92.9%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t} + x} \]
      2. associate-*l/99.9%

        \[\leadsto \color{blue}{\frac{y - x}{t} \cdot z} + x \]
      3. fma-def99.9%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - x}{t}, z, x\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 4.5 \cdot 10^{-123}:\\ \;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y - x}{t}, z, x\right)\\ \end{array} \]

Alternative 3: 71.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{z}{t}\\ \mathbf{if}\;x \leq -5 \cdot 10^{+164}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -4.9 \cdot 10^{+109}:\\ \;\;\;\;z \cdot \frac{-x}{t}\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{+122}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (+ x (* y (/ z t)))))
   (if (<= x -5e+164)
     t_1
     (if (<= x -4.9e+109)
       (* z (/ (- x) t))
       (if (<= x 1.6e+122) t_1 (* x (/ (- z) t)))))))
double code(double x, double y, double z, double t) {
	double t_1 = x + (y * (z / t));
	double tmp;
	if (x <= -5e+164) {
		tmp = t_1;
	} else if (x <= -4.9e+109) {
		tmp = z * (-x / t);
	} else if (x <= 1.6e+122) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = x + (y * (z / t))
    if (x <= (-5d+164)) then
        tmp = t_1
    else if (x <= (-4.9d+109)) then
        tmp = z * (-x / t)
    else if (x <= 1.6d+122) then
        tmp = t_1
    else
        tmp = x * (-z / t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x + (y * (z / t));
	double tmp;
	if (x <= -5e+164) {
		tmp = t_1;
	} else if (x <= -4.9e+109) {
		tmp = z * (-x / t);
	} else if (x <= 1.6e+122) {
		tmp = t_1;
	} else {
		tmp = x * (-z / t);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x + (y * (z / t))
	tmp = 0
	if x <= -5e+164:
		tmp = t_1
	elif x <= -4.9e+109:
		tmp = z * (-x / t)
	elif x <= 1.6e+122:
		tmp = t_1
	else:
		tmp = x * (-z / t)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x + Float64(y * Float64(z / t)))
	tmp = 0.0
	if (x <= -5e+164)
		tmp = t_1;
	elseif (x <= -4.9e+109)
		tmp = Float64(z * Float64(Float64(-x) / t));
	elseif (x <= 1.6e+122)
		tmp = t_1;
	else
		tmp = Float64(x * Float64(Float64(-z) / t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x + (y * (z / t));
	tmp = 0.0;
	if (x <= -5e+164)
		tmp = t_1;
	elseif (x <= -4.9e+109)
		tmp = z * (-x / t);
	elseif (x <= 1.6e+122)
		tmp = t_1;
	else
		tmp = x * (-z / t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5e+164], t$95$1, If[LessEqual[x, -4.9e+109], N[(z * N[((-x) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.6e+122], t$95$1, N[(x * N[((-z) / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{t}\\
\mathbf{if}\;x \leq -5 \cdot 10^{+164}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq -4.9 \cdot 10^{+109}:\\
\;\;\;\;z \cdot \frac{-x}{t}\\

\mathbf{elif}\;x \leq 1.6 \cdot 10^{+122}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.9999999999999995e164 or -4.9000000000000003e109 < x < 1.60000000000000006e122

    1. Initial program 93.3%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. associate-/l*95.5%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
    3. Simplified95.5%

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

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{t}} \]
    5. Step-by-step derivation
      1. associate-*r/77.3%

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]
    6. Simplified77.3%

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

    if -4.9999999999999995e164 < x < -4.9000000000000003e109

    1. Initial program 83.6%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. associate-*l/99.9%

        \[\leadsto x + \color{blue}{\frac{y - x}{t} \cdot z} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
    4. Step-by-step derivation
      1. associate-/r/99.9%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
      2. clear-num99.7%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{t}{z}}{y - x}}} \]
    5. Applied egg-rr99.7%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z}{t}\right)} \]
    7. Step-by-step derivation
      1. distribute-rgt-in90.8%

        \[\leadsto \color{blue}{1 \cdot x + \left(-1 \cdot \frac{z}{t}\right) \cdot x} \]
      2. *-lft-identity90.8%

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

        \[\leadsto x + \color{blue}{\left(-\frac{z}{t}\right)} \cdot x \]
      4. cancel-sign-sub-inv90.8%

        \[\leadsto \color{blue}{x - \frac{z}{t} \cdot x} \]
      5. associate-*l/83.1%

        \[\leadsto x - \color{blue}{\frac{z \cdot x}{t}} \]
      6. associate-*r/90.8%

        \[\leadsto x - \color{blue}{z \cdot \frac{x}{t}} \]
    8. Simplified90.8%

      \[\leadsto \color{blue}{x - z \cdot \frac{x}{t}} \]
    9. Taylor expanded in z around inf 71.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    10. Step-by-step derivation
      1. associate-*r/79.2%

        \[\leadsto -1 \cdot \color{blue}{\left(x \cdot \frac{z}{t}\right)} \]
      2. *-commutative79.2%

        \[\leadsto -1 \cdot \color{blue}{\left(\frac{z}{t} \cdot x\right)} \]
      3. associate-*r*79.2%

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{z}{t}\right) \cdot x} \]
      4. neg-mul-179.2%

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

        \[\leadsto \color{blue}{\frac{-z}{t}} \cdot x \]
    11. Simplified79.2%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    13. Step-by-step derivation
      1. mul-1-neg71.5%

        \[\leadsto \color{blue}{-\frac{x \cdot z}{t}} \]
      2. associate-*l/79.2%

        \[\leadsto -\color{blue}{\frac{x}{t} \cdot z} \]
      3. distribute-rgt-neg-in79.2%

        \[\leadsto \color{blue}{\frac{x}{t} \cdot \left(-z\right)} \]
    14. Simplified79.2%

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

    if 1.60000000000000006e122 < x

    1. Initial program 88.2%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. associate-*l/94.0%

        \[\leadsto x + \color{blue}{\frac{y - x}{t} \cdot z} \]
    3. Simplified94.0%

      \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
    4. Step-by-step derivation
      1. associate-/r/99.9%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
      2. clear-num99.9%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{t}{z}}{y - x}}} \]
    5. Applied egg-rr99.9%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z}{t}\right)} \]
    7. Step-by-step derivation
      1. distribute-rgt-in99.9%

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

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

        \[\leadsto x + \color{blue}{\left(-\frac{z}{t}\right)} \cdot x \]
      4. cancel-sign-sub-inv99.9%

        \[\leadsto \color{blue}{x - \frac{z}{t} \cdot x} \]
      5. associate-*l/88.4%

        \[\leadsto x - \color{blue}{\frac{z \cdot x}{t}} \]
      6. associate-*r/94.0%

        \[\leadsto x - \color{blue}{z \cdot \frac{x}{t}} \]
    8. Simplified94.0%

      \[\leadsto \color{blue}{x - z \cdot \frac{x}{t}} \]
    9. Taylor expanded in z around inf 63.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    10. Step-by-step derivation
      1. associate-*r/69.5%

        \[\leadsto -1 \cdot \color{blue}{\left(x \cdot \frac{z}{t}\right)} \]
      2. *-commutative69.5%

        \[\leadsto -1 \cdot \color{blue}{\left(\frac{z}{t} \cdot x\right)} \]
      3. associate-*r*69.5%

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{z}{t}\right) \cdot x} \]
      4. neg-mul-169.5%

        \[\leadsto \color{blue}{\left(-\frac{z}{t}\right)} \cdot x \]
      5. distribute-neg-frac69.5%

        \[\leadsto \color{blue}{\frac{-z}{t}} \cdot x \]
    11. Simplified69.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5 \cdot 10^{+164}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \mathbf{elif}\;x \leq -4.9 \cdot 10^{+109}:\\ \;\;\;\;z \cdot \frac{-x}{t}\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{+122}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \end{array} \]

Alternative 4: 68.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + z \cdot \frac{y}{t}\\ \mathbf{if}\;x \leq -6.8 \cdot 10^{+164}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -3.55 \cdot 10^{+109}:\\ \;\;\;\;z \cdot \frac{-x}{t}\\ \mathbf{elif}\;x \leq 5.6 \cdot 10^{+121}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (+ x (* z (/ y t)))))
   (if (<= x -6.8e+164)
     t_1
     (if (<= x -3.55e+109)
       (* z (/ (- x) t))
       (if (<= x 5.6e+121) t_1 (* x (/ (- z) t)))))))
double code(double x, double y, double z, double t) {
	double t_1 = x + (z * (y / t));
	double tmp;
	if (x <= -6.8e+164) {
		tmp = t_1;
	} else if (x <= -3.55e+109) {
		tmp = z * (-x / t);
	} else if (x <= 5.6e+121) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = x + (z * (y / t))
    if (x <= (-6.8d+164)) then
        tmp = t_1
    else if (x <= (-3.55d+109)) then
        tmp = z * (-x / t)
    else if (x <= 5.6d+121) then
        tmp = t_1
    else
        tmp = x * (-z / t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x + (z * (y / t));
	double tmp;
	if (x <= -6.8e+164) {
		tmp = t_1;
	} else if (x <= -3.55e+109) {
		tmp = z * (-x / t);
	} else if (x <= 5.6e+121) {
		tmp = t_1;
	} else {
		tmp = x * (-z / t);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x + (z * (y / t))
	tmp = 0
	if x <= -6.8e+164:
		tmp = t_1
	elif x <= -3.55e+109:
		tmp = z * (-x / t)
	elif x <= 5.6e+121:
		tmp = t_1
	else:
		tmp = x * (-z / t)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x + Float64(z * Float64(y / t)))
	tmp = 0.0
	if (x <= -6.8e+164)
		tmp = t_1;
	elseif (x <= -3.55e+109)
		tmp = Float64(z * Float64(Float64(-x) / t));
	elseif (x <= 5.6e+121)
		tmp = t_1;
	else
		tmp = Float64(x * Float64(Float64(-z) / t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x + (z * (y / t));
	tmp = 0.0;
	if (x <= -6.8e+164)
		tmp = t_1;
	elseif (x <= -3.55e+109)
		tmp = z * (-x / t);
	elseif (x <= 5.6e+121)
		tmp = t_1;
	else
		tmp = x * (-z / t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.8e+164], t$95$1, If[LessEqual[x, -3.55e+109], N[(z * N[((-x) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.6e+121], t$95$1, N[(x * N[((-z) / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{t}\\
\mathbf{if}\;x \leq -6.8 \cdot 10^{+164}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq -3.55 \cdot 10^{+109}:\\
\;\;\;\;z \cdot \frac{-x}{t}\\

\mathbf{elif}\;x \leq 5.6 \cdot 10^{+121}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -6.8000000000000002e164 or -3.5500000000000001e109 < x < 5.60000000000000012e121

    1. Initial program 93.3%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. associate-*l/95.5%

        \[\leadsto x + \color{blue}{\frac{y - x}{t} \cdot z} \]
    3. Simplified95.5%

      \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
    4. Taylor expanded in y around inf 77.7%

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

    if -6.8000000000000002e164 < x < -3.5500000000000001e109

    1. Initial program 83.6%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. associate-*l/99.9%

        \[\leadsto x + \color{blue}{\frac{y - x}{t} \cdot z} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
    4. Step-by-step derivation
      1. associate-/r/99.9%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
      2. clear-num99.7%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{t}{z}}{y - x}}} \]
    5. Applied egg-rr99.7%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z}{t}\right)} \]
    7. Step-by-step derivation
      1. distribute-rgt-in90.8%

        \[\leadsto \color{blue}{1 \cdot x + \left(-1 \cdot \frac{z}{t}\right) \cdot x} \]
      2. *-lft-identity90.8%

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

        \[\leadsto x + \color{blue}{\left(-\frac{z}{t}\right)} \cdot x \]
      4. cancel-sign-sub-inv90.8%

        \[\leadsto \color{blue}{x - \frac{z}{t} \cdot x} \]
      5. associate-*l/83.1%

        \[\leadsto x - \color{blue}{\frac{z \cdot x}{t}} \]
      6. associate-*r/90.8%

        \[\leadsto x - \color{blue}{z \cdot \frac{x}{t}} \]
    8. Simplified90.8%

      \[\leadsto \color{blue}{x - z \cdot \frac{x}{t}} \]
    9. Taylor expanded in z around inf 71.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    10. Step-by-step derivation
      1. associate-*r/79.2%

        \[\leadsto -1 \cdot \color{blue}{\left(x \cdot \frac{z}{t}\right)} \]
      2. *-commutative79.2%

        \[\leadsto -1 \cdot \color{blue}{\left(\frac{z}{t} \cdot x\right)} \]
      3. associate-*r*79.2%

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{z}{t}\right) \cdot x} \]
      4. neg-mul-179.2%

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

        \[\leadsto \color{blue}{\frac{-z}{t}} \cdot x \]
    11. Simplified79.2%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    13. Step-by-step derivation
      1. mul-1-neg71.5%

        \[\leadsto \color{blue}{-\frac{x \cdot z}{t}} \]
      2. associate-*l/79.2%

        \[\leadsto -\color{blue}{\frac{x}{t} \cdot z} \]
      3. distribute-rgt-neg-in79.2%

        \[\leadsto \color{blue}{\frac{x}{t} \cdot \left(-z\right)} \]
    14. Simplified79.2%

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

    if 5.60000000000000012e121 < x

    1. Initial program 88.2%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. associate-*l/94.0%

        \[\leadsto x + \color{blue}{\frac{y - x}{t} \cdot z} \]
    3. Simplified94.0%

      \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
    4. Step-by-step derivation
      1. associate-/r/99.9%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
      2. clear-num99.9%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{t}{z}}{y - x}}} \]
    5. Applied egg-rr99.9%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z}{t}\right)} \]
    7. Step-by-step derivation
      1. distribute-rgt-in99.9%

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

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

        \[\leadsto x + \color{blue}{\left(-\frac{z}{t}\right)} \cdot x \]
      4. cancel-sign-sub-inv99.9%

        \[\leadsto \color{blue}{x - \frac{z}{t} \cdot x} \]
      5. associate-*l/88.4%

        \[\leadsto x - \color{blue}{\frac{z \cdot x}{t}} \]
      6. associate-*r/94.0%

        \[\leadsto x - \color{blue}{z \cdot \frac{x}{t}} \]
    8. Simplified94.0%

      \[\leadsto \color{blue}{x - z \cdot \frac{x}{t}} \]
    9. Taylor expanded in z around inf 63.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    10. Step-by-step derivation
      1. associate-*r/69.5%

        \[\leadsto -1 \cdot \color{blue}{\left(x \cdot \frac{z}{t}\right)} \]
      2. *-commutative69.5%

        \[\leadsto -1 \cdot \color{blue}{\left(\frac{z}{t} \cdot x\right)} \]
      3. associate-*r*69.5%

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{z}{t}\right) \cdot x} \]
      4. neg-mul-169.5%

        \[\leadsto \color{blue}{\left(-\frac{z}{t}\right)} \cdot x \]
      5. distribute-neg-frac69.5%

        \[\leadsto \color{blue}{\frac{-z}{t}} \cdot x \]
    11. Simplified69.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.8 \cdot 10^{+164}:\\ \;\;\;\;x + z \cdot \frac{y}{t}\\ \mathbf{elif}\;x \leq -3.55 \cdot 10^{+109}:\\ \;\;\;\;z \cdot \frac{-x}{t}\\ \mathbf{elif}\;x \leq 5.6 \cdot 10^{+121}:\\ \;\;\;\;x + z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \end{array} \]

Alternative 5: 69.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{+164}:\\
\;\;\;\;x + z \cdot \frac{y}{t}\\

\mathbf{elif}\;x \leq -2.8 \cdot 10^{+110}:\\
\;\;\;\;z \cdot \frac{-x}{t}\\

\mathbf{elif}\;x \leq 1.1 \cdot 10^{+122}:\\
\;\;\;\;x + \frac{z}{\frac{t}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -7.49999999999999976e164

    1. Initial program 91.5%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. associate-*l/95.7%

        \[\leadsto x + \color{blue}{\frac{y - x}{t} \cdot z} \]
    3. Simplified95.7%

      \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
    4. Taylor expanded in y around inf 66.0%

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

    if -7.49999999999999976e164 < x < -2.79999999999999987e110

    1. Initial program 83.6%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. associate-*l/99.9%

        \[\leadsto x + \color{blue}{\frac{y - x}{t} \cdot z} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
    4. Step-by-step derivation
      1. associate-/r/99.9%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
      2. clear-num99.7%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{t}{z}}{y - x}}} \]
    5. Applied egg-rr99.7%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z}{t}\right)} \]
    7. Step-by-step derivation
      1. distribute-rgt-in90.8%

        \[\leadsto \color{blue}{1 \cdot x + \left(-1 \cdot \frac{z}{t}\right) \cdot x} \]
      2. *-lft-identity90.8%

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

        \[\leadsto x + \color{blue}{\left(-\frac{z}{t}\right)} \cdot x \]
      4. cancel-sign-sub-inv90.8%

        \[\leadsto \color{blue}{x - \frac{z}{t} \cdot x} \]
      5. associate-*l/83.1%

        \[\leadsto x - \color{blue}{\frac{z \cdot x}{t}} \]
      6. associate-*r/90.8%

        \[\leadsto x - \color{blue}{z \cdot \frac{x}{t}} \]
    8. Simplified90.8%

      \[\leadsto \color{blue}{x - z \cdot \frac{x}{t}} \]
    9. Taylor expanded in z around inf 71.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    10. Step-by-step derivation
      1. associate-*r/79.2%

        \[\leadsto -1 \cdot \color{blue}{\left(x \cdot \frac{z}{t}\right)} \]
      2. *-commutative79.2%

        \[\leadsto -1 \cdot \color{blue}{\left(\frac{z}{t} \cdot x\right)} \]
      3. associate-*r*79.2%

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{z}{t}\right) \cdot x} \]
      4. neg-mul-179.2%

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

        \[\leadsto \color{blue}{\frac{-z}{t}} \cdot x \]
    11. Simplified79.2%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    13. Step-by-step derivation
      1. mul-1-neg71.5%

        \[\leadsto \color{blue}{-\frac{x \cdot z}{t}} \]
      2. associate-*l/79.2%

        \[\leadsto -\color{blue}{\frac{x}{t} \cdot z} \]
      3. distribute-rgt-neg-in79.2%

        \[\leadsto \color{blue}{\frac{x}{t} \cdot \left(-z\right)} \]
    14. Simplified79.2%

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

    if -2.79999999999999987e110 < x < 1.1e122

    1. Initial program 93.5%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. associate-/l*95.0%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
    3. Simplified95.0%

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

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{t}} \]
    5. Step-by-step derivation
      1. *-commutative77.1%

        \[\leadsto x + \frac{\color{blue}{z \cdot y}}{t} \]
      2. associate-/l*79.7%

        \[\leadsto x + \color{blue}{\frac{z}{\frac{t}{y}}} \]
    6. Simplified79.7%

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

    if 1.1e122 < x

    1. Initial program 88.2%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. associate-*l/94.0%

        \[\leadsto x + \color{blue}{\frac{y - x}{t} \cdot z} \]
    3. Simplified94.0%

      \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
    4. Step-by-step derivation
      1. associate-/r/99.9%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
      2. clear-num99.9%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{t}{z}}{y - x}}} \]
    5. Applied egg-rr99.9%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z}{t}\right)} \]
    7. Step-by-step derivation
      1. distribute-rgt-in99.9%

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

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

        \[\leadsto x + \color{blue}{\left(-\frac{z}{t}\right)} \cdot x \]
      4. cancel-sign-sub-inv99.9%

        \[\leadsto \color{blue}{x - \frac{z}{t} \cdot x} \]
      5. associate-*l/88.4%

        \[\leadsto x - \color{blue}{\frac{z \cdot x}{t}} \]
      6. associate-*r/94.0%

        \[\leadsto x - \color{blue}{z \cdot \frac{x}{t}} \]
    8. Simplified94.0%

      \[\leadsto \color{blue}{x - z \cdot \frac{x}{t}} \]
    9. Taylor expanded in z around inf 63.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    10. Step-by-step derivation
      1. associate-*r/69.5%

        \[\leadsto -1 \cdot \color{blue}{\left(x \cdot \frac{z}{t}\right)} \]
      2. *-commutative69.5%

        \[\leadsto -1 \cdot \color{blue}{\left(\frac{z}{t} \cdot x\right)} \]
      3. associate-*r*69.5%

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{z}{t}\right) \cdot x} \]
      4. neg-mul-169.5%

        \[\leadsto \color{blue}{\left(-\frac{z}{t}\right)} \cdot x \]
      5. distribute-neg-frac69.5%

        \[\leadsto \color{blue}{\frac{-z}{t}} \cdot x \]
    11. Simplified69.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.5 \cdot 10^{+164}:\\ \;\;\;\;x + z \cdot \frac{y}{t}\\ \mathbf{elif}\;x \leq -2.8 \cdot 10^{+110}:\\ \;\;\;\;z \cdot \frac{-x}{t}\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{+122}:\\ \;\;\;\;x + \frac{z}{\frac{t}{y}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \end{array} \]

Alternative 6: 68.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.2 \cdot 10^{+164}:\\
\;\;\;\;x + \frac{z \cdot y}{t}\\

\mathbf{elif}\;x \leq -4.9 \cdot 10^{+109}:\\
\;\;\;\;z \cdot \frac{-x}{t}\\

\mathbf{elif}\;x \leq 4.8 \cdot 10^{+122}:\\
\;\;\;\;x + \frac{z}{\frac{t}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -7.19999999999999981e164

    1. Initial program 91.5%

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

      \[\leadsto x + \frac{\color{blue}{y \cdot z}}{t} \]
    3. Step-by-step derivation
      1. *-commutative70.2%

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

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

    if -7.19999999999999981e164 < x < -4.9000000000000003e109

    1. Initial program 83.6%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. associate-*l/99.9%

        \[\leadsto x + \color{blue}{\frac{y - x}{t} \cdot z} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
    4. Step-by-step derivation
      1. associate-/r/99.9%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
      2. clear-num99.7%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{t}{z}}{y - x}}} \]
    5. Applied egg-rr99.7%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z}{t}\right)} \]
    7. Step-by-step derivation
      1. distribute-rgt-in90.8%

        \[\leadsto \color{blue}{1 \cdot x + \left(-1 \cdot \frac{z}{t}\right) \cdot x} \]
      2. *-lft-identity90.8%

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

        \[\leadsto x + \color{blue}{\left(-\frac{z}{t}\right)} \cdot x \]
      4. cancel-sign-sub-inv90.8%

        \[\leadsto \color{blue}{x - \frac{z}{t} \cdot x} \]
      5. associate-*l/83.1%

        \[\leadsto x - \color{blue}{\frac{z \cdot x}{t}} \]
      6. associate-*r/90.8%

        \[\leadsto x - \color{blue}{z \cdot \frac{x}{t}} \]
    8. Simplified90.8%

      \[\leadsto \color{blue}{x - z \cdot \frac{x}{t}} \]
    9. Taylor expanded in z around inf 71.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    10. Step-by-step derivation
      1. associate-*r/79.2%

        \[\leadsto -1 \cdot \color{blue}{\left(x \cdot \frac{z}{t}\right)} \]
      2. *-commutative79.2%

        \[\leadsto -1 \cdot \color{blue}{\left(\frac{z}{t} \cdot x\right)} \]
      3. associate-*r*79.2%

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{z}{t}\right) \cdot x} \]
      4. neg-mul-179.2%

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

        \[\leadsto \color{blue}{\frac{-z}{t}} \cdot x \]
    11. Simplified79.2%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    13. Step-by-step derivation
      1. mul-1-neg71.5%

        \[\leadsto \color{blue}{-\frac{x \cdot z}{t}} \]
      2. associate-*l/79.2%

        \[\leadsto -\color{blue}{\frac{x}{t} \cdot z} \]
      3. distribute-rgt-neg-in79.2%

        \[\leadsto \color{blue}{\frac{x}{t} \cdot \left(-z\right)} \]
    14. Simplified79.2%

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

    if -4.9000000000000003e109 < x < 4.8000000000000004e122

    1. Initial program 93.5%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. associate-/l*95.0%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
    3. Simplified95.0%

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

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{t}} \]
    5. Step-by-step derivation
      1. *-commutative77.1%

        \[\leadsto x + \frac{\color{blue}{z \cdot y}}{t} \]
      2. associate-/l*79.7%

        \[\leadsto x + \color{blue}{\frac{z}{\frac{t}{y}}} \]
    6. Simplified79.7%

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

    if 4.8000000000000004e122 < x

    1. Initial program 88.2%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. associate-*l/94.0%

        \[\leadsto x + \color{blue}{\frac{y - x}{t} \cdot z} \]
    3. Simplified94.0%

      \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
    4. Step-by-step derivation
      1. associate-/r/99.9%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
      2. clear-num99.9%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{t}{z}}{y - x}}} \]
    5. Applied egg-rr99.9%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z}{t}\right)} \]
    7. Step-by-step derivation
      1. distribute-rgt-in99.9%

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

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

        \[\leadsto x + \color{blue}{\left(-\frac{z}{t}\right)} \cdot x \]
      4. cancel-sign-sub-inv99.9%

        \[\leadsto \color{blue}{x - \frac{z}{t} \cdot x} \]
      5. associate-*l/88.4%

        \[\leadsto x - \color{blue}{\frac{z \cdot x}{t}} \]
      6. associate-*r/94.0%

        \[\leadsto x - \color{blue}{z \cdot \frac{x}{t}} \]
    8. Simplified94.0%

      \[\leadsto \color{blue}{x - z \cdot \frac{x}{t}} \]
    9. Taylor expanded in z around inf 63.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    10. Step-by-step derivation
      1. associate-*r/69.5%

        \[\leadsto -1 \cdot \color{blue}{\left(x \cdot \frac{z}{t}\right)} \]
      2. *-commutative69.5%

        \[\leadsto -1 \cdot \color{blue}{\left(\frac{z}{t} \cdot x\right)} \]
      3. associate-*r*69.5%

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{z}{t}\right) \cdot x} \]
      4. neg-mul-169.5%

        \[\leadsto \color{blue}{\left(-\frac{z}{t}\right)} \cdot x \]
      5. distribute-neg-frac69.5%

        \[\leadsto \color{blue}{\frac{-z}{t}} \cdot x \]
    11. Simplified69.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.2 \cdot 10^{+164}:\\ \;\;\;\;x + \frac{z \cdot y}{t}\\ \mathbf{elif}\;x \leq -4.9 \cdot 10^{+109}:\\ \;\;\;\;z \cdot \frac{-x}{t}\\ \mathbf{elif}\;x \leq 4.8 \cdot 10^{+122}:\\ \;\;\;\;x + \frac{z}{\frac{t}{y}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \end{array} \]

Alternative 7: 84.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{-74}:\\
\;\;\;\;x + z \cdot \frac{y}{t}\\

\mathbf{elif}\;y \leq 1.45 \cdot 10^{-95}:\\
\;\;\;\;x - x \cdot \frac{z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.20000000000000063e-74

    1. Initial program 91.6%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. associate-*l/93.9%

        \[\leadsto x + \color{blue}{\frac{y - x}{t} \cdot z} \]
    3. Simplified93.9%

      \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
    4. Taylor expanded in y around inf 86.9%

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

    if -8.20000000000000063e-74 < y < 1.45000000000000001e-95

    1. Initial program 96.1%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. associate-/l*95.1%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
    3. Simplified95.1%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z}{t}\right)} \]
    5. Step-by-step derivation
      1. distribute-lft-in84.9%

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

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

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

        \[\leadsto \color{blue}{x \cdot 1 - x \cdot \frac{z}{t}} \]
      5. *-rgt-identity84.9%

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

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

    if 1.45000000000000001e-95 < y

    1. Initial program 88.2%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. associate-/l*97.7%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
    3. Simplified97.7%

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

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{t}} \]
    5. Step-by-step derivation
      1. associate-*r/83.7%

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]
    6. Simplified83.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.2 \cdot 10^{-74}:\\ \;\;\;\;x + z \cdot \frac{y}{t}\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-95}:\\ \;\;\;\;x - x \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \end{array} \]

Alternative 8: 97.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq 3.7 \cdot 10^{-122}:\\
\;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 3.6999999999999997e-122

    1. Initial program 91.9%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. associate-/l*97.2%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
    3. Simplified97.2%

      \[\leadsto \color{blue}{x + \frac{y - x}{\frac{t}{z}}} \]

    if 3.6999999999999997e-122 < z

    1. Initial program 92.9%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. associate-*l/99.9%

        \[\leadsto x + \color{blue}{\frac{y - x}{t} \cdot z} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 3.7 \cdot 10^{-122}:\\ \;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y - x}{t}\\ \end{array} \]

Alternative 9: 48.6% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.28 \cdot 10^{-5} \lor \neg \left(z \leq 6.6 \cdot 10^{-81}\right):\\
\;\;\;\;z \cdot \frac{-x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.2799999999999999e-5 or 6.59999999999999975e-81 < z

    1. Initial program 87.8%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. associate-*l/99.2%

        \[\leadsto x + \color{blue}{\frac{y - x}{t} \cdot z} \]
    3. Simplified99.2%

      \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
    4. Step-by-step derivation
      1. associate-/r/95.5%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
      2. clear-num95.4%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{t}{z}}{y - x}}} \]
    5. Applied egg-rr95.4%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z}{t}\right)} \]
    7. Step-by-step derivation
      1. distribute-rgt-in61.2%

        \[\leadsto \color{blue}{1 \cdot x + \left(-1 \cdot \frac{z}{t}\right) \cdot x} \]
      2. *-lft-identity61.2%

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

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

        \[\leadsto \color{blue}{x - \frac{z}{t} \cdot x} \]
      5. associate-*l/54.8%

        \[\leadsto x - \color{blue}{\frac{z \cdot x}{t}} \]
      6. associate-*r/59.7%

        \[\leadsto x - \color{blue}{z \cdot \frac{x}{t}} \]
    8. Simplified59.7%

      \[\leadsto \color{blue}{x - z \cdot \frac{x}{t}} \]
    9. Taylor expanded in z around inf 45.6%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    10. Step-by-step derivation
      1. associate-*r/49.5%

        \[\leadsto -1 \cdot \color{blue}{\left(x \cdot \frac{z}{t}\right)} \]
      2. *-commutative49.5%

        \[\leadsto -1 \cdot \color{blue}{\left(\frac{z}{t} \cdot x\right)} \]
      3. associate-*r*49.5%

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{z}{t}\right) \cdot x} \]
      4. neg-mul-149.5%

        \[\leadsto \color{blue}{\left(-\frac{z}{t}\right)} \cdot x \]
      5. distribute-neg-frac49.5%

        \[\leadsto \color{blue}{\frac{-z}{t}} \cdot x \]
    11. Simplified49.5%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    13. Step-by-step derivation
      1. mul-1-neg45.6%

        \[\leadsto \color{blue}{-\frac{x \cdot z}{t}} \]
      2. associate-*l/48.0%

        \[\leadsto -\color{blue}{\frac{x}{t} \cdot z} \]
      3. distribute-rgt-neg-in48.0%

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

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

    if -1.2799999999999999e-5 < z < 6.59999999999999975e-81

    1. Initial program 98.2%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. associate-/l*97.3%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
    3. Simplified97.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.28 \cdot 10^{-5} \lor \neg \left(z \leq 6.6 \cdot 10^{-81}\right):\\ \;\;\;\;z \cdot \frac{-x}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 10: 49.4% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00062 \lor \neg \left(z \leq 6.2 \cdot 10^{-81}\right):\\
\;\;\;\;x \cdot \frac{-z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.2e-4 or 6.19999999999999976e-81 < z

    1. Initial program 87.8%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. associate-*l/99.2%

        \[\leadsto x + \color{blue}{\frac{y - x}{t} \cdot z} \]
    3. Simplified99.2%

      \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
    4. Step-by-step derivation
      1. associate-/r/95.5%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
      2. clear-num95.4%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{t}{z}}{y - x}}} \]
    5. Applied egg-rr95.4%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z}{t}\right)} \]
    7. Step-by-step derivation
      1. distribute-rgt-in61.2%

        \[\leadsto \color{blue}{1 \cdot x + \left(-1 \cdot \frac{z}{t}\right) \cdot x} \]
      2. *-lft-identity61.2%

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

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

        \[\leadsto \color{blue}{x - \frac{z}{t} \cdot x} \]
      5. associate-*l/54.8%

        \[\leadsto x - \color{blue}{\frac{z \cdot x}{t}} \]
      6. associate-*r/59.7%

        \[\leadsto x - \color{blue}{z \cdot \frac{x}{t}} \]
    8. Simplified59.7%

      \[\leadsto \color{blue}{x - z \cdot \frac{x}{t}} \]
    9. Taylor expanded in z around inf 45.6%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    10. Step-by-step derivation
      1. associate-*r/49.5%

        \[\leadsto -1 \cdot \color{blue}{\left(x \cdot \frac{z}{t}\right)} \]
      2. *-commutative49.5%

        \[\leadsto -1 \cdot \color{blue}{\left(\frac{z}{t} \cdot x\right)} \]
      3. associate-*r*49.5%

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{z}{t}\right) \cdot x} \]
      4. neg-mul-149.5%

        \[\leadsto \color{blue}{\left(-\frac{z}{t}\right)} \cdot x \]
      5. distribute-neg-frac49.5%

        \[\leadsto \color{blue}{\frac{-z}{t}} \cdot x \]
    11. Simplified49.5%

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

    if -6.2e-4 < z < 6.19999999999999976e-81

    1. Initial program 98.2%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. associate-/l*97.3%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
    3. Simplified97.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.00062 \lor \neg \left(z \leq 6.2 \cdot 10^{-81}\right):\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 11: 49.4% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.012:\\
\;\;\;\;x \cdot \frac{-z}{t}\\

\mathbf{elif}\;z \leq 6.6 \cdot 10^{-81}:\\
\;\;\;\;x\\

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


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

    1. Initial program 83.8%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. associate-*l/98.6%

        \[\leadsto x + \color{blue}{\frac{y - x}{t} \cdot z} \]
    3. Simplified98.6%

      \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
    4. Step-by-step derivation
      1. associate-/r/97.4%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
      2. clear-num97.2%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{t}{z}}{y - x}}} \]
    5. Applied egg-rr97.2%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z}{t}\right)} \]
    7. Step-by-step derivation
      1. distribute-rgt-in59.2%

        \[\leadsto \color{blue}{1 \cdot x + \left(-1 \cdot \frac{z}{t}\right) \cdot x} \]
      2. *-lft-identity59.2%

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

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

        \[\leadsto \color{blue}{x - \frac{z}{t} \cdot x} \]
      5. associate-*l/54.2%

        \[\leadsto x - \color{blue}{\frac{z \cdot x}{t}} \]
      6. associate-*r/58.9%

        \[\leadsto x - \color{blue}{z \cdot \frac{x}{t}} \]
    8. Simplified58.9%

      \[\leadsto \color{blue}{x - z \cdot \frac{x}{t}} \]
    9. Taylor expanded in z around inf 46.2%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    10. Step-by-step derivation
      1. associate-*r/48.7%

        \[\leadsto -1 \cdot \color{blue}{\left(x \cdot \frac{z}{t}\right)} \]
      2. *-commutative48.7%

        \[\leadsto -1 \cdot \color{blue}{\left(\frac{z}{t} \cdot x\right)} \]
      3. associate-*r*48.7%

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{z}{t}\right) \cdot x} \]
      4. neg-mul-148.7%

        \[\leadsto \color{blue}{\left(-\frac{z}{t}\right)} \cdot x \]
      5. distribute-neg-frac48.7%

        \[\leadsto \color{blue}{\frac{-z}{t}} \cdot x \]
    11. Simplified48.7%

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

    if -0.012 < z < 6.59999999999999975e-81

    1. Initial program 98.2%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. associate-/l*97.3%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
    3. Simplified97.3%

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

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

    if 6.59999999999999975e-81 < z

    1. Initial program 92.0%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. associate-*l/99.9%

        \[\leadsto x + \color{blue}{\frac{y - x}{t} \cdot z} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
    4. Step-by-step derivation
      1. associate-/r/93.5%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
      2. clear-num93.4%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{t}{z}}{y - x}}} \]
    5. Applied egg-rr93.4%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z}{t}\right)} \]
    7. Step-by-step derivation
      1. distribute-rgt-in63.4%

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

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

        \[\leadsto x + \color{blue}{\left(-\frac{z}{t}\right)} \cdot x \]
      4. cancel-sign-sub-inv63.4%

        \[\leadsto \color{blue}{x - \frac{z}{t} \cdot x} \]
      5. associate-*l/55.5%

        \[\leadsto x - \color{blue}{\frac{z \cdot x}{t}} \]
      6. associate-*r/60.6%

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

      \[\leadsto \color{blue}{x - z \cdot \frac{x}{t}} \]
    9. Taylor expanded in z around inf 44.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    10. Step-by-step derivation
      1. mul-1-neg44.9%

        \[\leadsto \color{blue}{-\frac{x \cdot z}{t}} \]
      2. associate-/l*50.3%

        \[\leadsto -\color{blue}{\frac{x}{\frac{t}{z}}} \]
      3. distribute-frac-neg50.3%

        \[\leadsto \color{blue}{\frac{-x}{\frac{t}{z}}} \]
    11. Simplified50.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.012:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{-81}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{\frac{t}{z}}\\ \end{array} \]

Alternative 12: 92.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + z \cdot \frac{y - x}{t} \end{array} \]
(FPCore (x y z t) :precision binary64 (+ x (* z (/ (- y x) t))))
double code(double x, double y, double z, double t) {
	return x + (z * ((y - x) / t));
}
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 + (z * ((y - x) / t))
end function
public static double code(double x, double y, double z, double t) {
	return x + (z * ((y - x) / t));
}
def code(x, y, z, t):
	return x + (z * ((y - x) / t))
function code(x, y, z, t)
	return Float64(x + Float64(z * Float64(Float64(y - x) / t)))
end
function tmp = code(x, y, z, t)
	tmp = x + (z * ((y - x) / t));
end
code[x_, y_, z_, t_] := N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + z \cdot \frac{y - x}{t}
\end{array}
Derivation
  1. Initial program 92.2%

    \[x + \frac{\left(y - x\right) \cdot z}{t} \]
  2. Step-by-step derivation
    1. associate-*l/95.5%

      \[\leadsto x + \color{blue}{\frac{y - x}{t} \cdot z} \]
  3. Simplified95.5%

    \[\leadsto \color{blue}{x + \frac{y - x}{t} \cdot z} \]
  4. Final simplification95.5%

    \[\leadsto x + z \cdot \frac{y - x}{t} \]

Alternative 13: 38.6% 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 92.2%

    \[x + \frac{\left(y - x\right) \cdot z}{t} \]
  2. Step-by-step derivation
    1. associate-/l*96.3%

      \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
  3. Simplified96.3%

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification36.5%

    \[\leadsto x \]

Developer target: 97.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x < -9.025511195533005 \cdot 10^{-135}:\\
\;\;\;\;x - \frac{z}{t} \cdot \left(x - y\right)\\

\mathbf{elif}\;x < 4.275032163700715 \cdot 10^{-250}:\\
\;\;\;\;x + \frac{y - x}{t} \cdot z\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023279 
(FPCore (x y z t)
  :name "Numeric.Histogram:binBounds from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (if (< x -9.025511195533005e-135) (- x (* (/ z t) (- x y))) (if (< x 4.275032163700715e-250) (+ x (* (/ (- y x) t) z)) (+ x (/ (- y x) (/ t z)))))

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