Numeric.Histogram:binBounds from Chart-1.5.3

Percentage Accurate: 92.6% → 97.8%
Time: 7.7s
Alternatives: 10
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 10 alternatives:

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

Initial Program: 92.6% 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.8% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 87.4%

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

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

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

    if -1.30000000000000002e-135 < z < 2e21

    1. Initial program 98.9%

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

    if 2e21 < z

    1. Initial program 83.2%

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

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

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

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

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

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

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

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

Alternative 2: 95.1% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.0000000000000002e-136 or 2.89999999999999997e-140 < z

    1. Initial program 87.8%

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

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

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

    if -5.0000000000000002e-136 < z < 2.89999999999999997e-140

    1. Initial program 98.5%

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

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

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

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

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

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

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

Alternative 3: 95.1% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 87.4%

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

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

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

    if -5.39999999999999997e-135 < z < 7.5000000000000001e-139

    1. Initial program 98.5%

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

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

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

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

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

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

    if 7.5000000000000001e-139 < z

    1. Initial program 88.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.4 \cdot 10^{-135}:\\ \;\;\;\;x + z \cdot \frac{y - x}{t}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-139}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{\frac{t}{y - x}}\\ \end{array} \]

Alternative 4: 86.4% accurate, 0.8× speedup?

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

    1. Initial program 86.6%

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

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

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

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

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

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

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

    if -8.2e58 < x < 8.4999999999999995e54

    1. Initial program 93.4%

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

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

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

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

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

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

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

Alternative 5: 86.4% accurate, 0.8× speedup?

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

    1. Initial program 86.6%

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

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

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

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

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

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

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

    if -2.00000000000000018e56 < x < 6.2e52

    1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

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

Alternative 6: 50.9% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{+63} \lor \neg \left(z \leq 6 \cdot 10^{-32}\right):\\
\;\;\;\;x \cdot \left(-\frac{z}{t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.9e63 or 6.0000000000000001e-32 < z

    1. Initial program 83.2%

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

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

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

        \[\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.5%

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

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

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

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

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

      \[\leadsto x + \color{blue}{\left(-\frac{x}{\frac{t}{z}}\right)} \]
    9. Taylor expanded in t around 0 40.1%

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

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

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

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

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

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

    if -3.9e63 < z < 6.0000000000000001e-32

    1. Initial program 98.0%

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

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

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

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

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

Alternative 7: 50.6% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;z \leq 4.6 \cdot 10^{-32}:\\
\;\;\;\;x\\

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


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

    1. Initial program 78.4%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\left(-\frac{x}{\frac{t}{z}}\right)} \]
    9. Taylor expanded in t around 0 33.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.49999999999999998e62 < z < 4.6000000000000001e-32

    1. Initial program 98.0%

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

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

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

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

    if 4.6000000000000001e-32 < z

    1. Initial program 86.3%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\left(-\frac{x}{\frac{t}{z}}\right)} \]
    9. Taylor expanded in t around 0 44.3%

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

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

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

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

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

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

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

Alternative 8: 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 90.8%

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

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

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

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

Alternative 9: 65.9% 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 90.8%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification33.9%

    \[\leadsto x \]

Developer target: 97.6% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

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