Numeric.Histogram:binBounds from Chart-1.5.3

Percentage Accurate: 92.7% → 98.9%
Time: 9.4s
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.7% 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.9% 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 2 \cdot 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 2e+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 <= 2e+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 <= 2e+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 <= 2e+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 <= 2e+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 <= 2e+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, 2e+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 2 \cdot 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 1.9999999999999999e291 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) z) t))

    1. Initial program 83.3%

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

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

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

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

    1. Initial program 99.2%

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

    \[\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 2 \cdot 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.8% accurate, 0.1× speedup?

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{t}, y - x, x\right)} \]
  4. Final simplification98.6%

    \[\leadsto \mathsf{fma}\left(\frac{z}{t}, y - x, x\right) \]

Alternative 3: 54.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z}{t} \cdot y\\ t_2 := z \cdot \frac{x}{-t}\\ \mathbf{if}\;z \leq -3.4 \cdot 10^{+181}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{+158}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{+28}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-20}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{+76}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{+99}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+221} \lor \neg \left(z \leq 8 \cdot 10^{+272}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (/ z t) y)) (t_2 (* z (/ x (- t)))))
   (if (<= z -3.4e+181)
     t_1
     (if (<= z -4.2e+158)
       t_2
       (if (<= z -4.8e+28)
         (* z (/ y t))
         (if (<= z 4.5e-20)
           x
           (if (<= z 4.3e+76)
             t_1
             (if (<= z 1.95e+99)
               x
               (if (or (<= z 5e+221) (not (<= z 8e+272))) t_1 t_2)))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (z / t) * y;
	double t_2 = z * (x / -t);
	double tmp;
	if (z <= -3.4e+181) {
		tmp = t_1;
	} else if (z <= -4.2e+158) {
		tmp = t_2;
	} else if (z <= -4.8e+28) {
		tmp = z * (y / t);
	} else if (z <= 4.5e-20) {
		tmp = x;
	} else if (z <= 4.3e+76) {
		tmp = t_1;
	} else if (z <= 1.95e+99) {
		tmp = x;
	} else if ((z <= 5e+221) || !(z <= 8e+272)) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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 = (z / t) * y
    t_2 = z * (x / -t)
    if (z <= (-3.4d+181)) then
        tmp = t_1
    else if (z <= (-4.2d+158)) then
        tmp = t_2
    else if (z <= (-4.8d+28)) then
        tmp = z * (y / t)
    else if (z <= 4.5d-20) then
        tmp = x
    else if (z <= 4.3d+76) then
        tmp = t_1
    else if (z <= 1.95d+99) then
        tmp = x
    else if ((z <= 5d+221) .or. (.not. (z <= 8d+272))) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (z / t) * y;
	double t_2 = z * (x / -t);
	double tmp;
	if (z <= -3.4e+181) {
		tmp = t_1;
	} else if (z <= -4.2e+158) {
		tmp = t_2;
	} else if (z <= -4.8e+28) {
		tmp = z * (y / t);
	} else if (z <= 4.5e-20) {
		tmp = x;
	} else if (z <= 4.3e+76) {
		tmp = t_1;
	} else if (z <= 1.95e+99) {
		tmp = x;
	} else if ((z <= 5e+221) || !(z <= 8e+272)) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (z / t) * y
	t_2 = z * (x / -t)
	tmp = 0
	if z <= -3.4e+181:
		tmp = t_1
	elif z <= -4.2e+158:
		tmp = t_2
	elif z <= -4.8e+28:
		tmp = z * (y / t)
	elif z <= 4.5e-20:
		tmp = x
	elif z <= 4.3e+76:
		tmp = t_1
	elif z <= 1.95e+99:
		tmp = x
	elif (z <= 5e+221) or not (z <= 8e+272):
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(z / t) * y)
	t_2 = Float64(z * Float64(x / Float64(-t)))
	tmp = 0.0
	if (z <= -3.4e+181)
		tmp = t_1;
	elseif (z <= -4.2e+158)
		tmp = t_2;
	elseif (z <= -4.8e+28)
		tmp = Float64(z * Float64(y / t));
	elseif (z <= 4.5e-20)
		tmp = x;
	elseif (z <= 4.3e+76)
		tmp = t_1;
	elseif (z <= 1.95e+99)
		tmp = x;
	elseif ((z <= 5e+221) || !(z <= 8e+272))
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (z / t) * y;
	t_2 = z * (x / -t);
	tmp = 0.0;
	if (z <= -3.4e+181)
		tmp = t_1;
	elseif (z <= -4.2e+158)
		tmp = t_2;
	elseif (z <= -4.8e+28)
		tmp = z * (y / t);
	elseif (z <= 4.5e-20)
		tmp = x;
	elseif (z <= 4.3e+76)
		tmp = t_1;
	elseif (z <= 1.95e+99)
		tmp = x;
	elseif ((z <= 5e+221) || ~((z <= 8e+272)))
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z / t), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(x / (-t)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.4e+181], t$95$1, If[LessEqual[z, -4.2e+158], t$95$2, If[LessEqual[z, -4.8e+28], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e-20], x, If[LessEqual[z, 4.3e+76], t$95$1, If[LessEqual[z, 1.95e+99], x, If[Or[LessEqual[z, 5e+221], N[Not[LessEqual[z, 8e+272]], $MachinePrecision]], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -4.2 \cdot 10^{+158}:\\
\;\;\;\;t_2\\

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

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

\mathbf{elif}\;z \leq 4.3 \cdot 10^{+76}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 5 \cdot 10^{+221} \lor \neg \left(z \leq 8 \cdot 10^{+272}\right):\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.40000000000000031e181 or 4.5000000000000001e-20 < z < 4.29999999999999978e76 or 1.94999999999999997e99 < z < 5.0000000000000002e221 or 8.0000000000000005e272 < z

    1. Initial program 88.0%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    5. Simplified68.8%

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

    if -3.40000000000000031e181 < z < -4.1999999999999998e158 or 5.0000000000000002e221 < z < 8.0000000000000005e272

    1. Initial program 90.1%

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{z \cdot \left(-x\right)}}{t} \]
    6. Step-by-step derivation
      1. frac-2neg79.6%

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

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

        \[\leadsto \left(-\color{blue}{\left(-z \cdot x\right)}\right) \cdot \frac{1}{-t} \]
      4. remove-double-neg79.4%

        \[\leadsto \color{blue}{\left(z \cdot x\right)} \cdot \frac{1}{-t} \]
    7. Applied egg-rr79.4%

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

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

        \[\leadsto z \cdot \color{blue}{\frac{x \cdot 1}{-t}} \]
      3. *-rgt-identity88.6%

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

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

    if -4.1999999999999998e158 < z < -4.79999999999999962e28

    1. Initial program 86.1%

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
    4. Step-by-step derivation
      1. associate-*l/85.8%

        \[\leadsto \color{blue}{\frac{y}{t} \cdot z} \]
      2. *-commutative85.8%

        \[\leadsto \color{blue}{z \cdot \frac{y}{t}} \]
    5. Simplified85.8%

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

    if -4.79999999999999962e28 < z < 4.5000000000000001e-20 or 4.29999999999999978e76 < z < 1.94999999999999997e99

    1. Initial program 98.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.4 \cdot 10^{+181}:\\ \;\;\;\;\frac{z}{t} \cdot y\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{+158}:\\ \;\;\;\;z \cdot \frac{x}{-t}\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{+28}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-20}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{+76}:\\ \;\;\;\;\frac{z}{t} \cdot y\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{+99}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+221} \lor \neg \left(z \leq 8 \cdot 10^{+272}\right):\\ \;\;\;\;\frac{z}{t} \cdot y\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x}{-t}\\ \end{array} \]

Alternative 4: 49.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z}{t} \cdot y\\ \mathbf{if}\;y \leq -4.1 \cdot 10^{+180}:\\ \;\;\;\;\frac{z \cdot y}{t}\\ \mathbf{elif}\;y \leq -5.8 \cdot 10^{+149}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{+17}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -2.4 \cdot 10^{-193}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 92000000:\\ \;\;\;\;\frac{z}{t} \cdot \left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (/ z t) y)))
   (if (<= y -4.1e+180)
     (/ (* z y) t)
     (if (<= y -5.8e+149)
       x
       (if (<= y -1.2e+17)
         t_1
         (if (<= y -2.4e-193)
           x
           (if (<= y 92000000.0) (* (/ z t) (- x)) t_1)))))))
double code(double x, double y, double z, double t) {
	double t_1 = (z / t) * y;
	double tmp;
	if (y <= -4.1e+180) {
		tmp = (z * y) / t;
	} else if (y <= -5.8e+149) {
		tmp = x;
	} else if (y <= -1.2e+17) {
		tmp = t_1;
	} else if (y <= -2.4e-193) {
		tmp = x;
	} else if (y <= 92000000.0) {
		tmp = (z / t) * -x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (z / t) * y
    if (y <= (-4.1d+180)) then
        tmp = (z * y) / t
    else if (y <= (-5.8d+149)) then
        tmp = x
    else if (y <= (-1.2d+17)) then
        tmp = t_1
    else if (y <= (-2.4d-193)) then
        tmp = x
    else if (y <= 92000000.0d0) then
        tmp = (z / t) * -x
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (z / t) * y;
	double tmp;
	if (y <= -4.1e+180) {
		tmp = (z * y) / t;
	} else if (y <= -5.8e+149) {
		tmp = x;
	} else if (y <= -1.2e+17) {
		tmp = t_1;
	} else if (y <= -2.4e-193) {
		tmp = x;
	} else if (y <= 92000000.0) {
		tmp = (z / t) * -x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (z / t) * y
	tmp = 0
	if y <= -4.1e+180:
		tmp = (z * y) / t
	elif y <= -5.8e+149:
		tmp = x
	elif y <= -1.2e+17:
		tmp = t_1
	elif y <= -2.4e-193:
		tmp = x
	elif y <= 92000000.0:
		tmp = (z / t) * -x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(z / t) * y)
	tmp = 0.0
	if (y <= -4.1e+180)
		tmp = Float64(Float64(z * y) / t);
	elseif (y <= -5.8e+149)
		tmp = x;
	elseif (y <= -1.2e+17)
		tmp = t_1;
	elseif (y <= -2.4e-193)
		tmp = x;
	elseif (y <= 92000000.0)
		tmp = Float64(Float64(z / t) * Float64(-x));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (z / t) * y;
	tmp = 0.0;
	if (y <= -4.1e+180)
		tmp = (z * y) / t;
	elseif (y <= -5.8e+149)
		tmp = x;
	elseif (y <= -1.2e+17)
		tmp = t_1;
	elseif (y <= -2.4e-193)
		tmp = x;
	elseif (y <= 92000000.0)
		tmp = (z / t) * -x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z / t), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -4.1e+180], N[(N[(z * y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, -5.8e+149], x, If[LessEqual[y, -1.2e+17], t$95$1, If[LessEqual[y, -2.4e-193], x, If[LessEqual[y, 92000000.0], N[(N[(z / t), $MachinePrecision] * (-x)), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -5.8 \cdot 10^{+149}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq -1.2 \cdot 10^{+17}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -2.4 \cdot 10^{-193}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.1e180

    1. Initial program 93.1%

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

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

      \[\leadsto \frac{\color{blue}{y \cdot z}}{t} \]
    4. Step-by-step derivation
      1. *-commutative68.1%

        \[\leadsto \frac{\color{blue}{z \cdot y}}{t} \]
    5. Simplified68.1%

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

    if -4.1e180 < y < -5.8000000000000004e149 or -1.2e17 < y < -2.4e-193

    1. Initial program 99.9%

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

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

    if -5.8000000000000004e149 < y < -1.2e17 or 9.2e7 < y

    1. Initial program 90.0%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    5. Simplified67.6%

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

    if -2.4e-193 < y < 9.2e7

    1. Initial program 93.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.1 \cdot 10^{+180}:\\ \;\;\;\;\frac{z \cdot y}{t}\\ \mathbf{elif}\;y \leq -5.8 \cdot 10^{+149}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{+17}:\\ \;\;\;\;\frac{z}{t} \cdot y\\ \mathbf{elif}\;y \leq -2.4 \cdot 10^{-193}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 92000000:\\ \;\;\;\;\frac{z}{t} \cdot \left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{t} \cdot y\\ \end{array} \]

Alternative 5: 74.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{+44} \lor \neg \left(x \leq -1.6 \cdot 10^{-5} \lor \neg \left(x \leq -1.9 \cdot 10^{-95}\right) \land x \leq 4.7 \cdot 10^{-91}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{z}{t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.8e44 or -1.59999999999999993e-5 < x < -1.8999999999999999e-95 or 4.70000000000000006e-91 < x

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

    if -1.8e44 < x < -1.59999999999999993e-5 or -1.8999999999999999e-95 < x < 4.70000000000000006e-91

    1. Initial program 92.8%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    5. Simplified72.5%

      \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification81.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.8 \cdot 10^{+44} \lor \neg \left(x \leq -1.6 \cdot 10^{-5} \lor \neg \left(x \leq -1.9 \cdot 10^{-95}\right) \land x \leq 4.7 \cdot 10^{-91}\right):\\ \;\;\;\;x \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{t} \cdot y\\ \end{array} \]

Alternative 6: 77.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.4 \cdot 10^{+44} \lor \neg \left(x \leq -2.6 \cdot 10^{-63} \lor \neg \left(x \leq -2.8 \cdot 10^{-81}\right) \land x \leq 5.8 \cdot 10^{-75}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{z}{t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.4e44 or -2.6000000000000001e-63 < x < -2.7999999999999999e-81 or 5.8000000000000003e-75 < x

    1. Initial program 93.1%

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

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

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

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

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

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

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

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

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

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

    if -3.4e44 < x < -2.6000000000000001e-63 or -2.7999999999999999e-81 < x < 5.8000000000000003e-75

    1. Initial program 94.1%

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

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

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

        \[\leadsto \color{blue}{\frac{z}{t} \cdot \left(y - x\right)} \]
    4. Applied egg-rr75.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.4 \cdot 10^{+44} \lor \neg \left(x \leq -2.6 \cdot 10^{-63} \lor \neg \left(x \leq -2.8 \cdot 10^{-81}\right) \land x \leq 5.8 \cdot 10^{-75}\right):\\ \;\;\;\;x \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{t} \cdot \left(y - x\right)\\ \end{array} \]

Alternative 7: 54.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+29} \lor \neg \left(z \leq 4.6 \cdot 10^{-20}\right) \land \left(z \leq 4.3 \cdot 10^{+76} \lor \neg \left(z \leq 1.95 \cdot 10^{+99}\right)\right):\\
\;\;\;\;\frac{z}{t} \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.5e29 or 4.5999999999999998e-20 < z < 4.29999999999999978e76 or 1.94999999999999997e99 < z

    1. Initial program 88.1%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    5. Simplified66.0%

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

    if -1.5e29 < z < 4.5999999999999998e-20 or 4.29999999999999978e76 < z < 1.94999999999999997e99

    1. Initial program 98.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{+29} \lor \neg \left(z \leq 4.6 \cdot 10^{-20}\right) \land \left(z \leq 4.3 \cdot 10^{+76} \lor \neg \left(z \leq 1.95 \cdot 10^{+99}\right)\right):\\ \;\;\;\;\frac{z}{t} \cdot y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 8: 94.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{-101} \lor \neg \left(z \leq 6 \cdot 10^{-95}\right):\\
\;\;\;\;x + z \cdot \frac{y - x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.4999999999999996e-101 or 6e-95 < z

    1. Initial program 90.3%

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

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

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

    if -6.4999999999999996e-101 < z < 6e-95

    1. Initial program 98.8%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{z \cdot y}}{t} \]
    6. Simplified92.0%

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

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

Alternative 9: 86.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{-49} \lor \neg \left(y \leq 84000\right):\\
\;\;\;\;x + \frac{z}{t} \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.50000000000000006e-49 or 84000 < y

    1. Initial program 92.3%

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

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

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

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

    if -9.50000000000000006e-49 < y < 84000

    1. Initial program 95.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 86.0% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 89.9%

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

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

        \[\leadsto \color{blue}{\frac{y}{t} \cdot z} \]
      2. *-commutative56.7%

        \[\leadsto \color{blue}{z \cdot \frac{y}{t}} \]
    4. Simplified89.3%

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

        \[\leadsto x + \color{blue}{\frac{z \cdot y}{t}} \]
      2. *-commutative86.8%

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

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

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

    if -1.95e-48 < y < 11000

    1. Initial program 95.4%

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

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

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

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

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

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

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

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

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

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

    if 11000 < y

    1. Initial program 95.4%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    4. Simplified96.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.95 \cdot 10^{-48}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;y \leq 11000:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{t} \cdot y\\ \end{array} \]

Alternative 11: 93.4% accurate, 1.0× speedup?

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

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

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

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

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

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

      \[\leadsto x + z \cdot \color{blue}{\frac{1}{\frac{t}{y - x}}} \]
    3. un-div-inv93.3%

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

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

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

Alternative 12: 97.9% accurate, 1.0× speedup?

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

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

    \[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}{\frac{t}{z}}} \]
  3. Simplified98.6%

    \[\leadsto \color{blue}{x + \frac{y - x}{\frac{t}{z}}} \]
  4. Final simplification98.6%

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

Alternative 13: 38.5% 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 93.5%

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

    \[\leadsto \color{blue}{x} \]
  3. Final simplification39.2%

    \[\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 2023240 
(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)))