Numeric.Histogram:binBounds from Chart-1.5.3

Percentage Accurate: 92.9% → 98.3%
Time: 9.1s
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.9% 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.3% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.8499999999999999e-41

    1. Initial program 88.0%

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

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

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

    if -3.8499999999999999e-41 < t < 7.1999999999999996e-23

    1. Initial program 98.4%

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

    if 7.1999999999999996e-23 < t

    1. Initial program 82.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.85 \cdot 10^{-41}:\\ \;\;\;\;x + z \cdot \frac{y - x}{t}\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{-23}:\\ \;\;\;\;x + \frac{z \cdot \left(y - x\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{\frac{t}{y - x}}\\ \end{array} \]

Alternative 2: 97.4% 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 91.5%

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

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

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

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

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

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

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

Alternative 3: 54.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z}{t} \cdot y\\ \mathbf{if}\;t \leq -9 \cdot 10^{-27}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{-306}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{-252}:\\ \;\;\;\;\frac{z \cdot \left(-x\right)}{t}\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{-184}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-93}:\\ \;\;\;\;z \cdot \frac{-x}{t}\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{+33}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (/ z t) y)))
   (if (<= t -9e-27)
     x
     (if (<= t -2.5e-306)
       t_1
       (if (<= t 2.8e-252)
         (/ (* z (- x)) t)
         (if (<= t 4.1e-184)
           t_1
           (if (<= t 1.15e-93)
             (* z (/ (- x) t))
             (if (<= t 1.45e+33) t_1 x))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (z / t) * y;
	double tmp;
	if (t <= -9e-27) {
		tmp = x;
	} else if (t <= -2.5e-306) {
		tmp = t_1;
	} else if (t <= 2.8e-252) {
		tmp = (z * -x) / t;
	} else if (t <= 4.1e-184) {
		tmp = t_1;
	} else if (t <= 1.15e-93) {
		tmp = z * (-x / t);
	} else if (t <= 1.45e+33) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = (z / t) * y
    if (t <= (-9d-27)) then
        tmp = x
    else if (t <= (-2.5d-306)) then
        tmp = t_1
    else if (t <= 2.8d-252) then
        tmp = (z * -x) / t
    else if (t <= 4.1d-184) then
        tmp = t_1
    else if (t <= 1.15d-93) then
        tmp = z * (-x / t)
    else if (t <= 1.45d+33) then
        tmp = t_1
    else
        tmp = x
    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 (t <= -9e-27) {
		tmp = x;
	} else if (t <= -2.5e-306) {
		tmp = t_1;
	} else if (t <= 2.8e-252) {
		tmp = (z * -x) / t;
	} else if (t <= 4.1e-184) {
		tmp = t_1;
	} else if (t <= 1.15e-93) {
		tmp = z * (-x / t);
	} else if (t <= 1.45e+33) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (z / t) * y
	tmp = 0
	if t <= -9e-27:
		tmp = x
	elif t <= -2.5e-306:
		tmp = t_1
	elif t <= 2.8e-252:
		tmp = (z * -x) / t
	elif t <= 4.1e-184:
		tmp = t_1
	elif t <= 1.15e-93:
		tmp = z * (-x / t)
	elif t <= 1.45e+33:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(z / t) * y)
	tmp = 0.0
	if (t <= -9e-27)
		tmp = x;
	elseif (t <= -2.5e-306)
		tmp = t_1;
	elseif (t <= 2.8e-252)
		tmp = Float64(Float64(z * Float64(-x)) / t);
	elseif (t <= 4.1e-184)
		tmp = t_1;
	elseif (t <= 1.15e-93)
		tmp = Float64(z * Float64(Float64(-x) / t));
	elseif (t <= 1.45e+33)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (z / t) * y;
	tmp = 0.0;
	if (t <= -9e-27)
		tmp = x;
	elseif (t <= -2.5e-306)
		tmp = t_1;
	elseif (t <= 2.8e-252)
		tmp = (z * -x) / t;
	elseif (t <= 4.1e-184)
		tmp = t_1;
	elseif (t <= 1.15e-93)
		tmp = z * (-x / t);
	elseif (t <= 1.45e+33)
		tmp = t_1;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z / t), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t, -9e-27], x, If[LessEqual[t, -2.5e-306], t$95$1, If[LessEqual[t, 2.8e-252], N[(N[(z * (-x)), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 4.1e-184], t$95$1, If[LessEqual[t, 1.15e-93], N[(z * N[((-x) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.45e+33], t$95$1, x]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -2.5 \cdot 10^{-306}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 2.8 \cdot 10^{-252}:\\
\;\;\;\;\frac{z \cdot \left(-x\right)}{t}\\

\mathbf{elif}\;t \leq 4.1 \cdot 10^{-184}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.15 \cdot 10^{-93}:\\
\;\;\;\;z \cdot \frac{-x}{t}\\

\mathbf{elif}\;t \leq 1.45 \cdot 10^{+33}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -9.0000000000000003e-27 or 1.45000000000000012e33 < t

    1. Initial program 83.9%

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

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

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

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

    if -9.0000000000000003e-27 < t < -2.49999999999999999e-306 or 2.80000000000000018e-252 < t < 4.1e-184 or 1.1499999999999999e-93 < t < 1.45000000000000012e33

    1. Initial program 99.1%

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

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\frac{1}{\frac{t}{y}}} \]
      2. un-div-inv50.8%

        \[\leadsto \color{blue}{\frac{z}{\frac{t}{y}}} \]
    7. Applied egg-rr50.8%

      \[\leadsto \color{blue}{\frac{z}{\frac{t}{y}}} \]
    8. Step-by-step derivation
      1. associate-/r/60.8%

        \[\leadsto \color{blue}{\frac{z}{t} \cdot y} \]
    9. Applied egg-rr60.8%

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

    if -2.49999999999999999e-306 < t < 2.80000000000000018e-252

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

      \[\leadsto z \cdot \color{blue}{\frac{y - x}{t}} \]
    8. Step-by-step derivation
      1. clear-num84.1%

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

        \[\leadsto \color{blue}{\frac{z}{\frac{t}{y - x}}} \]
    9. Applied egg-rr84.3%

      \[\leadsto \color{blue}{\frac{z}{\frac{t}{y - x}}} \]
    10. Taylor expanded in y around 0 95.9%

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

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

        \[\leadsto \frac{\color{blue}{-x \cdot z}}{t} \]
      3. distribute-lft-neg-out95.9%

        \[\leadsto \frac{\color{blue}{\left(-x\right) \cdot z}}{t} \]
    12. Simplified95.9%

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

    if 4.1e-184 < t < 1.1499999999999999e-93

    1. Initial program 93.8%

      \[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. Taylor expanded in z around inf 76.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9 \cdot 10^{-27}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{-306}:\\ \;\;\;\;\frac{z}{t} \cdot y\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{-252}:\\ \;\;\;\;\frac{z \cdot \left(-x\right)}{t}\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{-184}:\\ \;\;\;\;\frac{z}{t} \cdot y\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-93}:\\ \;\;\;\;z \cdot \frac{-x}{t}\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{+33}:\\ \;\;\;\;\frac{z}{t} \cdot y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 4: 95.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.8 \cdot 10^{-225} \lor \neg \left(z \leq 4.5 \cdot 10^{-140}\right):\\
\;\;\;\;x + z \cdot \frac{y - x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.8000000000000001e-225 or 4.50000000000000004e-140 < z

    1. Initial program 89.0%

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

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

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

    if -7.8000000000000001e-225 < z < 4.50000000000000004e-140

    1. Initial program 99.8%

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

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

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

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

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

Alternative 5: 95.1% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 88.3%

      \[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}{t} \cdot z} \]
    3. Simplified97.2%

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

    if -7.8000000000000001e-225 < z < 5.1999999999999996e-140

    1. Initial program 99.8%

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

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

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

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

    if 5.1999999999999996e-140 < z

    1. Initial program 89.7%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.8 \cdot 10^{-225}:\\ \;\;\;\;x + z \cdot \frac{y - x}{t}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-140}:\\ \;\;\;\;x + \frac{z \cdot y}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{\frac{t}{y - x}}\\ \end{array} \]

Alternative 6: 72.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{-24} \lor \neg \left(z \leq 7.5 \cdot 10^{-58}\right):\\
\;\;\;\;z \cdot \frac{y - x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.0999999999999999e-24 or 7.50000000000000002e-58 < z

    1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

    if -2.0999999999999999e-24 < z < 7.50000000000000002e-58

    1. Initial program 98.4%

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

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

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

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

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

Alternative 7: 83.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -110000 \lor \neg \left(z \leq 9.2 \cdot 10^{-58}\right):\\
\;\;\;\;z \cdot \frac{y - x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.1e5 or 9.1999999999999995e-58 < z

    1. Initial program 84.3%

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

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

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

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

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

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

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

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

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

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

    if -1.1e5 < z < 9.1999999999999995e-58

    1. Initial program 98.5%

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

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

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

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

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

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

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

Alternative 8: 83.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -85000 \lor \neg \left(z \leq 8.8 \cdot 10^{-58}\right):\\
\;\;\;\;z \cdot \frac{y - x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -85000 or 8.80000000000000023e-58 < z

    1. Initial program 84.3%

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

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

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

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

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

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

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

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

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

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

    if -85000 < z < 8.80000000000000023e-58

    1. Initial program 98.5%

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

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

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

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

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

Alternative 9: 85.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{-57} \lor \neg \left(y \leq 5.5 \cdot 10^{+67}\right):\\
\;\;\;\;x + \frac{z}{t} \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.2999999999999998e-57 or 5.49999999999999968e67 < y

    1. Initial program 89.1%

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

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

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

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

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

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

    if -3.2999999999999998e-57 < y < 5.49999999999999968e67

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 54.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{-20} \lor \neg \left(z \leq 1.08 \cdot 10^{-54}\right):\\
\;\;\;\;z \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.4999999999999996e-20 or 1.08000000000000002e-54 < z

    1. Initial program 85.2%

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

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

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

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

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

    if -5.4999999999999996e-20 < z < 1.08000000000000002e-54

    1. Initial program 98.4%

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

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

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

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

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

Alternative 11: 55.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{-23} \lor \neg \left(z \leq 1.02 \cdot 10^{-51}\right):\\
\;\;\;\;\frac{z}{t} \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.6e-23 or 1.01999999999999998e-51 < z

    1. Initial program 85.2%

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

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

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

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

      \[\leadsto z \cdot \color{blue}{\frac{y}{t}} \]
    6. Step-by-step derivation
      1. clear-num52.5%

        \[\leadsto z \cdot \color{blue}{\frac{1}{\frac{t}{y}}} \]
      2. un-div-inv52.6%

        \[\leadsto \color{blue}{\frac{z}{\frac{t}{y}}} \]
    7. Applied egg-rr52.6%

      \[\leadsto \color{blue}{\frac{z}{\frac{t}{y}}} \]
    8. Step-by-step derivation
      1. associate-/r/53.4%

        \[\leadsto \color{blue}{\frac{z}{t} \cdot y} \]
    9. Applied egg-rr53.4%

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

    if -2.6e-23 < z < 1.01999999999999998e-51

    1. Initial program 98.4%

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

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

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

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

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

Alternative 12: 97.4% 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 91.5%

    \[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. Final simplification97.3%

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

Alternative 13: 38.8% 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 91.5%

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

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

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

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

    \[\leadsto x \]

Developer target: 97.7% 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 2023290 
(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)))