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

Percentage Accurate: 84.2% → 96.9%
Time: 16.3s
Alternatives: 18
Speedup: 1.0×

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 18 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.2% 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.9% accurate, 1.0× speedup?

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

\\
x \cdot \frac{y - z}{t - z}
\end{array}
Derivation
  1. Initial program 86.5%

    \[\frac{x \cdot \left(y - z\right)}{t - z} \]
  2. Step-by-step derivation
    1. *-un-lft-identity86.5%

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

      \[\leadsto \color{blue}{\frac{x}{1} \cdot \frac{y - z}{t - z}} \]
  3. Applied egg-rr97.7%

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

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

Alternative 2: 58.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{\frac{t}{y}}\\ \mathbf{if}\;z \leq -2.4 \cdot 10^{+57}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{+27}:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-6}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{-61}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.16 \cdot 10^{-66}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-150}:\\ \;\;\;\;z \cdot \left(-\frac{x}{t}\right)\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+47}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{+85}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.25 \cdot 10^{+125}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ x (/ t y))))
   (if (<= z -2.4e+57)
     x
     (if (<= z -1.15e+27)
       (* x (/ (- z) t))
       (if (<= z -7.5e-6)
         x
         (if (<= z -1.9e-61)
           t_1
           (if (<= z -1.16e-66)
             x
             (if (<= z -1.8e-150)
               (* z (- (/ x t)))
               (if (<= z 3.4e+47)
                 t_1
                 (if (<= z 9.2e+85)
                   x
                   (if (<= z 3.25e+125) (* x (/ y t)) x)))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x / (t / y);
	double tmp;
	if (z <= -2.4e+57) {
		tmp = x;
	} else if (z <= -1.15e+27) {
		tmp = x * (-z / t);
	} else if (z <= -7.5e-6) {
		tmp = x;
	} else if (z <= -1.9e-61) {
		tmp = t_1;
	} else if (z <= -1.16e-66) {
		tmp = x;
	} else if (z <= -1.8e-150) {
		tmp = z * -(x / t);
	} else if (z <= 3.4e+47) {
		tmp = t_1;
	} else if (z <= 9.2e+85) {
		tmp = x;
	} else if (z <= 3.25e+125) {
		tmp = x * (y / 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) :: t_1
    real(8) :: tmp
    t_1 = x / (t / y)
    if (z <= (-2.4d+57)) then
        tmp = x
    else if (z <= (-1.15d+27)) then
        tmp = x * (-z / t)
    else if (z <= (-7.5d-6)) then
        tmp = x
    else if (z <= (-1.9d-61)) then
        tmp = t_1
    else if (z <= (-1.16d-66)) then
        tmp = x
    else if (z <= (-1.8d-150)) then
        tmp = z * -(x / t)
    else if (z <= 3.4d+47) then
        tmp = t_1
    else if (z <= 9.2d+85) then
        tmp = x
    else if (z <= 3.25d+125) then
        tmp = x * (y / t)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x / (t / y);
	double tmp;
	if (z <= -2.4e+57) {
		tmp = x;
	} else if (z <= -1.15e+27) {
		tmp = x * (-z / t);
	} else if (z <= -7.5e-6) {
		tmp = x;
	} else if (z <= -1.9e-61) {
		tmp = t_1;
	} else if (z <= -1.16e-66) {
		tmp = x;
	} else if (z <= -1.8e-150) {
		tmp = z * -(x / t);
	} else if (z <= 3.4e+47) {
		tmp = t_1;
	} else if (z <= 9.2e+85) {
		tmp = x;
	} else if (z <= 3.25e+125) {
		tmp = x * (y / t);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x / (t / y)
	tmp = 0
	if z <= -2.4e+57:
		tmp = x
	elif z <= -1.15e+27:
		tmp = x * (-z / t)
	elif z <= -7.5e-6:
		tmp = x
	elif z <= -1.9e-61:
		tmp = t_1
	elif z <= -1.16e-66:
		tmp = x
	elif z <= -1.8e-150:
		tmp = z * -(x / t)
	elif z <= 3.4e+47:
		tmp = t_1
	elif z <= 9.2e+85:
		tmp = x
	elif z <= 3.25e+125:
		tmp = x * (y / t)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x / Float64(t / y))
	tmp = 0.0
	if (z <= -2.4e+57)
		tmp = x;
	elseif (z <= -1.15e+27)
		tmp = Float64(x * Float64(Float64(-z) / t));
	elseif (z <= -7.5e-6)
		tmp = x;
	elseif (z <= -1.9e-61)
		tmp = t_1;
	elseif (z <= -1.16e-66)
		tmp = x;
	elseif (z <= -1.8e-150)
		tmp = Float64(z * Float64(-Float64(x / t)));
	elseif (z <= 3.4e+47)
		tmp = t_1;
	elseif (z <= 9.2e+85)
		tmp = x;
	elseif (z <= 3.25e+125)
		tmp = Float64(x * Float64(y / t));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x / (t / y);
	tmp = 0.0;
	if (z <= -2.4e+57)
		tmp = x;
	elseif (z <= -1.15e+27)
		tmp = x * (-z / t);
	elseif (z <= -7.5e-6)
		tmp = x;
	elseif (z <= -1.9e-61)
		tmp = t_1;
	elseif (z <= -1.16e-66)
		tmp = x;
	elseif (z <= -1.8e-150)
		tmp = z * -(x / t);
	elseif (z <= 3.4e+47)
		tmp = t_1;
	elseif (z <= 9.2e+85)
		tmp = x;
	elseif (z <= 3.25e+125)
		tmp = x * (y / t);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.4e+57], x, If[LessEqual[z, -1.15e+27], N[(x * N[((-z) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.5e-6], x, If[LessEqual[z, -1.9e-61], t$95$1, If[LessEqual[z, -1.16e-66], x, If[LessEqual[z, -1.8e-150], N[(z * (-N[(x / t), $MachinePrecision])), $MachinePrecision], If[LessEqual[z, 3.4e+47], t$95$1, If[LessEqual[z, 9.2e+85], x, If[LessEqual[z, 3.25e+125], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.15 \cdot 10^{+27}:\\
\;\;\;\;x \cdot \frac{-z}{t}\\

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

\mathbf{elif}\;z \leq -1.9 \cdot 10^{-61}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -1.16 \cdot 10^{-66}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 3.4 \cdot 10^{+47}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 9.2 \cdot 10^{+85}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.40000000000000005e57 or -1.15e27 < z < -7.50000000000000019e-6 or -1.8999999999999999e-61 < z < -1.16000000000000002e-66 or 3.3999999999999998e47 < z < 9.1999999999999996e85 or 3.2499999999999999e125 < z

    1. Initial program 75.7%

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

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

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

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

    if -2.40000000000000005e57 < z < -1.15e27

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{z} \cdot \sqrt{z}}}{-\frac{t - z}{x}} \]
      14. add-sqr-sqrt61.5%

        \[\leadsto \frac{\color{blue}{z}}{-\frac{t - z}{x}} \]
      15. distribute-neg-frac61.5%

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

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

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

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

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

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

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

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

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

    if -7.50000000000000019e-6 < z < -1.8999999999999999e-61 or -1.8000000000000001e-150 < z < 3.3999999999999998e47

    1. Initial program 95.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{x}}} \]
      2. associate-/r/70.5%

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

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

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

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

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

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

    if -1.16000000000000002e-66 < z < -1.8000000000000001e-150

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

    if 9.1999999999999996e85 < z < 3.2499999999999999e125

    1. Initial program 80.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{x}}} \]
      2. associate-/r/51.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{+57}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{+27}:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-6}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{-61}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq -1.16 \cdot 10^{-66}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-150}:\\ \;\;\;\;z \cdot \left(-\frac{x}{t}\right)\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+47}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{+85}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.25 \cdot 10^{+125}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 3: 58.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{\frac{t}{y}}\\ \mathbf{if}\;z \leq -5.5 \cdot 10^{+57}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -7.6 \cdot 10^{+25}:\\ \;\;\;\;\frac{-x}{\frac{t}{z}}\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-6}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{-61}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.16 \cdot 10^{-66}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-150}:\\ \;\;\;\;z \cdot \left(-\frac{x}{t}\right)\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{+47}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+83}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.25 \cdot 10^{+125}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ x (/ t y))))
   (if (<= z -5.5e+57)
     x
     (if (<= z -7.6e+25)
       (/ (- x) (/ t z))
       (if (<= z -7.5e-6)
         x
         (if (<= z -1.9e-61)
           t_1
           (if (<= z -1.16e-66)
             x
             (if (<= z -1.8e-150)
               (* z (- (/ x t)))
               (if (<= z 4.8e+47)
                 t_1
                 (if (<= z 5e+83)
                   x
                   (if (<= z 3.25e+125) (* x (/ y t)) x)))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x / (t / y);
	double tmp;
	if (z <= -5.5e+57) {
		tmp = x;
	} else if (z <= -7.6e+25) {
		tmp = -x / (t / z);
	} else if (z <= -7.5e-6) {
		tmp = x;
	} else if (z <= -1.9e-61) {
		tmp = t_1;
	} else if (z <= -1.16e-66) {
		tmp = x;
	} else if (z <= -1.8e-150) {
		tmp = z * -(x / t);
	} else if (z <= 4.8e+47) {
		tmp = t_1;
	} else if (z <= 5e+83) {
		tmp = x;
	} else if (z <= 3.25e+125) {
		tmp = x * (y / 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) :: t_1
    real(8) :: tmp
    t_1 = x / (t / y)
    if (z <= (-5.5d+57)) then
        tmp = x
    else if (z <= (-7.6d+25)) then
        tmp = -x / (t / z)
    else if (z <= (-7.5d-6)) then
        tmp = x
    else if (z <= (-1.9d-61)) then
        tmp = t_1
    else if (z <= (-1.16d-66)) then
        tmp = x
    else if (z <= (-1.8d-150)) then
        tmp = z * -(x / t)
    else if (z <= 4.8d+47) then
        tmp = t_1
    else if (z <= 5d+83) then
        tmp = x
    else if (z <= 3.25d+125) then
        tmp = x * (y / t)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x / (t / y);
	double tmp;
	if (z <= -5.5e+57) {
		tmp = x;
	} else if (z <= -7.6e+25) {
		tmp = -x / (t / z);
	} else if (z <= -7.5e-6) {
		tmp = x;
	} else if (z <= -1.9e-61) {
		tmp = t_1;
	} else if (z <= -1.16e-66) {
		tmp = x;
	} else if (z <= -1.8e-150) {
		tmp = z * -(x / t);
	} else if (z <= 4.8e+47) {
		tmp = t_1;
	} else if (z <= 5e+83) {
		tmp = x;
	} else if (z <= 3.25e+125) {
		tmp = x * (y / t);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x / (t / y)
	tmp = 0
	if z <= -5.5e+57:
		tmp = x
	elif z <= -7.6e+25:
		tmp = -x / (t / z)
	elif z <= -7.5e-6:
		tmp = x
	elif z <= -1.9e-61:
		tmp = t_1
	elif z <= -1.16e-66:
		tmp = x
	elif z <= -1.8e-150:
		tmp = z * -(x / t)
	elif z <= 4.8e+47:
		tmp = t_1
	elif z <= 5e+83:
		tmp = x
	elif z <= 3.25e+125:
		tmp = x * (y / t)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x / Float64(t / y))
	tmp = 0.0
	if (z <= -5.5e+57)
		tmp = x;
	elseif (z <= -7.6e+25)
		tmp = Float64(Float64(-x) / Float64(t / z));
	elseif (z <= -7.5e-6)
		tmp = x;
	elseif (z <= -1.9e-61)
		tmp = t_1;
	elseif (z <= -1.16e-66)
		tmp = x;
	elseif (z <= -1.8e-150)
		tmp = Float64(z * Float64(-Float64(x / t)));
	elseif (z <= 4.8e+47)
		tmp = t_1;
	elseif (z <= 5e+83)
		tmp = x;
	elseif (z <= 3.25e+125)
		tmp = Float64(x * Float64(y / t));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x / (t / y);
	tmp = 0.0;
	if (z <= -5.5e+57)
		tmp = x;
	elseif (z <= -7.6e+25)
		tmp = -x / (t / z);
	elseif (z <= -7.5e-6)
		tmp = x;
	elseif (z <= -1.9e-61)
		tmp = t_1;
	elseif (z <= -1.16e-66)
		tmp = x;
	elseif (z <= -1.8e-150)
		tmp = z * -(x / t);
	elseif (z <= 4.8e+47)
		tmp = t_1;
	elseif (z <= 5e+83)
		tmp = x;
	elseif (z <= 3.25e+125)
		tmp = x * (y / t);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.5e+57], x, If[LessEqual[z, -7.6e+25], N[((-x) / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.5e-6], x, If[LessEqual[z, -1.9e-61], t$95$1, If[LessEqual[z, -1.16e-66], x, If[LessEqual[z, -1.8e-150], N[(z * (-N[(x / t), $MachinePrecision])), $MachinePrecision], If[LessEqual[z, 4.8e+47], t$95$1, If[LessEqual[z, 5e+83], x, If[LessEqual[z, 3.25e+125], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;z \leq -1.9 \cdot 10^{-61}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -1.16 \cdot 10^{-66}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 4.8 \cdot 10^{+47}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 5 \cdot 10^{+83}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -5.5000000000000002e57 or -7.6000000000000001e25 < z < -7.50000000000000019e-6 or -1.8999999999999999e-61 < z < -1.16000000000000002e-66 or 4.80000000000000037e47 < z < 5.00000000000000029e83 or 3.2499999999999999e125 < z

    1. Initial program 75.7%

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

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

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

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

    if -5.5000000000000002e57 < z < -7.6000000000000001e25

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{z} \cdot \sqrt{z}}}{-\frac{t - z}{x}} \]
      14. add-sqr-sqrt61.5%

        \[\leadsto \frac{\color{blue}{z}}{-\frac{t - z}{x}} \]
      15. distribute-neg-frac61.5%

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

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

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

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

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

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

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

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

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

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

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

    if -7.50000000000000019e-6 < z < -1.8999999999999999e-61 or -1.8000000000000001e-150 < z < 4.80000000000000037e47

    1. Initial program 95.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{x}}} \]
      2. associate-/r/70.5%

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

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

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

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

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

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

    if -1.16000000000000002e-66 < z < -1.8000000000000001e-150

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000029e83 < z < 3.2499999999999999e125

    1. Initial program 80.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{x}}} \]
      2. associate-/r/51.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{+57}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -7.6 \cdot 10^{+25}:\\ \;\;\;\;\frac{-x}{\frac{t}{z}}\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-6}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{-61}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq -1.16 \cdot 10^{-66}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-150}:\\ \;\;\;\;z \cdot \left(-\frac{x}{t}\right)\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{+47}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+83}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.25 \cdot 10^{+125}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 4: 65.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{x}{t - z}\\ \mathbf{if}\;z \leq -2.4 \cdot 10^{+57}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{+21}:\\ \;\;\;\;\frac{-x}{\frac{t}{z}}\\ \mathbf{elif}\;z \leq -680000000:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{-101}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-234}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+48} \lor \neg \left(z \leq 5.4 \cdot 10^{+85}\right) \land z \leq 2.7 \cdot 10^{+129}:\\ \;\;\;\;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 -2.4e+57)
     x
     (if (<= z -1.75e+21)
       (/ (- x) (/ t z))
       (if (<= z -680000000.0)
         x
         (if (<= z -8.5e-101)
           t_1
           (if (<= z 1.65e-234)
             (* (- y z) (/ x t))
             (if (or (<= z 7.2e+48) (and (not (<= z 5.4e+85)) (<= z 2.7e+129)))
               t_1
               x))))))))
double code(double x, double y, double z, double t) {
	double t_1 = y * (x / (t - z));
	double tmp;
	if (z <= -2.4e+57) {
		tmp = x;
	} else if (z <= -1.75e+21) {
		tmp = -x / (t / z);
	} else if (z <= -680000000.0) {
		tmp = x;
	} else if (z <= -8.5e-101) {
		tmp = t_1;
	} else if (z <= 1.65e-234) {
		tmp = (y - z) * (x / t);
	} else if ((z <= 7.2e+48) || (!(z <= 5.4e+85) && (z <= 2.7e+129))) {
		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 <= (-2.4d+57)) then
        tmp = x
    else if (z <= (-1.75d+21)) then
        tmp = -x / (t / z)
    else if (z <= (-680000000.0d0)) then
        tmp = x
    else if (z <= (-8.5d-101)) then
        tmp = t_1
    else if (z <= 1.65d-234) then
        tmp = (y - z) * (x / t)
    else if ((z <= 7.2d+48) .or. (.not. (z <= 5.4d+85)) .and. (z <= 2.7d+129)) 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 <= -2.4e+57) {
		tmp = x;
	} else if (z <= -1.75e+21) {
		tmp = -x / (t / z);
	} else if (z <= -680000000.0) {
		tmp = x;
	} else if (z <= -8.5e-101) {
		tmp = t_1;
	} else if (z <= 1.65e-234) {
		tmp = (y - z) * (x / t);
	} else if ((z <= 7.2e+48) || (!(z <= 5.4e+85) && (z <= 2.7e+129))) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = y * (x / (t - z))
	tmp = 0
	if z <= -2.4e+57:
		tmp = x
	elif z <= -1.75e+21:
		tmp = -x / (t / z)
	elif z <= -680000000.0:
		tmp = x
	elif z <= -8.5e-101:
		tmp = t_1
	elif z <= 1.65e-234:
		tmp = (y - z) * (x / t)
	elif (z <= 7.2e+48) or (not (z <= 5.4e+85) and (z <= 2.7e+129)):
		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 <= -2.4e+57)
		tmp = x;
	elseif (z <= -1.75e+21)
		tmp = Float64(Float64(-x) / Float64(t / z));
	elseif (z <= -680000000.0)
		tmp = x;
	elseif (z <= -8.5e-101)
		tmp = t_1;
	elseif (z <= 1.65e-234)
		tmp = Float64(Float64(y - z) * Float64(x / t));
	elseif ((z <= 7.2e+48) || (!(z <= 5.4e+85) && (z <= 2.7e+129)))
		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 <= -2.4e+57)
		tmp = x;
	elseif (z <= -1.75e+21)
		tmp = -x / (t / z);
	elseif (z <= -680000000.0)
		tmp = x;
	elseif (z <= -8.5e-101)
		tmp = t_1;
	elseif (z <= 1.65e-234)
		tmp = (y - z) * (x / t);
	elseif ((z <= 7.2e+48) || (~((z <= 5.4e+85)) && (z <= 2.7e+129)))
		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, -2.4e+57], x, If[LessEqual[z, -1.75e+21], N[((-x) / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -680000000.0], x, If[LessEqual[z, -8.5e-101], t$95$1, If[LessEqual[z, 1.65e-234], N[(N[(y - z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 7.2e+48], And[N[Not[LessEqual[z, 5.4e+85]], $MachinePrecision], LessEqual[z, 2.7e+129]]], t$95$1, x]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.75 \cdot 10^{+21}:\\
\;\;\;\;\frac{-x}{\frac{t}{z}}\\

\mathbf{elif}\;z \leq -680000000:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq -8.5 \cdot 10^{-101}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 7.2 \cdot 10^{+48} \lor \neg \left(z \leq 5.4 \cdot 10^{+85}\right) \land z \leq 2.7 \cdot 10^{+129}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.40000000000000005e57 or -1.75e21 < z < -6.8e8 or 7.19999999999999967e48 < z < 5.39999999999999966e85 or 2.7000000000000001e129 < z

    1. Initial program 74.3%

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

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

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

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

    if -2.40000000000000005e57 < z < -1.75e21

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{z} \cdot \sqrt{z}}}{-\frac{t - z}{x}} \]
      14. add-sqr-sqrt61.5%

        \[\leadsto \frac{\color{blue}{z}}{-\frac{t - z}{x}} \]
      15. distribute-neg-frac61.5%

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

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

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

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

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

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

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

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

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

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

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

    if -6.8e8 < z < -8.49999999999999941e-101 or 1.65000000000000007e-234 < z < 7.19999999999999967e48 or 5.39999999999999966e85 < z < 2.7000000000000001e129

    1. Initial program 92.9%

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

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

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

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

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

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

    if -8.49999999999999941e-101 < z < 1.65000000000000007e-234

    1. Initial program 96.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{+57}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{+21}:\\ \;\;\;\;\frac{-x}{\frac{t}{z}}\\ \mathbf{elif}\;z \leq -680000000:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{-101}:\\ \;\;\;\;y \cdot \frac{x}{t - z}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-234}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+48} \lor \neg \left(z \leq 5.4 \cdot 10^{+85}\right) \land z \leq 2.7 \cdot 10^{+129}:\\ \;\;\;\;y \cdot \frac{x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 5: 66.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y}{t - z}\\ \mathbf{if}\;z \leq -5.4 \cdot 10^{+57}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{+26}:\\ \;\;\;\;\frac{-x}{\frac{t}{z}}\\ \mathbf{elif}\;z \leq -680000000:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-97}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-279}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+47} \lor \neg \left(z \leq 1.6 \cdot 10^{+84}\right) \land z \leq 2.7 \cdot 10^{+128}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (/ y (- t z)))))
   (if (<= z -5.4e+57)
     x
     (if (<= z -5.2e+26)
       (/ (- x) (/ t z))
       (if (<= z -680000000.0)
         x
         (if (<= z -2.8e-97)
           t_1
           (if (<= z -6.5e-279)
             (* (- y z) (/ x t))
             (if (or (<= z 3.8e+47) (and (not (<= z 1.6e+84)) (<= z 2.7e+128)))
               t_1
               x))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (y / (t - z));
	double tmp;
	if (z <= -5.4e+57) {
		tmp = x;
	} else if (z <= -5.2e+26) {
		tmp = -x / (t / z);
	} else if (z <= -680000000.0) {
		tmp = x;
	} else if (z <= -2.8e-97) {
		tmp = t_1;
	} else if (z <= -6.5e-279) {
		tmp = (y - z) * (x / t);
	} else if ((z <= 3.8e+47) || (!(z <= 1.6e+84) && (z <= 2.7e+128))) {
		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 = x * (y / (t - z))
    if (z <= (-5.4d+57)) then
        tmp = x
    else if (z <= (-5.2d+26)) then
        tmp = -x / (t / z)
    else if (z <= (-680000000.0d0)) then
        tmp = x
    else if (z <= (-2.8d-97)) then
        tmp = t_1
    else if (z <= (-6.5d-279)) then
        tmp = (y - z) * (x / t)
    else if ((z <= 3.8d+47) .or. (.not. (z <= 1.6d+84)) .and. (z <= 2.7d+128)) 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 = x * (y / (t - z));
	double tmp;
	if (z <= -5.4e+57) {
		tmp = x;
	} else if (z <= -5.2e+26) {
		tmp = -x / (t / z);
	} else if (z <= -680000000.0) {
		tmp = x;
	} else if (z <= -2.8e-97) {
		tmp = t_1;
	} else if (z <= -6.5e-279) {
		tmp = (y - z) * (x / t);
	} else if ((z <= 3.8e+47) || (!(z <= 1.6e+84) && (z <= 2.7e+128))) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (y / (t - z))
	tmp = 0
	if z <= -5.4e+57:
		tmp = x
	elif z <= -5.2e+26:
		tmp = -x / (t / z)
	elif z <= -680000000.0:
		tmp = x
	elif z <= -2.8e-97:
		tmp = t_1
	elif z <= -6.5e-279:
		tmp = (y - z) * (x / t)
	elif (z <= 3.8e+47) or (not (z <= 1.6e+84) and (z <= 2.7e+128)):
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(y / Float64(t - z)))
	tmp = 0.0
	if (z <= -5.4e+57)
		tmp = x;
	elseif (z <= -5.2e+26)
		tmp = Float64(Float64(-x) / Float64(t / z));
	elseif (z <= -680000000.0)
		tmp = x;
	elseif (z <= -2.8e-97)
		tmp = t_1;
	elseif (z <= -6.5e-279)
		tmp = Float64(Float64(y - z) * Float64(x / t));
	elseif ((z <= 3.8e+47) || (!(z <= 1.6e+84) && (z <= 2.7e+128)))
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (y / (t - z));
	tmp = 0.0;
	if (z <= -5.4e+57)
		tmp = x;
	elseif (z <= -5.2e+26)
		tmp = -x / (t / z);
	elseif (z <= -680000000.0)
		tmp = x;
	elseif (z <= -2.8e-97)
		tmp = t_1;
	elseif (z <= -6.5e-279)
		tmp = (y - z) * (x / t);
	elseif ((z <= 3.8e+47) || (~((z <= 1.6e+84)) && (z <= 2.7e+128)))
		tmp = t_1;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.4e+57], x, If[LessEqual[z, -5.2e+26], N[((-x) / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -680000000.0], x, If[LessEqual[z, -2.8e-97], t$95$1, If[LessEqual[z, -6.5e-279], N[(N[(y - z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 3.8e+47], And[N[Not[LessEqual[z, 1.6e+84]], $MachinePrecision], LessEqual[z, 2.7e+128]]], t$95$1, x]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -5.2 \cdot 10^{+26}:\\
\;\;\;\;\frac{-x}{\frac{t}{z}}\\

\mathbf{elif}\;z \leq -680000000:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq -2.8 \cdot 10^{-97}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 3.8 \cdot 10^{+47} \lor \neg \left(z \leq 1.6 \cdot 10^{+84}\right) \land z \leq 2.7 \cdot 10^{+128}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.3999999999999997e57 or -5.20000000000000004e26 < z < -6.8e8 or 3.8000000000000003e47 < z < 1.60000000000000005e84 or 2.70000000000000001e128 < z

    1. Initial program 74.3%

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

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

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

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

    if -5.3999999999999997e57 < z < -5.20000000000000004e26

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{z} \cdot \sqrt{z}}}{-\frac{t - z}{x}} \]
      14. add-sqr-sqrt61.5%

        \[\leadsto \frac{\color{blue}{z}}{-\frac{t - z}{x}} \]
      15. distribute-neg-frac61.5%

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

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

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

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

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

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

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

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

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

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

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

    if -6.8e8 < z < -2.8000000000000002e-97 or -6.4999999999999997e-279 < z < 3.8000000000000003e47 or 1.60000000000000005e84 < z < 2.70000000000000001e128

    1. Initial program 93.8%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t - z}{x}}} \]
      2. associate-/r/82.0%

        \[\leadsto \color{blue}{\frac{y}{t - z} \cdot x} \]
    9. Simplified82.0%

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

    if -2.8000000000000002e-97 < z < -6.4999999999999997e-279

    1. Initial program 96.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.4 \cdot 10^{+57}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{+26}:\\ \;\;\;\;\frac{-x}{\frac{t}{z}}\\ \mathbf{elif}\;z \leq -680000000:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-97}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-279}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+47} \lor \neg \left(z \leq 1.6 \cdot 10^{+84}\right) \land z \leq 2.7 \cdot 10^{+128}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 6: 66.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y}{t - z}\\ \mathbf{if}\;z \leq -4.4 \cdot 10^{+57}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{+19}:\\ \;\;\;\;\frac{-x}{\frac{t}{z}}\\ \mathbf{elif}\;z \leq -680000000:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{-105}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4.4 \cdot 10^{-279}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{+48}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+85}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{+129}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{\frac{z}{x}}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (/ y (- t z)))))
   (if (<= z -4.4e+57)
     x
     (if (<= z -1.6e+19)
       (/ (- x) (/ t z))
       (if (<= z -680000000.0)
         x
         (if (<= z -3.3e-105)
           t_1
           (if (<= z -4.4e-279)
             (* (- y z) (/ x t))
             (if (<= z 3.9e+48)
               t_1
               (if (<= z 2.6e+85)
                 x
                 (if (<= z 2.55e+129) t_1 (+ x (/ t (/ z x)))))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (y / (t - z));
	double tmp;
	if (z <= -4.4e+57) {
		tmp = x;
	} else if (z <= -1.6e+19) {
		tmp = -x / (t / z);
	} else if (z <= -680000000.0) {
		tmp = x;
	} else if (z <= -3.3e-105) {
		tmp = t_1;
	} else if (z <= -4.4e-279) {
		tmp = (y - z) * (x / t);
	} else if (z <= 3.9e+48) {
		tmp = t_1;
	} else if (z <= 2.6e+85) {
		tmp = x;
	} else if (z <= 2.55e+129) {
		tmp = t_1;
	} else {
		tmp = x + (t / (z / x));
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (y / (t - z))
    if (z <= (-4.4d+57)) then
        tmp = x
    else if (z <= (-1.6d+19)) then
        tmp = -x / (t / z)
    else if (z <= (-680000000.0d0)) then
        tmp = x
    else if (z <= (-3.3d-105)) then
        tmp = t_1
    else if (z <= (-4.4d-279)) then
        tmp = (y - z) * (x / t)
    else if (z <= 3.9d+48) then
        tmp = t_1
    else if (z <= 2.6d+85) then
        tmp = x
    else if (z <= 2.55d+129) then
        tmp = t_1
    else
        tmp = x + (t / (z / x))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x * (y / (t - z));
	double tmp;
	if (z <= -4.4e+57) {
		tmp = x;
	} else if (z <= -1.6e+19) {
		tmp = -x / (t / z);
	} else if (z <= -680000000.0) {
		tmp = x;
	} else if (z <= -3.3e-105) {
		tmp = t_1;
	} else if (z <= -4.4e-279) {
		tmp = (y - z) * (x / t);
	} else if (z <= 3.9e+48) {
		tmp = t_1;
	} else if (z <= 2.6e+85) {
		tmp = x;
	} else if (z <= 2.55e+129) {
		tmp = t_1;
	} else {
		tmp = x + (t / (z / x));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (y / (t - z))
	tmp = 0
	if z <= -4.4e+57:
		tmp = x
	elif z <= -1.6e+19:
		tmp = -x / (t / z)
	elif z <= -680000000.0:
		tmp = x
	elif z <= -3.3e-105:
		tmp = t_1
	elif z <= -4.4e-279:
		tmp = (y - z) * (x / t)
	elif z <= 3.9e+48:
		tmp = t_1
	elif z <= 2.6e+85:
		tmp = x
	elif z <= 2.55e+129:
		tmp = t_1
	else:
		tmp = x + (t / (z / x))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(y / Float64(t - z)))
	tmp = 0.0
	if (z <= -4.4e+57)
		tmp = x;
	elseif (z <= -1.6e+19)
		tmp = Float64(Float64(-x) / Float64(t / z));
	elseif (z <= -680000000.0)
		tmp = x;
	elseif (z <= -3.3e-105)
		tmp = t_1;
	elseif (z <= -4.4e-279)
		tmp = Float64(Float64(y - z) * Float64(x / t));
	elseif (z <= 3.9e+48)
		tmp = t_1;
	elseif (z <= 2.6e+85)
		tmp = x;
	elseif (z <= 2.55e+129)
		tmp = t_1;
	else
		tmp = Float64(x + Float64(t / Float64(z / x)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (y / (t - z));
	tmp = 0.0;
	if (z <= -4.4e+57)
		tmp = x;
	elseif (z <= -1.6e+19)
		tmp = -x / (t / z);
	elseif (z <= -680000000.0)
		tmp = x;
	elseif (z <= -3.3e-105)
		tmp = t_1;
	elseif (z <= -4.4e-279)
		tmp = (y - z) * (x / t);
	elseif (z <= 3.9e+48)
		tmp = t_1;
	elseif (z <= 2.6e+85)
		tmp = x;
	elseif (z <= 2.55e+129)
		tmp = t_1;
	else
		tmp = x + (t / (z / x));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.4e+57], x, If[LessEqual[z, -1.6e+19], N[((-x) / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -680000000.0], x, If[LessEqual[z, -3.3e-105], t$95$1, If[LessEqual[z, -4.4e-279], N[(N[(y - z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.9e+48], t$95$1, If[LessEqual[z, 2.6e+85], x, If[LessEqual[z, 2.55e+129], t$95$1, N[(x + N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.6 \cdot 10^{+19}:\\
\;\;\;\;\frac{-x}{\frac{t}{z}}\\

\mathbf{elif}\;z \leq -680000000:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq -3.3 \cdot 10^{-105}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 3.9 \cdot 10^{+48}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 2.6 \cdot 10^{+85}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 2.55 \cdot 10^{+129}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -4.4000000000000001e57 or -1.6e19 < z < -6.8e8 or 3.9000000000000001e48 < z < 2.60000000000000011e85

    1. Initial program 73.8%

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

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

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

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

    if -4.4000000000000001e57 < z < -1.6e19

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{z} \cdot \sqrt{z}}}{-\frac{t - z}{x}} \]
      14. add-sqr-sqrt61.5%

        \[\leadsto \frac{\color{blue}{z}}{-\frac{t - z}{x}} \]
      15. distribute-neg-frac61.5%

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

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

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

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

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

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

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

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

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

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

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

    if -6.8e8 < z < -3.2999999999999999e-105 or -4.40000000000000001e-279 < z < 3.9000000000000001e48 or 2.60000000000000011e85 < z < 2.54999999999999998e129

    1. Initial program 93.8%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t - z}{x}}} \]
      2. associate-/r/82.0%

        \[\leadsto \color{blue}{\frac{y}{t - z} \cdot x} \]
    9. Simplified82.0%

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

    if -3.2999999999999999e-105 < z < -4.40000000000000001e-279

    1. Initial program 96.4%

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

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

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

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

    if 2.54999999999999998e129 < z

    1. Initial program 75.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.4 \cdot 10^{+57}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{+19}:\\ \;\;\;\;\frac{-x}{\frac{t}{z}}\\ \mathbf{elif}\;z \leq -680000000:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{-105}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;z \leq -4.4 \cdot 10^{-279}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{+48}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+85}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{+129}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{\frac{z}{x}}\\ \end{array} \]

Alternative 7: 73.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y}{t - z}\\ t_2 := \frac{x}{\frac{z}{z - y}}\\ \mathbf{if}\;z \leq -7.2 \cdot 10^{-6}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{-59}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4.3 \cdot 10^{-78}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.15 \cdot 10^{-279}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{+30} \lor \neg \left(z \leq 9.2 \cdot 10^{+85}\right) \land z \leq 1.75 \cdot 10^{+128}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (/ y (- t z)))) (t_2 (/ x (/ z (- z y)))))
   (if (<= z -7.2e-6)
     t_2
     (if (<= z -1.75e-59)
       t_1
       (if (<= z -4.3e-78)
         t_2
         (if (<= z -2.15e-279)
           (* (- y z) (/ x t))
           (if (or (<= z 1.75e+30) (and (not (<= z 9.2e+85)) (<= z 1.75e+128)))
             t_1
             t_2)))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (y / (t - z));
	double t_2 = x / (z / (z - y));
	double tmp;
	if (z <= -7.2e-6) {
		tmp = t_2;
	} else if (z <= -1.75e-59) {
		tmp = t_1;
	} else if (z <= -4.3e-78) {
		tmp = t_2;
	} else if (z <= -2.15e-279) {
		tmp = (y - z) * (x / t);
	} else if ((z <= 1.75e+30) || (!(z <= 9.2e+85) && (z <= 1.75e+128))) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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) :: t_2
    real(8) :: tmp
    t_1 = x * (y / (t - z))
    t_2 = x / (z / (z - y))
    if (z <= (-7.2d-6)) then
        tmp = t_2
    else if (z <= (-1.75d-59)) then
        tmp = t_1
    else if (z <= (-4.3d-78)) then
        tmp = t_2
    else if (z <= (-2.15d-279)) then
        tmp = (y - z) * (x / t)
    else if ((z <= 1.75d+30) .or. (.not. (z <= 9.2d+85)) .and. (z <= 1.75d+128)) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x * (y / (t - z));
	double t_2 = x / (z / (z - y));
	double tmp;
	if (z <= -7.2e-6) {
		tmp = t_2;
	} else if (z <= -1.75e-59) {
		tmp = t_1;
	} else if (z <= -4.3e-78) {
		tmp = t_2;
	} else if (z <= -2.15e-279) {
		tmp = (y - z) * (x / t);
	} else if ((z <= 1.75e+30) || (!(z <= 9.2e+85) && (z <= 1.75e+128))) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (y / (t - z))
	t_2 = x / (z / (z - y))
	tmp = 0
	if z <= -7.2e-6:
		tmp = t_2
	elif z <= -1.75e-59:
		tmp = t_1
	elif z <= -4.3e-78:
		tmp = t_2
	elif z <= -2.15e-279:
		tmp = (y - z) * (x / t)
	elif (z <= 1.75e+30) or (not (z <= 9.2e+85) and (z <= 1.75e+128)):
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(y / Float64(t - z)))
	t_2 = Float64(x / Float64(z / Float64(z - y)))
	tmp = 0.0
	if (z <= -7.2e-6)
		tmp = t_2;
	elseif (z <= -1.75e-59)
		tmp = t_1;
	elseif (z <= -4.3e-78)
		tmp = t_2;
	elseif (z <= -2.15e-279)
		tmp = Float64(Float64(y - z) * Float64(x / t));
	elseif ((z <= 1.75e+30) || (!(z <= 9.2e+85) && (z <= 1.75e+128)))
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (y / (t - z));
	t_2 = x / (z / (z - y));
	tmp = 0.0;
	if (z <= -7.2e-6)
		tmp = t_2;
	elseif (z <= -1.75e-59)
		tmp = t_1;
	elseif (z <= -4.3e-78)
		tmp = t_2;
	elseif (z <= -2.15e-279)
		tmp = (y - z) * (x / t);
	elseif ((z <= 1.75e+30) || (~((z <= 9.2e+85)) && (z <= 1.75e+128)))
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(z / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.2e-6], t$95$2, If[LessEqual[z, -1.75e-59], t$95$1, If[LessEqual[z, -4.3e-78], t$95$2, If[LessEqual[z, -2.15e-279], N[(N[(y - z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 1.75e+30], And[N[Not[LessEqual[z, 9.2e+85]], $MachinePrecision], LessEqual[z, 1.75e+128]]], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{t - z}\\
t_2 := \frac{x}{\frac{z}{z - y}}\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{-6}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -1.75 \cdot 10^{-59}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -4.3 \cdot 10^{-78}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \leq 1.75 \cdot 10^{+30} \lor \neg \left(z \leq 9.2 \cdot 10^{+85}\right) \land z \leq 1.75 \cdot 10^{+128}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.19999999999999967e-6 or -1.75e-59 < z < -4.29999999999999994e-78 or 1.75000000000000011e30 < z < 9.1999999999999996e85 or 1.74999999999999984e128 < z

    1. Initial program 78.1%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. *-un-lft-identity78.1%

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

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

      \[\leadsto \color{blue}{\frac{x}{1} \cdot \frac{y - z}{t - z}} \]
    4. Taylor expanded in x around 0 78.1%

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

        \[\leadsto \color{blue}{\frac{y - z}{\frac{t - z}{x}}} \]
      2. sub-neg71.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(1 \cdot \left(\left(-y\right) + z\right)\right) \cdot \frac{1}{\frac{\left(-t\right) + z}{x}}} \]
      16. *-lft-identity71.2%

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

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

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

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

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

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

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

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

    if -7.19999999999999967e-6 < z < -1.75e-59 or -2.15000000000000003e-279 < z < 1.75000000000000011e30 or 9.1999999999999996e85 < z < 1.74999999999999984e128

    1. Initial program 93.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t - z}{x}}} \]
      2. associate-/r/84.3%

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

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

    if -4.29999999999999994e-78 < z < -2.15000000000000003e-279

    1. Initial program 96.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{-6}:\\ \;\;\;\;\frac{x}{\frac{z}{z - y}}\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{-59}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;z \leq -4.3 \cdot 10^{-78}:\\ \;\;\;\;\frac{x}{\frac{z}{z - y}}\\ \mathbf{elif}\;z \leq -2.15 \cdot 10^{-279}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{+30} \lor \neg \left(z \leq 9.2 \cdot 10^{+85}\right) \land z \leq 1.75 \cdot 10^{+128}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{z - y}}\\ \end{array} \]

Alternative 8: 58.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{\frac{t}{y}}\\ \mathbf{if}\;z \leq -7.5 \cdot 10^{-6}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{-61}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-66}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-150}:\\ \;\;\;\;z \cdot \left(-\frac{x}{t}\right)\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+47}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+85}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+125}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ x (/ t y))))
   (if (<= z -7.5e-6)
     x
     (if (<= z -1.9e-61)
       t_1
       (if (<= z -1.15e-66)
         x
         (if (<= z -1.8e-150)
           (* z (- (/ x t)))
           (if (<= z 3.5e+47)
             t_1
             (if (<= z 4.2e+85) x (if (<= z 5e+125) (* x (/ y t)) x)))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x / (t / y);
	double tmp;
	if (z <= -7.5e-6) {
		tmp = x;
	} else if (z <= -1.9e-61) {
		tmp = t_1;
	} else if (z <= -1.15e-66) {
		tmp = x;
	} else if (z <= -1.8e-150) {
		tmp = z * -(x / t);
	} else if (z <= 3.5e+47) {
		tmp = t_1;
	} else if (z <= 4.2e+85) {
		tmp = x;
	} else if (z <= 5e+125) {
		tmp = x * (y / 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) :: t_1
    real(8) :: tmp
    t_1 = x / (t / y)
    if (z <= (-7.5d-6)) then
        tmp = x
    else if (z <= (-1.9d-61)) then
        tmp = t_1
    else if (z <= (-1.15d-66)) then
        tmp = x
    else if (z <= (-1.8d-150)) then
        tmp = z * -(x / t)
    else if (z <= 3.5d+47) then
        tmp = t_1
    else if (z <= 4.2d+85) then
        tmp = x
    else if (z <= 5d+125) then
        tmp = x * (y / t)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x / (t / y);
	double tmp;
	if (z <= -7.5e-6) {
		tmp = x;
	} else if (z <= -1.9e-61) {
		tmp = t_1;
	} else if (z <= -1.15e-66) {
		tmp = x;
	} else if (z <= -1.8e-150) {
		tmp = z * -(x / t);
	} else if (z <= 3.5e+47) {
		tmp = t_1;
	} else if (z <= 4.2e+85) {
		tmp = x;
	} else if (z <= 5e+125) {
		tmp = x * (y / t);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x / (t / y)
	tmp = 0
	if z <= -7.5e-6:
		tmp = x
	elif z <= -1.9e-61:
		tmp = t_1
	elif z <= -1.15e-66:
		tmp = x
	elif z <= -1.8e-150:
		tmp = z * -(x / t)
	elif z <= 3.5e+47:
		tmp = t_1
	elif z <= 4.2e+85:
		tmp = x
	elif z <= 5e+125:
		tmp = x * (y / t)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x / Float64(t / y))
	tmp = 0.0
	if (z <= -7.5e-6)
		tmp = x;
	elseif (z <= -1.9e-61)
		tmp = t_1;
	elseif (z <= -1.15e-66)
		tmp = x;
	elseif (z <= -1.8e-150)
		tmp = Float64(z * Float64(-Float64(x / t)));
	elseif (z <= 3.5e+47)
		tmp = t_1;
	elseif (z <= 4.2e+85)
		tmp = x;
	elseif (z <= 5e+125)
		tmp = Float64(x * Float64(y / t));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x / (t / y);
	tmp = 0.0;
	if (z <= -7.5e-6)
		tmp = x;
	elseif (z <= -1.9e-61)
		tmp = t_1;
	elseif (z <= -1.15e-66)
		tmp = x;
	elseif (z <= -1.8e-150)
		tmp = z * -(x / t);
	elseif (z <= 3.5e+47)
		tmp = t_1;
	elseif (z <= 4.2e+85)
		tmp = x;
	elseif (z <= 5e+125)
		tmp = x * (y / t);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.5e-6], x, If[LessEqual[z, -1.9e-61], t$95$1, If[LessEqual[z, -1.15e-66], x, If[LessEqual[z, -1.8e-150], N[(z * (-N[(x / t), $MachinePrecision])), $MachinePrecision], If[LessEqual[z, 3.5e+47], t$95$1, If[LessEqual[z, 4.2e+85], x, If[LessEqual[z, 5e+125], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.9 \cdot 10^{-61}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -1.15 \cdot 10^{-66}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 3.5 \cdot 10^{+47}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 4.2 \cdot 10^{+85}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7.50000000000000019e-6 or -1.8999999999999999e-61 < z < -1.14999999999999996e-66 or 3.50000000000000015e47 < z < 4.2000000000000002e85 or 4.99999999999999962e125 < z

    1. Initial program 77.2%

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

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

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

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

    if -7.50000000000000019e-6 < z < -1.8999999999999999e-61 or -1.8000000000000001e-150 < z < 3.50000000000000015e47

    1. Initial program 95.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{x}}} \]
      2. associate-/r/70.5%

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

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

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

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

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

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

    if -1.14999999999999996e-66 < z < -1.8000000000000001e-150

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

    if 4.2000000000000002e85 < z < 4.99999999999999962e125

    1. Initial program 80.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{x}}} \]
      2. associate-/r/51.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{-6}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{-61}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-66}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-150}:\\ \;\;\;\;z \cdot \left(-\frac{x}{t}\right)\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+47}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+85}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+125}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 9: 66.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.7 \cdot 10^{+57}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -2.55 \cdot 10^{+23}:\\ \;\;\;\;\frac{-x}{\frac{t}{z}}\\ \mathbf{elif}\;z \leq -150000000:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+47} \lor \neg \left(z \leq 3.5 \cdot 10^{+82}\right) \land z \leq 1.9 \cdot 10^{+128}:\\ \;\;\;\;y \cdot \frac{x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -5.7e+57)
   x
   (if (<= z -2.55e+23)
     (/ (- x) (/ t z))
     (if (<= z -150000000.0)
       x
       (if (or (<= z 7e+47) (and (not (<= z 3.5e+82)) (<= z 1.9e+128)))
         (* y (/ x (- t z)))
         x)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -5.7e+57) {
		tmp = x;
	} else if (z <= -2.55e+23) {
		tmp = -x / (t / z);
	} else if (z <= -150000000.0) {
		tmp = x;
	} else if ((z <= 7e+47) || (!(z <= 3.5e+82) && (z <= 1.9e+128))) {
		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 <= (-5.7d+57)) then
        tmp = x
    else if (z <= (-2.55d+23)) then
        tmp = -x / (t / z)
    else if (z <= (-150000000.0d0)) then
        tmp = x
    else if ((z <= 7d+47) .or. (.not. (z <= 3.5d+82)) .and. (z <= 1.9d+128)) 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 <= -5.7e+57) {
		tmp = x;
	} else if (z <= -2.55e+23) {
		tmp = -x / (t / z);
	} else if (z <= -150000000.0) {
		tmp = x;
	} else if ((z <= 7e+47) || (!(z <= 3.5e+82) && (z <= 1.9e+128))) {
		tmp = y * (x / (t - z));
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -5.7e+57:
		tmp = x
	elif z <= -2.55e+23:
		tmp = -x / (t / z)
	elif z <= -150000000.0:
		tmp = x
	elif (z <= 7e+47) or (not (z <= 3.5e+82) and (z <= 1.9e+128)):
		tmp = y * (x / (t - z))
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -5.7e+57)
		tmp = x;
	elseif (z <= -2.55e+23)
		tmp = Float64(Float64(-x) / Float64(t / z));
	elseif (z <= -150000000.0)
		tmp = x;
	elseif ((z <= 7e+47) || (!(z <= 3.5e+82) && (z <= 1.9e+128)))
		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 <= -5.7e+57)
		tmp = x;
	elseif (z <= -2.55e+23)
		tmp = -x / (t / z);
	elseif (z <= -150000000.0)
		tmp = x;
	elseif ((z <= 7e+47) || (~((z <= 3.5e+82)) && (z <= 1.9e+128)))
		tmp = y * (x / (t - z));
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -5.7e+57], x, If[LessEqual[z, -2.55e+23], N[((-x) / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -150000000.0], x, If[Or[LessEqual[z, 7e+47], And[N[Not[LessEqual[z, 3.5e+82]], $MachinePrecision], LessEqual[z, 1.9e+128]]], N[(y * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.55 \cdot 10^{+23}:\\
\;\;\;\;\frac{-x}{\frac{t}{z}}\\

\mathbf{elif}\;z \leq -150000000:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 7 \cdot 10^{+47} \lor \neg \left(z \leq 3.5 \cdot 10^{+82}\right) \land z \leq 1.9 \cdot 10^{+128}:\\
\;\;\;\;y \cdot \frac{x}{t - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.6999999999999998e57 or -2.5500000000000001e23 < z < -1.5e8 or 7.00000000000000031e47 < z < 3.5e82 or 1.89999999999999995e128 < z

    1. Initial program 74.3%

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

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

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

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

    if -5.6999999999999998e57 < z < -2.5500000000000001e23

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{z} \cdot \sqrt{z}}}{-\frac{t - z}{x}} \]
      14. add-sqr-sqrt61.5%

        \[\leadsto \frac{\color{blue}{z}}{-\frac{t - z}{x}} \]
      15. distribute-neg-frac61.5%

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

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

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

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

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

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

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

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

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

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

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

    if -1.5e8 < z < 7.00000000000000031e47 or 3.5e82 < z < 1.89999999999999995e128

    1. Initial program 94.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.7 \cdot 10^{+57}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -2.55 \cdot 10^{+23}:\\ \;\;\;\;\frac{-x}{\frac{t}{z}}\\ \mathbf{elif}\;z \leq -150000000:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+47} \lor \neg \left(z \leq 3.5 \cdot 10^{+82}\right) \land z \leq 1.9 \cdot 10^{+128}:\\ \;\;\;\;y \cdot \frac{x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 10: 60.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{-6}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 4.5 \cdot 10^{+47} \lor \neg \left(z \leq 4 \cdot 10^{+83}\right) \land z \leq 3.25 \cdot 10^{+125}:\\
\;\;\;\;x \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.50000000000000019e-6 or 4.49999999999999979e47 < z < 4.00000000000000012e83 or 3.2499999999999999e125 < z

    1. Initial program 76.8%

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

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

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

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

    if -7.50000000000000019e-6 < z < 4.49999999999999979e47 or 4.00000000000000012e83 < z < 3.2499999999999999e125

    1. Initial program 94.3%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{x}}} \]
      2. associate-/r/63.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{-6}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{+47} \lor \neg \left(z \leq 4 \cdot 10^{+83}\right) \land z \leq 3.25 \cdot 10^{+125}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 11: 60.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{-6}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 1.95 \cdot 10^{+85}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.50000000000000019e-6 or 8.2000000000000002e47 < z < 1.95000000000000017e85 or 3.50000000000000011e125 < z

    1. Initial program 76.8%

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

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

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

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

    if -7.50000000000000019e-6 < z < 8.2000000000000002e47

    1. Initial program 95.3%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{x}}} \]
      2. associate-/r/64.5%

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

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

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

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

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

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

    if 1.95000000000000017e85 < z < 3.50000000000000011e125

    1. Initial program 80.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{x}}} \]
      2. associate-/r/51.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{-6}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{+47}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{+85}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+125}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 12: 88.3% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 72.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{z} \cdot \sqrt{z}}}{\frac{t - z}{x}} \]
      8. add-sqr-sqrt8.4%

        \[\leadsto \frac{\color{blue}{z}}{\frac{t - z}{x}} \]
      9. frac-2neg8.4%

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}{-\frac{t - z}{x}} \]
      12. sqr-neg3.3%

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

        \[\leadsto \frac{\color{blue}{\sqrt{z} \cdot \sqrt{z}}}{-\frac{t - z}{x}} \]
      14. add-sqr-sqrt57.1%

        \[\leadsto \frac{\color{blue}{z}}{-\frac{t - z}{x}} \]
      15. distribute-neg-frac57.1%

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

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

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

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

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

    if -5.49999999999999989e43 < z < 5.09999999999999996e151

    1. Initial program 94.0%

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

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

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

    if 5.09999999999999996e151 < z

    1. Initial program 73.4%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. *-un-lft-identity73.4%

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

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

      \[\leadsto \color{blue}{\frac{x}{1} \cdot \frac{y - z}{t - z}} \]
    4. Taylor expanded in x around 0 73.4%

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

        \[\leadsto \color{blue}{\frac{y - z}{\frac{t - z}{x}}} \]
      2. sub-neg54.4%

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

        \[\leadsto \frac{\color{blue}{\left(-\left(-y\right)\right)} + \left(-z\right)}{\frac{t - z}{x}} \]
      4. distribute-neg-in54.4%

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

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

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

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

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

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

        \[\leadsto \frac{-1 \cdot \left(\left(-y\right) + z\right)}{\color{blue}{-1 \cdot \frac{\left(-t\right) + z}{x}}} \]
      11. times-frac54.4%

        \[\leadsto \color{blue}{\frac{-1}{-1} \cdot \frac{\left(-y\right) + z}{\frac{\left(-t\right) + z}{x}}} \]
      12. metadata-eval54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 75.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{-100} \lor \neg \left(y \leq 20000000\right):\\
\;\;\;\;x \cdot \frac{y}{t - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.0000000000000001e-100 or 2e7 < y

    1. Initial program 86.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t - z}{x}}} \]
      2. associate-/r/75.4%

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

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

    if -4.0000000000000001e-100 < y < 2e7

    1. Initial program 87.1%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. *-un-lft-identity87.1%

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

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

      \[\leadsto \color{blue}{\frac{x}{1} \cdot \frac{y - z}{t - z}} \]
    4. Taylor expanded in x around 0 87.1%

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

        \[\leadsto \color{blue}{\frac{y - z}{\frac{t - z}{x}}} \]
      2. sub-neg78.4%

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

        \[\leadsto \frac{\color{blue}{\left(-\left(-y\right)\right)} + \left(-z\right)}{\frac{t - z}{x}} \]
      4. distribute-neg-in78.4%

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

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

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

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

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

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

        \[\leadsto \frac{-1 \cdot \left(\left(-y\right) + z\right)}{\color{blue}{-1 \cdot \frac{\left(-t\right) + z}{x}}} \]
      11. times-frac78.4%

        \[\leadsto \color{blue}{\frac{-1}{-1} \cdot \frac{\left(-y\right) + z}{\frac{\left(-t\right) + z}{x}}} \]
      12. metadata-eval78.4%

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

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

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

        \[\leadsto \color{blue}{\left(1 \cdot \left(\left(-y\right) + z\right)\right) \cdot \frac{1}{\frac{\left(-t\right) + z}{x}}} \]
      16. *-lft-identity78.2%

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

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

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

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

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

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

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

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

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

Alternative 14: 75.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.3 \cdot 10^{-97} \lor \neg \left(y \leq 19000000\right):\\
\;\;\;\;x \cdot \frac{y}{t - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.3e-97 or 1.9e7 < y

    1. Initial program 86.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t - z}{x}}} \]
      2. associate-/r/75.4%

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

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

    if -4.3e-97 < y < 1.9e7

    1. Initial program 87.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-z}{-\frac{t - z}{x}}} \]
      10. add-sqr-sqrt10.0%

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{z} \cdot \sqrt{z}}}{-\frac{t - z}{x}} \]
      14. add-sqr-sqrt71.1%

        \[\leadsto \frac{\color{blue}{z}}{-\frac{t - z}{x}} \]
      15. distribute-neg-frac71.1%

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

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

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

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

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

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

Alternative 15: 37.8% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.19999999999999967e-6 or 1.2e-67 < z

    1. Initial program 78.9%

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

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

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

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

    if -7.19999999999999967e-6 < z < 1.2e-67

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{t}} \cdot \left(-z\right) \]
    8. Step-by-step derivation
      1. expm1-log1p-u29.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{x}{t} \cdot \left(-z\right)\right)\right)} \]
      2. expm1-udef20.4%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{x}{t} \cdot \left(-z\right)\right)} - 1} \]
      3. add-sqr-sqrt11.1%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{x}{t} \cdot \color{blue}{\left(\sqrt{-z} \cdot \sqrt{-z}\right)}\right)} - 1 \]
      4. sqrt-unprod20.5%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{x}{t} \cdot \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right)} - 1 \]
      5. sqr-neg20.5%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{x}{t} \cdot \sqrt{\color{blue}{z \cdot z}}\right)} - 1 \]
      6. sqrt-unprod10.3%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{x}{t} \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)}\right)} - 1 \]
      7. add-sqr-sqrt20.9%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{x}{t} \cdot \color{blue}{z}\right)} - 1 \]
      8. *-commutative20.9%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{z \cdot \frac{x}{t}}\right)} - 1 \]
    9. Applied egg-rr20.9%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(z \cdot \frac{x}{t}\right)} - 1} \]
    10. Step-by-step derivation
      1. expm1-def20.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(z \cdot \frac{x}{t}\right)\right)} \]
      2. expm1-log1p23.0%

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z}{t}} \]
    11. Simplified21.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{-6}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-67}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 16: 59.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{-6}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.50000000000000019e-6 or 3.1999999999999998e46 < z

    1. Initial program 77.1%

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

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

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

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

    if -7.50000000000000019e-6 < z < 3.1999999999999998e46

    1. Initial program 95.3%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. *-un-lft-identity95.3%

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

        \[\leadsto \color{blue}{\frac{x}{1} \cdot \frac{y - z}{t - z}} \]
    3. Applied egg-rr95.7%

      \[\leadsto \color{blue}{\frac{x}{1} \cdot \frac{y - z}{t - z}} \]
    4. Taylor expanded in z around 0 63.2%

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

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

        \[\leadsto \color{blue}{\frac{x}{t} \cdot y} \]
      3. *-commutative62.9%

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

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

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

Alternative 17: 96.8% 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}
Derivation
  1. Initial program 86.5%

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

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

    \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \left(y - z\right)} \]
  4. Step-by-step derivation
    1. associate-/r/97.5%

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

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

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

Alternative 18: 35.0% 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 86.5%

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

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

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

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

    \[\leadsto x \]

Developer target: 96.8% 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 2023279 
(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)))