Numeric.Histogram:binBounds from Chart-1.5.3

Percentage Accurate: 93.0% → 97.7%
Time: 7.6s
Alternatives: 11
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 11 alternatives:

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

Initial Program: 93.0% 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: 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 91.1%

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

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

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

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

Alternative 2: 96.9% accurate, 0.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y x) z) t)) < -2.00000000000000011e301 or 1.99999999999999997e307 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) z) t))

    1. Initial program 75.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} - z \cdot \frac{x}{t} \]
      8. *-commutative77.5%

        \[\leadsto \frac{y}{\frac{t}{z}} - \color{blue}{\frac{x}{t} \cdot z} \]
      9. associate-/r/74.2%

        \[\leadsto \frac{y}{\frac{t}{z}} - \color{blue}{\frac{x}{\frac{t}{z}}} \]
      10. div-sub91.6%

        \[\leadsto \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
    5. Simplified91.6%

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

    if -2.00000000000000011e301 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) z) t)) < 1.99999999999999997e307

    1. Initial program 99.8%

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

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

Alternative 3: 84.9% accurate, 0.6× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.65e-12 or 4.6e64 < x

    1. Initial program 88.1%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - x \cdot \frac{z}{t}} \]
    5. Step-by-step derivation
      1. clear-num91.7%

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{t}{z}}} \]
    6. Applied egg-rr91.8%

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

    if -1.65e-12 < x < -2.19999999999999988e-87

    1. Initial program 88.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{\frac{t}{z}} - \color{blue}{\frac{x}{\frac{t}{z}}} \]
      10. div-sub94.0%

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

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

    if -2.19999999999999988e-87 < x < -1.91999999999999997e-295

    1. Initial program 91.3%

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

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

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

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

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

    if -1.91999999999999997e-295 < x < 4.6e64

    1. Initial program 97.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.65 \cdot 10^{-12}:\\ \;\;\;\;x - \frac{x}{\frac{t}{z}}\\ \mathbf{elif}\;x \leq -2.2 \cdot 10^{-87}:\\ \;\;\;\;\frac{y - x}{\frac{t}{z}}\\ \mathbf{elif}\;x \leq -1.92 \cdot 10^{-295}:\\ \;\;\;\;x + z \cdot \frac{y}{t}\\ \mathbf{elif}\;x \leq 4.6 \cdot 10^{+64}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x}{\frac{t}{z}}\\ \end{array} \]

Alternative 4: 50.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{z}{t} \cdot \left(-x\right)\\
\mathbf{if}\;z \leq -6 \cdot 10^{-16}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 6 \cdot 10^{-13}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.3 \cdot 10^{+287}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.99999999999999987e-16 or 5.99999999999999968e-13 < z < 1.3000000000000001e287

    1. Initial program 86.0%

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

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

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

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

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

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

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

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

    if -5.99999999999999987e-16 < z < 5.99999999999999968e-13

    1. Initial program 99.9%

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

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

    if 1.3000000000000001e287 < z

    1. Initial program 76.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{-16}:\\ \;\;\;\;\frac{z}{t} \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-13}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+287}:\\ \;\;\;\;\frac{z}{t} \cdot \left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \end{array} \]

Alternative 5: 50.8% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq 4.2 \cdot 10^{-13}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7.2000000000000002e-19

    1. Initial program 83.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-x}{\frac{t}{z}}} \]
      3. add-sqr-sqrt26.8%

        \[\leadsto \frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{\frac{t}{z}} \]
      4. sqrt-unprod25.2%

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{\frac{t}{z}} \]
      5. sqr-neg25.2%

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

        \[\leadsto \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{\frac{t}{z}} \]
      7. add-sqr-sqrt4.6%

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

        \[\leadsto \color{blue}{\frac{-x}{-\frac{t}{z}}} \]
      9. add-sqr-sqrt2.1%

        \[\leadsto \frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{-\frac{t}{z}} \]
      10. sqrt-unprod16.5%

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{-\frac{t}{z}} \]
      11. sqr-neg16.5%

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

        \[\leadsto \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{-\frac{t}{z}} \]
      13. add-sqr-sqrt48.7%

        \[\leadsto \frac{\color{blue}{x}}{-\frac{t}{z}} \]
      14. distribute-neg-frac48.7%

        \[\leadsto \frac{x}{\color{blue}{\frac{-t}{z}}} \]
    7. Applied egg-rr48.7%

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

    if -7.2000000000000002e-19 < z < 4.19999999999999977e-13

    1. Initial program 99.9%

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

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

    if 4.19999999999999977e-13 < z < 8.0000000000000001e292

    1. Initial program 88.4%

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

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

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

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

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

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

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

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

    if 8.0000000000000001e292 < z

    1. Initial program 76.5%

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

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

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

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

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

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

Alternative 6: 76.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq 2.3 \cdot 10^{+238} \lor \neg \left(z \leq 3.4 \cdot 10^{+293}\right):\\
\;\;\;\;x + y \cdot \frac{z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 2.30000000000000003e238 or 3.4000000000000003e293 < z

    1. Initial program 91.0%

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

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

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

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

    if 2.30000000000000003e238 < z < 3.4000000000000003e293

    1. Initial program 93.8%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-x}{\frac{t}{z}}} \]
      3. add-sqr-sqrt30.6%

        \[\leadsto \frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{\frac{t}{z}} \]
      4. sqrt-unprod31.2%

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{\frac{t}{z}} \]
      5. sqr-neg31.2%

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

        \[\leadsto \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{\frac{t}{z}} \]
      7. add-sqr-sqrt0.7%

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

        \[\leadsto \color{blue}{\frac{-x}{-\frac{t}{z}}} \]
      9. add-sqr-sqrt0.4%

        \[\leadsto \frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{-\frac{t}{z}} \]
      10. sqrt-unprod35.1%

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{-\frac{t}{z}} \]
      11. sqr-neg35.1%

        \[\leadsto \frac{\sqrt{\color{blue}{x \cdot x}}}{-\frac{t}{z}} \]
      12. sqrt-unprod41.1%

        \[\leadsto \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{-\frac{t}{z}} \]
      13. add-sqr-sqrt72.0%

        \[\leadsto \frac{\color{blue}{x}}{-\frac{t}{z}} \]
      14. distribute-neg-frac72.0%

        \[\leadsto \frac{x}{\color{blue}{\frac{-t}{z}}} \]
    7. Applied egg-rr72.0%

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

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

Alternative 7: 86.1% accurate, 0.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.2000000000000001e-26 or 9.50000000000000023e59 < x

    1. Initial program 88.4%

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

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

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

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

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

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

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

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

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

    if -3.2000000000000001e-26 < x < 9.50000000000000023e59

    1. Initial program 93.9%

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

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

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

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

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

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

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

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

Alternative 8: 86.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.1 \cdot 10^{-27} \lor \neg \left(x \leq 1.2 \cdot 10^{+66}\right):\\
\;\;\;\;x - \frac{x}{\frac{t}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.0999999999999998e-27 or 1.2000000000000001e66 < x

    1. Initial program 88.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.0999999999999998e-27 < x < 1.2000000000000001e66

    1. Initial program 93.9%

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

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

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

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

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

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

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

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

Alternative 9: 55.2% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.3999999999999999e-131 or 5.49999999999999979e-13 < z

    1. Initial program 86.6%

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

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

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

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

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

    if -4.3999999999999999e-131 < z < 5.49999999999999979e-13

    1. Initial program 100.0%

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

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

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

Alternative 10: 55.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{-131}:\\
\;\;\;\;y \cdot \frac{z}{t}\\

\mathbf{elif}\;z \leq 1.2 \cdot 10^{-13}:\\
\;\;\;\;x\\

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


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

    1. Initial program 85.9%

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

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

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

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

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

    if -4.3999999999999999e-131 < z < 1.1999999999999999e-13

    1. Initial program 100.0%

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

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

    if 1.1999999999999999e-13 < z

    1. Initial program 87.3%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification54.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.4 \cdot 10^{-131}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-13}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{t}{z}}\\ \end{array} \]

Alternative 11: 38.5% accurate, 9.0× speedup?

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

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

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

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

    \[\leadsto x \]

Developer target: 97.8% 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 2023196 
(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)))