Numeric.Histogram:binBounds from Chart-1.5.3

Percentage Accurate: 93.3% → 95.5%
Time: 7.0s
Alternatives: 13
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 93.3% 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: 95.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{\left(y - x\right) \cdot z}{t}\\ \mathbf{if}\;t_1 \leq 10^{+289}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{\frac{t}{y - x}}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (+ x (/ (* (- y x) z) t))))
   (if (<= t_1 1e+289) t_1 (+ x (/ z (/ t (- y x)))))))
double code(double x, double y, double z, double t) {
	double t_1 = x + (((y - x) * z) / t);
	double tmp;
	if (t_1 <= 1e+289) {
		tmp = t_1;
	} else {
		tmp = x + (z / (t / (y - x)));
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (((y - x) * z) / t)
    if (t_1 <= 1d+289) then
        tmp = t_1
    else
        tmp = x + (z / (t / (y - x)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x + (((y - x) * z) / t);
	double tmp;
	if (t_1 <= 1e+289) {
		tmp = t_1;
	} else {
		tmp = x + (z / (t / (y - x)));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x + (((y - x) * z) / t)
	tmp = 0
	if t_1 <= 1e+289:
		tmp = t_1
	else:
		tmp = x + (z / (t / (y - x)))
	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 <= 1e+289)
		tmp = t_1;
	else
		tmp = Float64(x + Float64(z / Float64(t / Float64(y - x))));
	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 <= 1e+289)
		tmp = t_1;
	else
		tmp = x + (z / (t / (y - x)));
	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[LessEqual[t$95$1, 1e+289], t$95$1, N[(x + N[(z / N[(t / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y x) z) t)) < 1.0000000000000001e289

    1. Initial program 97.0%

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

    if 1.0000000000000001e289 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) z) t))

    1. Initial program 83.5%

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

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

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

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

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

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

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

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

Alternative 2: 97.6% accurate, 0.1× speedup?

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

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

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

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t} + x} \]
    2. remove-double-neg94.6%

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

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

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

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

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

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

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

Alternative 3: 84.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.5 \cdot 10^{-75} \lor \neg \left(x \leq 1050\right):\\
\;\;\;\;x \cdot \left(1 - \frac{z}{t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.49999999999999989e-75 or 1050 < x

    1. Initial program 96.6%

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

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t} + x} \]
      2. remove-double-neg96.6%

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

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

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z}{t}} - \left(-x\right) \]
      5. fma-neg100.0%

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z}{t}, x\right)} \]
    4. Taylor expanded in y around 0 85.7%

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

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

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

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

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

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

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

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

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

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

    if -2.49999999999999989e-75 < x < 1050

    1. Initial program 91.9%

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

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

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

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

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

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

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

Alternative 4: 84.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.2 \cdot 10^{-75} \lor \neg \left(x \leq 620\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 -3.2e-75) (not (<= x 620.0)))
   (* x (- 1.0 (/ z t)))
   (+ x (/ y (/ t z)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -3.2e-75) || !(x <= 620.0)) {
		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 <= (-3.2d-75)) .or. (.not. (x <= 620.0d0))) 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 <= -3.2e-75) || !(x <= 620.0)) {
		tmp = x * (1.0 - (z / t));
	} else {
		tmp = x + (y / (t / z));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (x <= -3.2e-75) or not (x <= 620.0):
		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 <= -3.2e-75) || !(x <= 620.0))
		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 <= -3.2e-75) || ~((x <= 620.0)))
		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, -3.2e-75], N[Not[LessEqual[x, 620.0]], $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 -3.2 \cdot 10^{-75} \lor \neg \left(x \leq 620\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 < -3.19999999999999977e-75 or 620 < x

    1. Initial program 96.6%

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

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t} + x} \]
      2. remove-double-neg96.6%

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

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

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z}{t}} - \left(-x\right) \]
      5. fma-neg100.0%

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z}{t}, x\right)} \]
    4. Taylor expanded in y around 0 85.7%

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

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

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

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

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

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

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

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

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

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

    if -3.19999999999999977e-75 < x < 620

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

Alternative 5: 93.5% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 5.8000000000000001e183

    1. Initial program 94.1%

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

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

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

    if 5.8000000000000001e183 < x

    1. Initial program 100.0%

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

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t} + x} \]
      2. remove-double-neg100.0%

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

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

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z}{t}} - \left(-x\right) \]
      5. fma-neg100.0%

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z}{t}, x\right)} \]
    4. Taylor expanded in y around 0 100.0%

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{z}{t}\right)}\right) \]
      8. unsub-neg100.0%

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

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

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

Alternative 6: 94.0% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 1.1500000000000001e185

    1. Initial program 94.1%

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

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

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

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

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

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

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

    if 1.1500000000000001e185 < x

    1. Initial program 100.0%

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

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t} + x} \]
      2. remove-double-neg100.0%

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

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

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z}{t}} - \left(-x\right) \]
      5. fma-neg100.0%

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z}{t}, x\right)} \]
    4. Taylor expanded in y around 0 100.0%

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{z}{t}\right)}\right) \]
      8. unsub-neg100.0%

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

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

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

Alternative 7: 50.6% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{+60} \lor \neg \left(z \leq 3.2 \cdot 10^{+18}\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 < -8.2e60 or 3.2e18 < z

    1. Initial program 90.2%

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{z}{\color{blue}{\frac{-1 \cdot t}{x}}} \]
      2. neg-mul-165.5%

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

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

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

        \[\leadsto x + \color{blue}{\frac{z \cdot x}{-t}} \]
      3. remove-double-neg62.8%

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

        \[\leadsto x + \frac{-\color{blue}{z \cdot \left(-x\right)}}{-t} \]
      5. div-inv62.7%

        \[\leadsto x + \color{blue}{\left(-z \cdot \left(-x\right)\right) \cdot \frac{1}{-t}} \]
      6. add-sqr-sqrt35.9%

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

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

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

        \[\leadsto x + \left(-z \cdot \left(-x\right)\right) \cdot \frac{1}{\color{blue}{\sqrt{t} \cdot \sqrt{t}}} \]
      10. add-sqr-sqrt12.4%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{z}{-t} \cdot x} \]
      17. associate-/r/13.7%

        \[\leadsto x - \color{blue}{\frac{z}{\frac{-t}{x}}} \]
      18. div-inv13.7%

        \[\leadsto x - \color{blue}{z \cdot \frac{1}{\frac{-t}{x}}} \]
      19. clear-num13.7%

        \[\leadsto x - z \cdot \color{blue}{\frac{x}{-t}} \]
      20. add-sqr-sqrt6.6%

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

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

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

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

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

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

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

    if -8.2e60 < z < 3.2e18

    1. Initial program 97.7%

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

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t} + x} \]
      2. remove-double-neg97.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z}{t}, x\right)} \]
    4. Taylor expanded in z around 0 57.8%

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

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

Alternative 8: 50.7% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;z \leq 3.8 \cdot 10^{+18}:\\
\;\;\;\;x\\

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


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

    1. Initial program 89.6%

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{z}{\color{blue}{\frac{-1 \cdot t}{x}}} \]
      2. neg-mul-172.3%

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

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

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

        \[\leadsto x + \color{blue}{\frac{z \cdot x}{-t}} \]
      3. remove-double-neg70.2%

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

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

        \[\leadsto x + \color{blue}{\left(-z \cdot \left(-x\right)\right) \cdot \frac{1}{-t}} \]
      6. add-sqr-sqrt45.8%

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

        \[\leadsto x + \left(-z \cdot \left(-x\right)\right) \cdot \frac{1}{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}} \]
      8. sqr-neg48.5%

        \[\leadsto x + \left(-z \cdot \left(-x\right)\right) \cdot \frac{1}{\sqrt{\color{blue}{t \cdot t}}} \]
      9. sqrt-unprod4.6%

        \[\leadsto x + \left(-z \cdot \left(-x\right)\right) \cdot \frac{1}{\color{blue}{\sqrt{t} \cdot \sqrt{t}}} \]
      10. add-sqr-sqrt5.6%

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

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

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

        \[\leadsto x - \color{blue}{\frac{-z \cdot \left(-x\right)}{-t}} \]
      14. distribute-rgt-neg-out5.6%

        \[\leadsto x - \frac{-\color{blue}{\left(-z \cdot x\right)}}{-t} \]
      15. remove-double-neg5.6%

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

        \[\leadsto x - \color{blue}{\frac{z}{-t} \cdot x} \]
      17. associate-/r/6.5%

        \[\leadsto x - \color{blue}{\frac{z}{\frac{-t}{x}}} \]
      18. div-inv6.5%

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

        \[\leadsto x - z \cdot \color{blue}{\frac{x}{-t}} \]
      20. add-sqr-sqrt1.9%

        \[\leadsto x - z \cdot \frac{x}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}} \]
    10. Applied egg-rr72.3%

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

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

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

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

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

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

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

        \[\leadsto -\frac{-1}{-1} \cdot \color{blue}{\frac{z \cdot x}{t}} \]
      7. times-frac66.6%

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

        \[\leadsto -\frac{\color{blue}{-z \cdot x}}{-1 \cdot t} \]
      9. neg-mul-166.6%

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

        \[\leadsto -\color{blue}{\left(-\frac{z \cdot x}{-t}\right)} \]
      11. remove-double-neg66.6%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{-t}{z}}} \]
    13. Simplified66.6%

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

    if -2.30000000000000017e60 < z < 3.8e18

    1. Initial program 97.7%

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

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t} + x} \]
      2. remove-double-neg97.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z}{t}, x\right)} \]
    4. Taylor expanded in z around 0 57.8%

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

    if 3.8e18 < z

    1. Initial program 90.6%

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{z}{\color{blue}{\frac{-1 \cdot t}{x}}} \]
      2. neg-mul-160.3%

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

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

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

        \[\leadsto x + \color{blue}{\frac{z \cdot x}{-t}} \]
      3. remove-double-neg57.2%

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

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

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

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

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

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

        \[\leadsto x + \left(-z \cdot \left(-x\right)\right) \cdot \frac{1}{\color{blue}{\sqrt{t} \cdot \sqrt{t}}} \]
      10. add-sqr-sqrt17.6%

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

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

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

        \[\leadsto x - \color{blue}{\frac{-z \cdot \left(-x\right)}{-t}} \]
      14. distribute-rgt-neg-out17.6%

        \[\leadsto x - \frac{-\color{blue}{\left(-z \cdot x\right)}}{-t} \]
      15. remove-double-neg17.6%

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

        \[\leadsto x - \color{blue}{\frac{z}{-t} \cdot x} \]
      17. associate-/r/19.1%

        \[\leadsto x - \color{blue}{\frac{z}{\frac{-t}{x}}} \]
      18. div-inv19.1%

        \[\leadsto x - \color{blue}{z \cdot \frac{1}{\frac{-t}{x}}} \]
      19. clear-num19.1%

        \[\leadsto x - z \cdot \color{blue}{\frac{x}{-t}} \]
      20. add-sqr-sqrt10.2%

        \[\leadsto x - z \cdot \frac{x}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}} \]
    10. Applied egg-rr60.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+60}:\\ \;\;\;\;\frac{x}{\frac{-t}{z}}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+18}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t} \cdot \left(-z\right)\\ \end{array} \]

Alternative 9: 50.7% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;z \leq 1.45 \cdot 10^{+18}:\\
\;\;\;\;x\\

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


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

    1. Initial program 89.6%

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{z}{\color{blue}{\frac{-1 \cdot t}{x}}} \]
      2. neg-mul-172.3%

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

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

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

        \[\leadsto x + \color{blue}{\frac{z \cdot x}{-t}} \]
      3. remove-double-neg70.2%

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

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

        \[\leadsto x + \color{blue}{\left(-z \cdot \left(-x\right)\right) \cdot \frac{1}{-t}} \]
      6. add-sqr-sqrt45.8%

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

        \[\leadsto x + \left(-z \cdot \left(-x\right)\right) \cdot \frac{1}{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}} \]
      8. sqr-neg48.5%

        \[\leadsto x + \left(-z \cdot \left(-x\right)\right) \cdot \frac{1}{\sqrt{\color{blue}{t \cdot t}}} \]
      9. sqrt-unprod4.6%

        \[\leadsto x + \left(-z \cdot \left(-x\right)\right) \cdot \frac{1}{\color{blue}{\sqrt{t} \cdot \sqrt{t}}} \]
      10. add-sqr-sqrt5.6%

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

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

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

        \[\leadsto x - \color{blue}{\frac{-z \cdot \left(-x\right)}{-t}} \]
      14. distribute-rgt-neg-out5.6%

        \[\leadsto x - \frac{-\color{blue}{\left(-z \cdot x\right)}}{-t} \]
      15. remove-double-neg5.6%

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

        \[\leadsto x - \color{blue}{\frac{z}{-t} \cdot x} \]
      17. associate-/r/6.5%

        \[\leadsto x - \color{blue}{\frac{z}{\frac{-t}{x}}} \]
      18. div-inv6.5%

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

        \[\leadsto x - z \cdot \color{blue}{\frac{x}{-t}} \]
      20. add-sqr-sqrt1.9%

        \[\leadsto x - z \cdot \frac{x}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}} \]
    10. Applied egg-rr72.3%

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

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

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

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

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

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

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

        \[\leadsto -\frac{-1}{-1} \cdot \color{blue}{\frac{z \cdot x}{t}} \]
      7. times-frac66.6%

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

        \[\leadsto -\frac{\color{blue}{-z \cdot x}}{-1 \cdot t} \]
      9. neg-mul-166.6%

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

        \[\leadsto -\color{blue}{\left(-\frac{z \cdot x}{-t}\right)} \]
      11. remove-double-neg66.6%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{-t}{z}}} \]
    13. Simplified66.6%

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

    if -4.9000000000000003e64 < z < 1.45e18

    1. Initial program 97.7%

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

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t} + x} \]
      2. remove-double-neg97.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z}{t}, x\right)} \]
    4. Taylor expanded in z around 0 57.8%

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

    if 1.45e18 < z

    1. Initial program 90.6%

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{z}{\color{blue}{\frac{-1 \cdot t}{x}}} \]
      2. neg-mul-160.3%

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

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

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

        \[\leadsto x + \color{blue}{\frac{z \cdot x}{-t}} \]
      3. remove-double-neg57.2%

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

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

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

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

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

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

        \[\leadsto x + \left(-z \cdot \left(-x\right)\right) \cdot \frac{1}{\color{blue}{\sqrt{t} \cdot \sqrt{t}}} \]
      10. add-sqr-sqrt17.6%

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

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

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

        \[\leadsto x - \color{blue}{\frac{-z \cdot \left(-x\right)}{-t}} \]
      14. distribute-rgt-neg-out17.6%

        \[\leadsto x - \frac{-\color{blue}{\left(-z \cdot x\right)}}{-t} \]
      15. remove-double-neg17.6%

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

        \[\leadsto x - \color{blue}{\frac{z}{-t} \cdot x} \]
      17. associate-/r/19.1%

        \[\leadsto x - \color{blue}{\frac{z}{\frac{-t}{x}}} \]
      18. div-inv19.1%

        \[\leadsto x - \color{blue}{z \cdot \frac{1}{\frac{-t}{x}}} \]
      19. clear-num19.1%

        \[\leadsto x - z \cdot \color{blue}{\frac{x}{-t}} \]
      20. add-sqr-sqrt10.2%

        \[\leadsto x - z \cdot \frac{x}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}} \]
    10. Applied egg-rr60.3%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{\frac{t}{-x}}} \]
    13. Simplified46.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.9 \cdot 10^{+64}:\\ \;\;\;\;\frac{x}{\frac{-t}{z}}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+18}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{\frac{t}{-x}}\\ \end{array} \]

Alternative 10: 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 94.6%

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

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

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

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

Alternative 11: 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 94.6%

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

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t} + x} \]
    2. remove-double-neg94.6%

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

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

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

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z}{t}, x\right)} \]
  4. Step-by-step derivation
    1. fma-udef97.1%

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

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

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

Alternative 12: 65.1% 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 94.6%

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

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t} + x} \]
    2. remove-double-neg94.6%

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

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

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

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z}{t}, x\right)} \]
  4. Taylor expanded in y around 0 66.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 38.5% accurate, 9.0× speedup?

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

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

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

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t} + x} \]
    2. remove-double-neg94.6%

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

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

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

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z}{t}, x\right)} \]
  4. Taylor expanded in z around 0 38.6%

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

    \[\leadsto x \]

Developer target: 97.7% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024024 
(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)))