Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3

Percentage Accurate: 84.6% → 96.6%
Time: 7.3s
Alternatives: 10
Speedup: 0.7×

Specification

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

\\
\frac{x \cdot \left(y - z\right)}{t - z}
\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: 84.6% accurate, 1.0× speedup?

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

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

Alternative 1: 96.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{-22} \lor \neg \left(z \leq 4.8 \cdot 10^{-101}\right):\\
\;\;\;\;\frac{x}{\frac{t - z}{y - z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.20000000000000001e-22 or 4.8e-101 < z

    1. Initial program 82.0%

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

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

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

    if -1.20000000000000001e-22 < z < 4.8e-101

    1. Initial program 91.2%

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

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

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

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

Alternative 2: 58.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+27}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq -2.9 \cdot 10^{-8}:\\
\;\;\;\;x \cdot \frac{y}{-z}\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.99999999999999976e27 or 7.9999999999999999e52 < z

    1. Initial program 78.9%

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

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

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

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

    if -2.99999999999999976e27 < z < -2.9000000000000002e-8

    1. Initial program 88.0%

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{z}{y - z}}} \]
      3. distribute-neg-frac77.2%

        \[\leadsto \color{blue}{\frac{-x}{\frac{z}{y - z}}} \]
    6. Simplified77.2%

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

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

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

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

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

        \[\leadsto -1 \cdot \color{blue}{\frac{y \cdot x}{z}} \]
      4. associate-*r/75.9%

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

        \[\leadsto \color{blue}{\frac{-1}{z} \cdot \left(y \cdot x\right)} \]
      6. metadata-eval75.9%

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

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

        \[\leadsto \frac{1}{\color{blue}{-z}} \cdot \left(y \cdot x\right) \]
      9. associate-*l*75.9%

        \[\leadsto \color{blue}{\left(\frac{1}{-z} \cdot y\right) \cdot x} \]
      10. associate-/r/75.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{-z}{y}}} \cdot x \]
      11. *-commutative75.7%

        \[\leadsto \color{blue}{x \cdot \frac{1}{\frac{-z}{y}}} \]
      12. associate-/r/75.9%

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

        \[\leadsto x \cdot \color{blue}{\frac{1 \cdot y}{-z}} \]
      14. *-lft-identity75.9%

        \[\leadsto x \cdot \frac{\color{blue}{y}}{-z} \]
    10. Simplified75.9%

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

    if -2.9000000000000002e-8 < z < -5.49999999999999975e-50

    1. Initial program 90.2%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{y}}} \]
    6. Simplified51.3%

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

    if -5.49999999999999975e-50 < z < -3.3000000000000003e-123

    1. Initial program 76.0%

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

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

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

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

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

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

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

        \[\leadsto \frac{-\color{blue}{z \cdot x}}{t} \]
      4. distribute-lft-neg-out53.2%

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

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

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

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

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

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

    if -3.3000000000000003e-123 < z < 7.9999999999999999e52

    1. Initial program 92.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{y}}} \]
    6. Simplified63.0%

      \[\leadsto \color{blue}{\frac{x}{\frac{t}{y}}} \]
    7. Step-by-step derivation
      1. associate-/r/69.0%

        \[\leadsto \color{blue}{\frac{x}{t} \cdot y} \]
    8. Applied egg-rr69.0%

      \[\leadsto \color{blue}{\frac{x}{t} \cdot y} \]
    9. Step-by-step derivation
      1. *-commutative69.0%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{x}}} \]
    10. Applied egg-rr69.1%

      \[\leadsto \color{blue}{\frac{y}{\frac{t}{x}}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification67.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+27}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -2.9 \cdot 10^{-8}:\\ \;\;\;\;x \cdot \frac{y}{-z}\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-50}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{-123}:\\ \;\;\;\;z \cdot \frac{-x}{t}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+52}:\\ \;\;\;\;\frac{y}{\frac{t}{x}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 3: 67.3% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -1.3 \cdot 10^{-41}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.60000000000000043e27 or 1.30000000000000001e65 < z

    1. Initial program 77.9%

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

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

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

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

    if -7.60000000000000043e27 < z < -1.3e-41 or -1.17999999999999999e-172 < z < 1.30000000000000001e65

    1. Initial program 93.0%

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

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

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

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

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

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

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

    if -1.3e-41 < z < -1.17999999999999999e-172

    1. Initial program 77.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.6 \cdot 10^{+27}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{-41}:\\ \;\;\;\;y \cdot \frac{x}{t - z}\\ \mathbf{elif}\;z \leq -1.18 \cdot 10^{-172}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+65}:\\ \;\;\;\;y \cdot \frac{x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 4: 74.3% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.10000000000000014e-41 or 7.60000000000000001e48 < z

    1. Initial program 80.4%

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{z}{y - z}}} \]
      3. distribute-neg-frac80.0%

        \[\leadsto \color{blue}{\frac{-x}{\frac{z}{y - z}}} \]
    6. Simplified80.0%

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

    if -4.10000000000000014e-41 < z < -8.6000000000000006e-173

    1. Initial program 77.5%

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

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

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

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

    if -8.6000000000000006e-173 < z < 7.60000000000000001e48

    1. Initial program 93.3%

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

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

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

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

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

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

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

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

Alternative 5: 59.8% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -4.6 \cdot 10^{-7}:\\
\;\;\;\;x \cdot \frac{y}{-z}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.3000000000000001e27 or 7.60000000000000001e48 < z

    1. Initial program 78.9%

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

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

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

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

    if -2.3000000000000001e27 < z < -4.5999999999999999e-7

    1. Initial program 88.0%

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{z}{y - z}}} \]
      3. distribute-neg-frac77.2%

        \[\leadsto \color{blue}{\frac{-x}{\frac{z}{y - z}}} \]
    6. Simplified77.2%

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

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

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

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

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

        \[\leadsto -1 \cdot \color{blue}{\frac{y \cdot x}{z}} \]
      4. associate-*r/75.9%

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

        \[\leadsto \color{blue}{\frac{-1}{z} \cdot \left(y \cdot x\right)} \]
      6. metadata-eval75.9%

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

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

        \[\leadsto \frac{1}{\color{blue}{-z}} \cdot \left(y \cdot x\right) \]
      9. associate-*l*75.9%

        \[\leadsto \color{blue}{\left(\frac{1}{-z} \cdot y\right) \cdot x} \]
      10. associate-/r/75.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{-z}{y}}} \cdot x \]
      11. *-commutative75.7%

        \[\leadsto \color{blue}{x \cdot \frac{1}{\frac{-z}{y}}} \]
      12. associate-/r/75.9%

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

        \[\leadsto x \cdot \color{blue}{\frac{1 \cdot y}{-z}} \]
      14. *-lft-identity75.9%

        \[\leadsto x \cdot \frac{\color{blue}{y}}{-z} \]
    10. Simplified75.9%

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

    if -4.5999999999999999e-7 < z < -2.20000000000000002e-72

    1. Initial program 86.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{y}}} \]
    6. Simplified42.4%

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

    if -2.20000000000000002e-72 < z < 7.60000000000000001e48

    1. Initial program 91.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{y}}} \]
    6. Simplified62.1%

      \[\leadsto \color{blue}{\frac{x}{\frac{t}{y}}} \]
    7. Step-by-step derivation
      1. associate-/r/66.9%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{x}{t}} \]
      2. clear-num66.9%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{x}}} \]
    10. Applied egg-rr67.0%

      \[\leadsto \color{blue}{\frac{y}{\frac{t}{x}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification65.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+27}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{-7}:\\ \;\;\;\;x \cdot \frac{y}{-z}\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-72}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 7.6 \cdot 10^{+48}:\\ \;\;\;\;\frac{y}{\frac{t}{x}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 6: 72.8% accurate, 0.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.0500000000000001e-42 or 2.99999999999999998e53 < z

    1. Initial program 80.4%

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{z}{y - z}}} \]
      3. distribute-neg-frac80.0%

        \[\leadsto \color{blue}{\frac{-x}{\frac{z}{y - z}}} \]
    6. Simplified80.0%

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot y}{z}} \]
    8. Step-by-step derivation
      1. mul-1-neg74.6%

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

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

        \[\leadsto x - \color{blue}{\frac{x}{z} \cdot y} \]
      4. *-commutative78.5%

        \[\leadsto x - \color{blue}{y \cdot \frac{x}{z}} \]
    9. Simplified78.5%

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

    if -2.0500000000000001e-42 < z < -1.65e-172

    1. Initial program 77.5%

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

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

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

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

    if -1.65e-172 < z < 2.99999999999999998e53

    1. Initial program 93.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.05 \cdot 10^{-42}:\\ \;\;\;\;x - y \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{-172}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+53}:\\ \;\;\;\;y \cdot \frac{x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \frac{x}{z}\\ \end{array} \]

Alternative 7: 89.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.45 \cdot 10^{+188} \lor \neg \left(z \leq 4 \cdot 10^{+97}\right):\\
\;\;\;\;\frac{-x}{\frac{z}{y - z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.45e188 or 4.0000000000000003e97 < z

    1. Initial program 71.1%

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{z}{y - z}}} \]
      3. distribute-neg-frac91.3%

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

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

    if -2.45e188 < z < 4.0000000000000003e97

    1. Initial program 91.0%

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

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

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

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

Alternative 8: 67.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+27}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.5e27 or 7.99999999999999956e66 < z

    1. Initial program 77.9%

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

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

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

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

    if -8.5e27 < z < 7.99999999999999956e66

    1. Initial program 91.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+27}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+66}:\\ \;\;\;\;y \cdot \frac{x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 9: 59.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+18}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.5e18 or 4.8e53 < z

    1. Initial program 79.1%

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

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

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

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

    if -1.5e18 < z < 4.8e53

    1. Initial program 90.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{y}}} \]
    6. Simplified59.3%

      \[\leadsto \color{blue}{\frac{x}{\frac{t}{y}}} \]
    7. Step-by-step derivation
      1. associate-/r/62.3%

        \[\leadsto \color{blue}{\frac{x}{t} \cdot y} \]
    8. Applied egg-rr62.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{+18}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{+53}:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 10: 33.8% accurate, 9.0× speedup?

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification34.3%

    \[\leadsto x \]

Developer target: 97.0% accurate, 1.0× speedup?

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

\\
\frac{x}{\frac{t - z}{y - z}}
\end{array}

Reproduce

?
herbie shell --seed 2023318 
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (/ x (/ (- t z) (- y z)))

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