Numeric.Histogram:binBounds from Chart-1.5.3

Percentage Accurate: 92.8% → 96.4%
Time: 9.4s
Alternatives: 10
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 10 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.8% 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: 96.4% accurate, 0.6× speedup?

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

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

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


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

    1. Initial program 89.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.1e-197 < z

    1. Initial program 95.3%

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

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

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

Alternative 2: 94.7% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{-202} \lor \neg \left(z \leq 3.7 \cdot 10^{-200}\right):\\
\;\;\;\;x + z \cdot \frac{y - x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.4000000000000001e-202 or 3.70000000000000011e-200 < z

    1. Initial program 92.5%

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(y \cdot \frac{z}{t} + \color{blue}{\left(-x\right)} \cdot \frac{z}{t}\right) \]
      6. distribute-rgt-out96.8%

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

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

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

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

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

    if -2.4000000000000001e-202 < z < 3.70000000000000011e-200

    1. Initial program 94.9%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{-202} \lor \neg \left(z \leq 3.7 \cdot 10^{-200}\right):\\ \;\;\;\;x + z \cdot \frac{y - x}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 86.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.8 \cdot 10^{+15} \lor \neg \left(x \leq 1.6 \cdot 10^{+76}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{z}{t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -7.8e15 or 1.59999999999999988e76 < x

    1. Initial program 91.9%

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

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

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

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

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

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

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

    if -7.8e15 < x < 1.59999999999999988e76

    1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.8 \cdot 10^{+15} \lor \neg \left(x \leq 1.6 \cdot 10^{+76}\right):\\ \;\;\;\;x \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 86.1% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{-33} \lor \neg \left(y \leq 1.82 \cdot 10^{-59}\right):\\
\;\;\;\;x + y \cdot \frac{z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.29999999999999986e-33 or 1.8199999999999999e-59 < y

    1. Initial program 91.7%

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

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

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

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

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

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

    if -2.29999999999999986e-33 < y < 1.8199999999999999e-59

    1. Initial program 94.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.3 \cdot 10^{-33} \lor \neg \left(y \leq 1.82 \cdot 10^{-59}\right):\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{t}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 50.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+110} \lor \neg \left(z \leq 2.9 \cdot 10^{+96}\right):\\
\;\;\;\;x \cdot \frac{z}{-t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.59999999999999997e110 or 2.89999999999999978e96 < z

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

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

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

    if -1.59999999999999997e110 < z < 2.89999999999999978e96

    1. Initial program 94.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+110} \lor \neg \left(z \leq 2.9 \cdot 10^{+96}\right):\\ \;\;\;\;x \cdot \frac{z}{-t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 49.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{+111} \lor \neg \left(z \leq 1.65 \cdot 10^{+97}\right):\\
\;\;\;\;\frac{x}{t} \cdot \left(-z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.55e111 or 1.6500000000000001e97 < z

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{z \cdot \frac{x}{t}} \]
    12. Applied egg-rr45.3%

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

    if -1.55e111 < z < 1.6500000000000001e97

    1. Initial program 94.9%

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

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

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

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

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

Alternative 7: 97.7% 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 92.9%

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

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

    \[\leadsto \color{blue}{x + \left(y - x\right) \cdot \frac{z}{t}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. clear-num97.2%

      \[\leadsto x + \left(y - x\right) \cdot \color{blue}{\frac{1}{\frac{t}{z}}} \]
    2. un-div-inv97.6%

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

    \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
  7. Add Preprocessing

Alternative 8: 97.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \left(y - x\right) \cdot \frac{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(y - x) * Float64(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[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

    \[\leadsto \color{blue}{x + \left(y - x\right) \cdot \frac{z}{t}} \]
  4. Add Preprocessing
  5. Add Preprocessing

Alternative 9: 64.6% accurate, 1.3× speedup?

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

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

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

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

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

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

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

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

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

Alternative 10: 38.4% accurate, 9.0× speedup?

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

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

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

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

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

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

Developer Target 1: 97.7% accurate, 0.5× 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 2024145 
(FPCore (x y z t)
  :name "Numeric.Histogram:binBounds from Chart-1.5.3"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< x -1805102239106601/200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- x (* (/ z t) (- x y))) (if (< x 855006432740143/2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) t) z)) (+ x (/ (- y x) (/ t z))))))

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