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

Percentage Accurate: 84.4% → 96.2%
Time: 14.1s
Alternatives: 21
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 21 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.4% 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.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.6 \cdot 10^{+81} \lor \neg \left(z \leq 6.4 \cdot 10^{-90}\right):\\
\;\;\;\;\frac{x}{\frac{t - z}{y - z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.6000000000000003e81 or 6.40000000000000014e-90 < z

    1. Initial program 79.8%

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

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

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

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

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

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

    if -8.6000000000000003e81 < z < 6.40000000000000014e-90

    1. Initial program 90.9%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 90.9%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}} \]
    6. Step-by-step derivation
      1. remove-double-neg90.9%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(0 - \left(y - z\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      7. associate--r-97.4%

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

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

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

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

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{0 - \left(t - z\right)}} \]
      12. associate--r-97.4%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(0 - t\right) + z}} \]
      13. neg-sub097.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.6 \cdot 10^{+81} \lor \neg \left(z \leq 6.4 \cdot 10^{-90}\right):\\ \;\;\;\;\frac{x}{\frac{t - z}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z - t} \cdot \left(z - y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 71.5% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{if}\;z \leq -1.05 \cdot 10^{-106}:\\ \;\;\;\;x \cdot \frac{z - y}{z}\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-172}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-180}:\\ \;\;\;\;\frac{x \cdot \left(-y\right)}{z}\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+14}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+97}:\\ \;\;\;\;\left(z - y\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{+97}:\\ \;\;\;\;z \cdot \frac{x}{-t}\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{+148} \lor \neg \left(z \leq 2.2 \cdot 10^{+148}\right):\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (- y z) (/ x t))))
   (if (<= z -1.05e-106)
     (* x (/ (- z y) z))
     (if (<= z -9.5e-172)
       t_1
       (if (<= z -3e-180)
         (/ (* x (- y)) z)
         (if (<= z 5.4e+14)
           t_1
           (if (<= z 1.3e+97)
             (* (- z y) (/ x z))
             (if (<= z 1.55e+97)
               (* z (/ x (- t)))
               (if (or (<= z 2.15e+148) (not (<= z 2.2e+148)))
                 (* x (- 1.0 (/ y z)))
                 (* x (/ (- z) t)))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (x / t);
	double tmp;
	if (z <= -1.05e-106) {
		tmp = x * ((z - y) / z);
	} else if (z <= -9.5e-172) {
		tmp = t_1;
	} else if (z <= -3e-180) {
		tmp = (x * -y) / z;
	} else if (z <= 5.4e+14) {
		tmp = t_1;
	} else if (z <= 1.3e+97) {
		tmp = (z - y) * (x / z);
	} else if (z <= 1.55e+97) {
		tmp = z * (x / -t);
	} else if ((z <= 2.15e+148) || !(z <= 2.2e+148)) {
		tmp = x * (1.0 - (y / z));
	} else {
		tmp = x * (-z / t);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (y - z) * (x / t)
    if (z <= (-1.05d-106)) then
        tmp = x * ((z - y) / z)
    else if (z <= (-9.5d-172)) then
        tmp = t_1
    else if (z <= (-3d-180)) then
        tmp = (x * -y) / z
    else if (z <= 5.4d+14) then
        tmp = t_1
    else if (z <= 1.3d+97) then
        tmp = (z - y) * (x / z)
    else if (z <= 1.55d+97) then
        tmp = z * (x / -t)
    else if ((z <= 2.15d+148) .or. (.not. (z <= 2.2d+148))) then
        tmp = x * (1.0d0 - (y / z))
    else
        tmp = x * (-z / t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (x / t);
	double tmp;
	if (z <= -1.05e-106) {
		tmp = x * ((z - y) / z);
	} else if (z <= -9.5e-172) {
		tmp = t_1;
	} else if (z <= -3e-180) {
		tmp = (x * -y) / z;
	} else if (z <= 5.4e+14) {
		tmp = t_1;
	} else if (z <= 1.3e+97) {
		tmp = (z - y) * (x / z);
	} else if (z <= 1.55e+97) {
		tmp = z * (x / -t);
	} else if ((z <= 2.15e+148) || !(z <= 2.2e+148)) {
		tmp = x * (1.0 - (y / z));
	} else {
		tmp = x * (-z / t);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (y - z) * (x / t)
	tmp = 0
	if z <= -1.05e-106:
		tmp = x * ((z - y) / z)
	elif z <= -9.5e-172:
		tmp = t_1
	elif z <= -3e-180:
		tmp = (x * -y) / z
	elif z <= 5.4e+14:
		tmp = t_1
	elif z <= 1.3e+97:
		tmp = (z - y) * (x / z)
	elif z <= 1.55e+97:
		tmp = z * (x / -t)
	elif (z <= 2.15e+148) or not (z <= 2.2e+148):
		tmp = x * (1.0 - (y / z))
	else:
		tmp = x * (-z / t)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(y - z) * Float64(x / t))
	tmp = 0.0
	if (z <= -1.05e-106)
		tmp = Float64(x * Float64(Float64(z - y) / z));
	elseif (z <= -9.5e-172)
		tmp = t_1;
	elseif (z <= -3e-180)
		tmp = Float64(Float64(x * Float64(-y)) / z);
	elseif (z <= 5.4e+14)
		tmp = t_1;
	elseif (z <= 1.3e+97)
		tmp = Float64(Float64(z - y) * Float64(x / z));
	elseif (z <= 1.55e+97)
		tmp = Float64(z * Float64(x / Float64(-t)));
	elseif ((z <= 2.15e+148) || !(z <= 2.2e+148))
		tmp = Float64(x * Float64(1.0 - Float64(y / z)));
	else
		tmp = Float64(x * Float64(Float64(-z) / t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (y - z) * (x / t);
	tmp = 0.0;
	if (z <= -1.05e-106)
		tmp = x * ((z - y) / z);
	elseif (z <= -9.5e-172)
		tmp = t_1;
	elseif (z <= -3e-180)
		tmp = (x * -y) / z;
	elseif (z <= 5.4e+14)
		tmp = t_1;
	elseif (z <= 1.3e+97)
		tmp = (z - y) * (x / z);
	elseif (z <= 1.55e+97)
		tmp = z * (x / -t);
	elseif ((z <= 2.15e+148) || ~((z <= 2.2e+148)))
		tmp = x * (1.0 - (y / z));
	else
		tmp = x * (-z / t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.05e-106], N[(x * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9.5e-172], t$95$1, If[LessEqual[z, -3e-180], N[(N[(x * (-y)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 5.4e+14], t$95$1, If[LessEqual[z, 1.3e+97], N[(N[(z - y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e+97], N[(z * N[(x / (-t)), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 2.15e+148], N[Not[LessEqual[z, 2.2e+148]], $MachinePrecision]], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[((-z) / t), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -9.5 \cdot 10^{-172}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 5.4 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;z \leq 2.15 \cdot 10^{+148} \lor \neg \left(z \leq 2.2 \cdot 10^{+148}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if z < -1.05000000000000002e-106

    1. Initial program 84.1%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 84.1%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}} \]
    6. Step-by-step derivation
      1. remove-double-neg84.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(0 - \left(y - z\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      7. associate--r-78.1%

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

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

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

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

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{0 - \left(t - z\right)}} \]
      12. associate--r-78.1%

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

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

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

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

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

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

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

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

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

    if -1.05000000000000002e-106 < z < -9.50000000000000053e-172 or -3.0000000000000001e-180 < z < 5.4e14

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

    if -9.50000000000000053e-172 < z < -3.0000000000000001e-180

    1. Initial program 99.8%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 99.8%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}} \]
    6. Step-by-step derivation
      1. remove-double-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-x \cdot y}}{z} \]
      3. distribute-rgt-neg-in99.8%

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

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

    if 5.4e14 < z < 1.3e97

    1. Initial program 77.5%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 77.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(0 - \left(y - z\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      7. associate--r-99.7%

        \[\leadsto \color{blue}{\left(\left(0 - y\right) + z\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      8. neg-sub099.7%

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

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

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

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{0 - \left(t - z\right)}} \]
      12. associate--r-99.7%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(0 - t\right) + z}} \]
      13. neg-sub099.7%

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

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{z + \left(-t\right)}} \]
      15. sub-neg99.7%

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

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

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

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

    if 1.3e97 < z < 1.54999999999999991e97

    1. Initial program 100.0%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num98.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.54999999999999991e97 < z < 2.1500000000000001e148 or 2.1999999999999999e148 < z

    1. Initial program 72.6%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 57.9%

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

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

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

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

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

        \[\leadsto x \cdot \frac{\color{blue}{0 - \left(y - z\right)}}{z} \]
      6. associate--r-83.2%

        \[\leadsto x \cdot \frac{\color{blue}{\left(0 - y\right) + z}}{z} \]
      7. neg-sub083.2%

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

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

        \[\leadsto x \cdot \frac{\color{blue}{z - y}}{z} \]
      10. div-sub83.2%

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

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

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

    if 2.1500000000000001e148 < z < 2.1999999999999999e148

    1. Initial program 100.0%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 100.0%

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{z}{-t}} \]
    10. Simplified100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{-106}:\\ \;\;\;\;x \cdot \frac{z - y}{z}\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-172}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-180}:\\ \;\;\;\;\frac{x \cdot \left(-y\right)}{z}\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+14}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+97}:\\ \;\;\;\;\left(z - y\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{+97}:\\ \;\;\;\;z \cdot \frac{x}{-t}\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{+148} \lor \neg \left(z \leq 2.2 \cdot 10^{+148}\right):\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 56.3% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+90}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-15}:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq -9 \cdot 10^{-57}:\\ \;\;\;\;\frac{z \cdot x}{z}\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-171}:\\ \;\;\;\;\frac{z \cdot \left(-x\right)}{t}\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{-176}:\\ \;\;\;\;y \cdot \frac{x}{-z}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{+15}:\\ \;\;\;\;\frac{y}{\frac{t}{x}}\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{+70}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+83}:\\ \;\;\;\;\frac{y}{\frac{z}{-x}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -2.2e+90)
   x
   (if (<= z -5.5e-15)
     (* y (/ x t))
     (if (<= z -9e-57)
       (/ (* z x) z)
       (if (<= z -1.15e-171)
         (/ (* z (- x)) t)
         (if (<= z -6.8e-176)
           (* y (/ x (- z)))
           (if (<= z 6e+15)
             (/ y (/ t x))
             (if (<= z 4.1e+70)
               x
               (if (<= z 9.5e+83) (/ y (/ z (- x))) x)))))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -2.2e+90) {
		tmp = x;
	} else if (z <= -5.5e-15) {
		tmp = y * (x / t);
	} else if (z <= -9e-57) {
		tmp = (z * x) / z;
	} else if (z <= -1.15e-171) {
		tmp = (z * -x) / t;
	} else if (z <= -6.8e-176) {
		tmp = y * (x / -z);
	} else if (z <= 6e+15) {
		tmp = y / (t / x);
	} else if (z <= 4.1e+70) {
		tmp = x;
	} else if (z <= 9.5e+83) {
		tmp = y / (z / -x);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= (-2.2d+90)) then
        tmp = x
    else if (z <= (-5.5d-15)) then
        tmp = y * (x / t)
    else if (z <= (-9d-57)) then
        tmp = (z * x) / z
    else if (z <= (-1.15d-171)) then
        tmp = (z * -x) / t
    else if (z <= (-6.8d-176)) then
        tmp = y * (x / -z)
    else if (z <= 6d+15) then
        tmp = y / (t / x)
    else if (z <= 4.1d+70) then
        tmp = x
    else if (z <= 9.5d+83) then
        tmp = y / (z / -x)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -2.2e+90) {
		tmp = x;
	} else if (z <= -5.5e-15) {
		tmp = y * (x / t);
	} else if (z <= -9e-57) {
		tmp = (z * x) / z;
	} else if (z <= -1.15e-171) {
		tmp = (z * -x) / t;
	} else if (z <= -6.8e-176) {
		tmp = y * (x / -z);
	} else if (z <= 6e+15) {
		tmp = y / (t / x);
	} else if (z <= 4.1e+70) {
		tmp = x;
	} else if (z <= 9.5e+83) {
		tmp = y / (z / -x);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -2.2e+90:
		tmp = x
	elif z <= -5.5e-15:
		tmp = y * (x / t)
	elif z <= -9e-57:
		tmp = (z * x) / z
	elif z <= -1.15e-171:
		tmp = (z * -x) / t
	elif z <= -6.8e-176:
		tmp = y * (x / -z)
	elif z <= 6e+15:
		tmp = y / (t / x)
	elif z <= 4.1e+70:
		tmp = x
	elif z <= 9.5e+83:
		tmp = y / (z / -x)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -2.2e+90)
		tmp = x;
	elseif (z <= -5.5e-15)
		tmp = Float64(y * Float64(x / t));
	elseif (z <= -9e-57)
		tmp = Float64(Float64(z * x) / z);
	elseif (z <= -1.15e-171)
		tmp = Float64(Float64(z * Float64(-x)) / t);
	elseif (z <= -6.8e-176)
		tmp = Float64(y * Float64(x / Float64(-z)));
	elseif (z <= 6e+15)
		tmp = Float64(y / Float64(t / x));
	elseif (z <= 4.1e+70)
		tmp = x;
	elseif (z <= 9.5e+83)
		tmp = Float64(y / Float64(z / Float64(-x)));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -2.2e+90)
		tmp = x;
	elseif (z <= -5.5e-15)
		tmp = y * (x / t);
	elseif (z <= -9e-57)
		tmp = (z * x) / z;
	elseif (z <= -1.15e-171)
		tmp = (z * -x) / t;
	elseif (z <= -6.8e-176)
		tmp = y * (x / -z);
	elseif (z <= 6e+15)
		tmp = y / (t / x);
	elseif (z <= 4.1e+70)
		tmp = x;
	elseif (z <= 9.5e+83)
		tmp = y / (z / -x);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.2e+90], x, If[LessEqual[z, -5.5e-15], N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9e-57], N[(N[(z * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -1.15e-171], N[(N[(z * (-x)), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, -6.8e-176], N[(y * N[(x / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e+15], N[(y / N[(t / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.1e+70], x, If[LessEqual[z, 9.5e+83], N[(y / N[(z / (-x)), $MachinePrecision]), $MachinePrecision], x]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -9 \cdot 10^{-57}:\\
\;\;\;\;\frac{z \cdot x}{z}\\

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

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

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

\mathbf{elif}\;z \leq 4.1 \cdot 10^{+70}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 9.5 \cdot 10^{+83}:\\
\;\;\;\;\frac{y}{\frac{z}{-x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if z < -2.1999999999999999e90 or 6e15 < z < 4.1000000000000002e70 or 9.5000000000000002e83 < z

    1. Initial program 75.3%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 67.7%

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

    if -2.1999999999999999e90 < z < -5.5000000000000002e-15

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

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

    if -5.5000000000000002e-15 < z < -8.99999999999999945e-57

    1. Initial program 100.0%

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

        \[\leadsto \frac{\color{blue}{-\left(-x \cdot \left(y - z\right)\right)}}{t - z} \]
      2. distribute-lft-neg-out100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.99999999999999945e-57 < z < -1.14999999999999989e-171

    1. Initial program 97.8%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 66.4%

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

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

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

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

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

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

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

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

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

    if -1.14999999999999989e-171 < z < -6.7999999999999994e-176

    1. Initial program 99.7%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 99.7%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}} \]
    6. Step-by-step derivation
      1. remove-double-neg99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    15. Step-by-step derivation
      1. mul-1-neg99.7%

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

        \[\leadsto -\color{blue}{\frac{x}{z} \cdot y} \]
    16. Simplified100.0%

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

    if -6.7999999999999994e-176 < z < 6e15

    1. Initial program 90.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    6. Applied egg-rr90.9%

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

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

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

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

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

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

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

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

    if 4.1000000000000002e70 < z < 9.5000000000000002e83

    1. Initial program 62.3%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 62.3%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}} \]
    6. Step-by-step derivation
      1. remove-double-neg62.3%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(0 - \left(y - z\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      7. associate--r-99.7%

        \[\leadsto \color{blue}{\left(\left(0 - y\right) + z\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      8. neg-sub099.7%

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

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

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

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{0 - \left(t - z\right)}} \]
      12. associate--r-99.7%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(0 - t\right) + z}} \]
      13. neg-sub099.7%

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

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{z + \left(-t\right)}} \]
      15. sub-neg99.7%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    15. Step-by-step derivation
      1. mul-1-neg33.0%

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

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

      \[\leadsto \color{blue}{-\frac{x}{z} \cdot y} \]
    17. Step-by-step derivation
      1. *-commutative51.6%

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

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

        \[\leadsto -\color{blue}{\frac{y}{\frac{z}{x}}} \]
    18. Applied egg-rr51.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+90}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-15}:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq -9 \cdot 10^{-57}:\\ \;\;\;\;\frac{z \cdot x}{z}\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-171}:\\ \;\;\;\;\frac{z \cdot \left(-x\right)}{t}\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{-176}:\\ \;\;\;\;y \cdot \frac{x}{-z}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{+15}:\\ \;\;\;\;\frac{y}{\frac{t}{x}}\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{+70}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+83}:\\ \;\;\;\;\frac{y}{\frac{z}{-x}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 57.3% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+90}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{-14}:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-55}:\\ \;\;\;\;\frac{z \cdot x}{z}\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-111}:\\ \;\;\;\;\frac{x \cdot \left(-y\right)}{z}\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-158}:\\ \;\;\;\;z \cdot \frac{x}{-t}\\ \mathbf{elif}\;z \leq 33000000000000:\\ \;\;\;\;\frac{y}{\frac{t}{x}}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+74}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+84}:\\ \;\;\;\;\frac{y}{\frac{z}{-x}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -2.2e+90)
   x
   (if (<= z -5.2e-14)
     (* y (/ x t))
     (if (<= z -1.15e-55)
       (/ (* z x) z)
       (if (<= z -1.5e-111)
         (/ (* x (- y)) z)
         (if (<= z -5.5e-158)
           (* z (/ x (- t)))
           (if (<= z 33000000000000.0)
             (/ y (/ t x))
             (if (<= z 9e+74) x (if (<= z 3.4e+84) (/ y (/ z (- x))) x)))))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -2.2e+90) {
		tmp = x;
	} else if (z <= -5.2e-14) {
		tmp = y * (x / t);
	} else if (z <= -1.15e-55) {
		tmp = (z * x) / z;
	} else if (z <= -1.5e-111) {
		tmp = (x * -y) / z;
	} else if (z <= -5.5e-158) {
		tmp = z * (x / -t);
	} else if (z <= 33000000000000.0) {
		tmp = y / (t / x);
	} else if (z <= 9e+74) {
		tmp = x;
	} else if (z <= 3.4e+84) {
		tmp = y / (z / -x);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= (-2.2d+90)) then
        tmp = x
    else if (z <= (-5.2d-14)) then
        tmp = y * (x / t)
    else if (z <= (-1.15d-55)) then
        tmp = (z * x) / z
    else if (z <= (-1.5d-111)) then
        tmp = (x * -y) / z
    else if (z <= (-5.5d-158)) then
        tmp = z * (x / -t)
    else if (z <= 33000000000000.0d0) then
        tmp = y / (t / x)
    else if (z <= 9d+74) then
        tmp = x
    else if (z <= 3.4d+84) then
        tmp = y / (z / -x)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -2.2e+90) {
		tmp = x;
	} else if (z <= -5.2e-14) {
		tmp = y * (x / t);
	} else if (z <= -1.15e-55) {
		tmp = (z * x) / z;
	} else if (z <= -1.5e-111) {
		tmp = (x * -y) / z;
	} else if (z <= -5.5e-158) {
		tmp = z * (x / -t);
	} else if (z <= 33000000000000.0) {
		tmp = y / (t / x);
	} else if (z <= 9e+74) {
		tmp = x;
	} else if (z <= 3.4e+84) {
		tmp = y / (z / -x);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -2.2e+90:
		tmp = x
	elif z <= -5.2e-14:
		tmp = y * (x / t)
	elif z <= -1.15e-55:
		tmp = (z * x) / z
	elif z <= -1.5e-111:
		tmp = (x * -y) / z
	elif z <= -5.5e-158:
		tmp = z * (x / -t)
	elif z <= 33000000000000.0:
		tmp = y / (t / x)
	elif z <= 9e+74:
		tmp = x
	elif z <= 3.4e+84:
		tmp = y / (z / -x)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -2.2e+90)
		tmp = x;
	elseif (z <= -5.2e-14)
		tmp = Float64(y * Float64(x / t));
	elseif (z <= -1.15e-55)
		tmp = Float64(Float64(z * x) / z);
	elseif (z <= -1.5e-111)
		tmp = Float64(Float64(x * Float64(-y)) / z);
	elseif (z <= -5.5e-158)
		tmp = Float64(z * Float64(x / Float64(-t)));
	elseif (z <= 33000000000000.0)
		tmp = Float64(y / Float64(t / x));
	elseif (z <= 9e+74)
		tmp = x;
	elseif (z <= 3.4e+84)
		tmp = Float64(y / Float64(z / Float64(-x)));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -2.2e+90)
		tmp = x;
	elseif (z <= -5.2e-14)
		tmp = y * (x / t);
	elseif (z <= -1.15e-55)
		tmp = (z * x) / z;
	elseif (z <= -1.5e-111)
		tmp = (x * -y) / z;
	elseif (z <= -5.5e-158)
		tmp = z * (x / -t);
	elseif (z <= 33000000000000.0)
		tmp = y / (t / x);
	elseif (z <= 9e+74)
		tmp = x;
	elseif (z <= 3.4e+84)
		tmp = y / (z / -x);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.2e+90], x, If[LessEqual[z, -5.2e-14], N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.15e-55], N[(N[(z * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -1.5e-111], N[(N[(x * (-y)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -5.5e-158], N[(z * N[(x / (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 33000000000000.0], N[(y / N[(t / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e+74], x, If[LessEqual[z, 3.4e+84], N[(y / N[(z / (-x)), $MachinePrecision]), $MachinePrecision], x]]]]]]]]
\begin{array}{l}

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

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

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

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

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

\mathbf{elif}\;z \leq 33000000000000:\\
\;\;\;\;\frac{y}{\frac{t}{x}}\\

\mathbf{elif}\;z \leq 9 \cdot 10^{+74}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 3.4 \cdot 10^{+84}:\\
\;\;\;\;\frac{y}{\frac{z}{-x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if z < -2.1999999999999999e90 or 3.3e13 < z < 8.9999999999999999e74 or 3.3999999999999998e84 < z

    1. Initial program 75.3%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 67.7%

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

    if -2.1999999999999999e90 < z < -5.19999999999999993e-14

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

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

    if -5.19999999999999993e-14 < z < -1.15000000000000006e-55

    1. Initial program 100.0%

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

        \[\leadsto \frac{\color{blue}{-\left(-x \cdot \left(y - z\right)\right)}}{t - z} \]
      2. distribute-lft-neg-out100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.15000000000000006e-55 < z < -1.50000000000000004e-111

    1. Initial program 95.9%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 95.9%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}} \]
    6. Step-by-step derivation
      1. remove-double-neg95.9%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(0 - \left(y - z\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      7. associate--r-99.7%

        \[\leadsto \color{blue}{\left(\left(0 - y\right) + z\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      8. neg-sub099.7%

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

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

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

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{0 - \left(t - z\right)}} \]
      12. associate--r-99.7%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(0 - t\right) + z}} \]
      13. neg-sub099.7%

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

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{z + \left(-t\right)}} \]
      15. sub-neg99.7%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-x \cdot y}}{z} \]
      3. distribute-rgt-neg-in60.9%

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

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

    if -1.50000000000000004e-111 < z < -5.50000000000000025e-158

    1. Initial program 99.6%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num86.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.50000000000000025e-158 < z < 3.3e13

    1. Initial program 91.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.9999999999999999e74 < z < 3.3999999999999998e84

    1. Initial program 62.3%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 62.3%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}} \]
    6. Step-by-step derivation
      1. remove-double-neg62.3%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(0 - \left(y - z\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      7. associate--r-99.7%

        \[\leadsto \color{blue}{\left(\left(0 - y\right) + z\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      8. neg-sub099.7%

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

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

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

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{0 - \left(t - z\right)}} \]
      12. associate--r-99.7%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(0 - t\right) + z}} \]
      13. neg-sub099.7%

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

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{z + \left(-t\right)}} \]
      15. sub-neg99.7%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    15. Step-by-step derivation
      1. mul-1-neg33.0%

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

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

      \[\leadsto \color{blue}{-\frac{x}{z} \cdot y} \]
    17. Step-by-step derivation
      1. *-commutative51.6%

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

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

        \[\leadsto -\color{blue}{\frac{y}{\frac{z}{x}}} \]
    18. Applied egg-rr51.6%

      \[\leadsto -\color{blue}{\frac{y}{\frac{z}{x}}} \]
  3. Recombined 7 regimes into one program.
  4. Final simplification64.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+90}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{-14}:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-55}:\\ \;\;\;\;\frac{z \cdot x}{z}\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-111}:\\ \;\;\;\;\frac{x \cdot \left(-y\right)}{z}\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-158}:\\ \;\;\;\;z \cdot \frac{x}{-t}\\ \mathbf{elif}\;z \leq 33000000000000:\\ \;\;\;\;\frac{y}{\frac{t}{x}}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+74}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+84}:\\ \;\;\;\;\frac{y}{\frac{z}{-x}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 56.4% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+90}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-13}:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-55}:\\ \;\;\;\;\frac{z \cdot x}{z}\\ \mathbf{elif}\;z \leq -3.7 \cdot 10^{-171}:\\ \;\;\;\;z \cdot \frac{x}{-t}\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{-176}:\\ \;\;\;\;y \cdot \frac{x}{-z}\\ \mathbf{elif}\;z \leq 4.9 \cdot 10^{+14}:\\ \;\;\;\;\frac{y}{\frac{t}{x}}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+70}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.22 \cdot 10^{+84}:\\ \;\;\;\;\frac{y}{\frac{z}{-x}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -2.8e+90)
   x
   (if (<= z -3.4e-13)
     (* y (/ x t))
     (if (<= z -1.15e-55)
       (/ (* z x) z)
       (if (<= z -3.7e-171)
         (* z (/ x (- t)))
         (if (<= z -6.8e-176)
           (* y (/ x (- z)))
           (if (<= z 4.9e+14)
             (/ y (/ t x))
             (if (<= z 2.3e+70)
               x
               (if (<= z 1.22e+84) (/ y (/ z (- x))) x)))))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -2.8e+90) {
		tmp = x;
	} else if (z <= -3.4e-13) {
		tmp = y * (x / t);
	} else if (z <= -1.15e-55) {
		tmp = (z * x) / z;
	} else if (z <= -3.7e-171) {
		tmp = z * (x / -t);
	} else if (z <= -6.8e-176) {
		tmp = y * (x / -z);
	} else if (z <= 4.9e+14) {
		tmp = y / (t / x);
	} else if (z <= 2.3e+70) {
		tmp = x;
	} else if (z <= 1.22e+84) {
		tmp = y / (z / -x);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= (-2.8d+90)) then
        tmp = x
    else if (z <= (-3.4d-13)) then
        tmp = y * (x / t)
    else if (z <= (-1.15d-55)) then
        tmp = (z * x) / z
    else if (z <= (-3.7d-171)) then
        tmp = z * (x / -t)
    else if (z <= (-6.8d-176)) then
        tmp = y * (x / -z)
    else if (z <= 4.9d+14) then
        tmp = y / (t / x)
    else if (z <= 2.3d+70) then
        tmp = x
    else if (z <= 1.22d+84) then
        tmp = y / (z / -x)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -2.8e+90) {
		tmp = x;
	} else if (z <= -3.4e-13) {
		tmp = y * (x / t);
	} else if (z <= -1.15e-55) {
		tmp = (z * x) / z;
	} else if (z <= -3.7e-171) {
		tmp = z * (x / -t);
	} else if (z <= -6.8e-176) {
		tmp = y * (x / -z);
	} else if (z <= 4.9e+14) {
		tmp = y / (t / x);
	} else if (z <= 2.3e+70) {
		tmp = x;
	} else if (z <= 1.22e+84) {
		tmp = y / (z / -x);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -2.8e+90:
		tmp = x
	elif z <= -3.4e-13:
		tmp = y * (x / t)
	elif z <= -1.15e-55:
		tmp = (z * x) / z
	elif z <= -3.7e-171:
		tmp = z * (x / -t)
	elif z <= -6.8e-176:
		tmp = y * (x / -z)
	elif z <= 4.9e+14:
		tmp = y / (t / x)
	elif z <= 2.3e+70:
		tmp = x
	elif z <= 1.22e+84:
		tmp = y / (z / -x)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -2.8e+90)
		tmp = x;
	elseif (z <= -3.4e-13)
		tmp = Float64(y * Float64(x / t));
	elseif (z <= -1.15e-55)
		tmp = Float64(Float64(z * x) / z);
	elseif (z <= -3.7e-171)
		tmp = Float64(z * Float64(x / Float64(-t)));
	elseif (z <= -6.8e-176)
		tmp = Float64(y * Float64(x / Float64(-z)));
	elseif (z <= 4.9e+14)
		tmp = Float64(y / Float64(t / x));
	elseif (z <= 2.3e+70)
		tmp = x;
	elseif (z <= 1.22e+84)
		tmp = Float64(y / Float64(z / Float64(-x)));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -2.8e+90)
		tmp = x;
	elseif (z <= -3.4e-13)
		tmp = y * (x / t);
	elseif (z <= -1.15e-55)
		tmp = (z * x) / z;
	elseif (z <= -3.7e-171)
		tmp = z * (x / -t);
	elseif (z <= -6.8e-176)
		tmp = y * (x / -z);
	elseif (z <= 4.9e+14)
		tmp = y / (t / x);
	elseif (z <= 2.3e+70)
		tmp = x;
	elseif (z <= 1.22e+84)
		tmp = y / (z / -x);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.8e+90], x, If[LessEqual[z, -3.4e-13], N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.15e-55], N[(N[(z * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -3.7e-171], N[(z * N[(x / (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.8e-176], N[(y * N[(x / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.9e+14], N[(y / N[(t / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.3e+70], x, If[LessEqual[z, 1.22e+84], N[(y / N[(z / (-x)), $MachinePrecision]), $MachinePrecision], x]]]]]]]]
\begin{array}{l}

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

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

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

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

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

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

\mathbf{elif}\;z \leq 2.3 \cdot 10^{+70}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.22 \cdot 10^{+84}:\\
\;\;\;\;\frac{y}{\frac{z}{-x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if z < -2.8e90 or 4.9e14 < z < 2.29999999999999994e70 or 1.2200000000000001e84 < z

    1. Initial program 75.3%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 67.7%

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

    if -2.8e90 < z < -3.40000000000000015e-13

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

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

    if -3.40000000000000015e-13 < z < -1.15000000000000006e-55

    1. Initial program 100.0%

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

        \[\leadsto \frac{\color{blue}{-\left(-x \cdot \left(y - z\right)\right)}}{t - z} \]
      2. distribute-lft-neg-out100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.15000000000000006e-55 < z < -3.70000000000000012e-171

    1. Initial program 97.8%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num85.3%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    6. Applied egg-rr85.3%

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

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

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

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

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

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

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

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

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

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

    if -3.70000000000000012e-171 < z < -6.7999999999999994e-176

    1. Initial program 99.7%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 99.7%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}} \]
    6. Step-by-step derivation
      1. remove-double-neg99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    15. Step-by-step derivation
      1. mul-1-neg99.7%

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

        \[\leadsto -\color{blue}{\frac{x}{z} \cdot y} \]
    16. Simplified100.0%

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

    if -6.7999999999999994e-176 < z < 4.9e14

    1. Initial program 90.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    6. Applied egg-rr90.9%

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

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

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

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

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

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

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

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

    if 2.29999999999999994e70 < z < 1.2200000000000001e84

    1. Initial program 62.3%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 62.3%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}} \]
    6. Step-by-step derivation
      1. remove-double-neg62.3%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(0 - \left(y - z\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      7. associate--r-99.7%

        \[\leadsto \color{blue}{\left(\left(0 - y\right) + z\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      8. neg-sub099.7%

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

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

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

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{0 - \left(t - z\right)}} \]
      12. associate--r-99.7%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(0 - t\right) + z}} \]
      13. neg-sub099.7%

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

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{z + \left(-t\right)}} \]
      15. sub-neg99.7%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    15. Step-by-step derivation
      1. mul-1-neg33.0%

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

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

      \[\leadsto \color{blue}{-\frac{x}{z} \cdot y} \]
    17. Step-by-step derivation
      1. *-commutative51.6%

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

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

        \[\leadsto -\color{blue}{\frac{y}{\frac{z}{x}}} \]
    18. Applied egg-rr51.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+90}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-13}:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-55}:\\ \;\;\;\;\frac{z \cdot x}{z}\\ \mathbf{elif}\;z \leq -3.7 \cdot 10^{-171}:\\ \;\;\;\;z \cdot \frac{x}{-t}\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{-176}:\\ \;\;\;\;y \cdot \frac{x}{-z}\\ \mathbf{elif}\;z \leq 4.9 \cdot 10^{+14}:\\ \;\;\;\;\frac{y}{\frac{t}{x}}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+70}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.22 \cdot 10^{+84}:\\ \;\;\;\;\frac{y}{\frac{z}{-x}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 72.0% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y - z}{t}\\ \mathbf{if}\;z \leq -1 \cdot 10^{-106}:\\ \;\;\;\;x \cdot \frac{z - y}{z}\\ \mathbf{elif}\;z \leq -9.95 \cdot 10^{-173}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{-176}:\\ \;\;\;\;y \cdot \frac{x}{-z}\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-186}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq -8.6 \cdot 10^{-187}:\\ \;\;\;\;\frac{y}{\frac{z}{-x}}\\ \mathbf{elif}\;z \leq 34000000000000:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (/ (- y z) t))))
   (if (<= z -1e-106)
     (* x (/ (- z y) z))
     (if (<= z -9.95e-173)
       t_1
       (if (<= z -6.8e-176)
         (* y (/ x (- z)))
         (if (<= z -3.5e-186)
           (* x (/ y t))
           (if (<= z -8.6e-187)
             (/ y (/ z (- x)))
             (if (<= z 34000000000000.0) t_1 (* x (- 1.0 (/ y z)))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * ((y - z) / t);
	double tmp;
	if (z <= -1e-106) {
		tmp = x * ((z - y) / z);
	} else if (z <= -9.95e-173) {
		tmp = t_1;
	} else if (z <= -6.8e-176) {
		tmp = y * (x / -z);
	} else if (z <= -3.5e-186) {
		tmp = x * (y / t);
	} else if (z <= -8.6e-187) {
		tmp = y / (z / -x);
	} else if (z <= 34000000000000.0) {
		tmp = t_1;
	} else {
		tmp = x * (1.0 - (y / 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) :: t_1
    real(8) :: tmp
    t_1 = x * ((y - z) / t)
    if (z <= (-1d-106)) then
        tmp = x * ((z - y) / z)
    else if (z <= (-9.95d-173)) then
        tmp = t_1
    else if (z <= (-6.8d-176)) then
        tmp = y * (x / -z)
    else if (z <= (-3.5d-186)) then
        tmp = x * (y / t)
    else if (z <= (-8.6d-187)) then
        tmp = y / (z / -x)
    else if (z <= 34000000000000.0d0) then
        tmp = t_1
    else
        tmp = x * (1.0d0 - (y / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x * ((y - z) / t);
	double tmp;
	if (z <= -1e-106) {
		tmp = x * ((z - y) / z);
	} else if (z <= -9.95e-173) {
		tmp = t_1;
	} else if (z <= -6.8e-176) {
		tmp = y * (x / -z);
	} else if (z <= -3.5e-186) {
		tmp = x * (y / t);
	} else if (z <= -8.6e-187) {
		tmp = y / (z / -x);
	} else if (z <= 34000000000000.0) {
		tmp = t_1;
	} else {
		tmp = x * (1.0 - (y / z));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * ((y - z) / t)
	tmp = 0
	if z <= -1e-106:
		tmp = x * ((z - y) / z)
	elif z <= -9.95e-173:
		tmp = t_1
	elif z <= -6.8e-176:
		tmp = y * (x / -z)
	elif z <= -3.5e-186:
		tmp = x * (y / t)
	elif z <= -8.6e-187:
		tmp = y / (z / -x)
	elif z <= 34000000000000.0:
		tmp = t_1
	else:
		tmp = x * (1.0 - (y / z))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(Float64(y - z) / t))
	tmp = 0.0
	if (z <= -1e-106)
		tmp = Float64(x * Float64(Float64(z - y) / z));
	elseif (z <= -9.95e-173)
		tmp = t_1;
	elseif (z <= -6.8e-176)
		tmp = Float64(y * Float64(x / Float64(-z)));
	elseif (z <= -3.5e-186)
		tmp = Float64(x * Float64(y / t));
	elseif (z <= -8.6e-187)
		tmp = Float64(y / Float64(z / Float64(-x)));
	elseif (z <= 34000000000000.0)
		tmp = t_1;
	else
		tmp = Float64(x * Float64(1.0 - Float64(y / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * ((y - z) / t);
	tmp = 0.0;
	if (z <= -1e-106)
		tmp = x * ((z - y) / z);
	elseif (z <= -9.95e-173)
		tmp = t_1;
	elseif (z <= -6.8e-176)
		tmp = y * (x / -z);
	elseif (z <= -3.5e-186)
		tmp = x * (y / t);
	elseif (z <= -8.6e-187)
		tmp = y / (z / -x);
	elseif (z <= 34000000000000.0)
		tmp = t_1;
	else
		tmp = x * (1.0 - (y / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e-106], N[(x * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9.95e-173], t$95$1, If[LessEqual[z, -6.8e-176], N[(y * N[(x / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.5e-186], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -8.6e-187], N[(y / N[(z / (-x)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 34000000000000.0], t$95$1, N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -9.95 \cdot 10^{-173}:\\
\;\;\;\;t\_1\\

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

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

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

\mathbf{elif}\;z \leq 34000000000000:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -9.99999999999999941e-107

    1. Initial program 84.1%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 84.1%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}} \]
    6. Step-by-step derivation
      1. remove-double-neg84.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(0 - \left(y - z\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      7. associate--r-78.1%

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

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

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

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

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{0 - \left(t - z\right)}} \]
      12. associate--r-78.1%

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

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

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

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

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

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

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

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

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

    if -9.99999999999999941e-107 < z < -9.9499999999999999e-173 or -8.60000000000000001e-187 < z < 3.4e13

    1. Initial program 92.4%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 79.3%

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

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

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

    if -9.9499999999999999e-173 < z < -6.7999999999999994e-176

    1. Initial program 99.2%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 99.2%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}} \]
    6. Step-by-step derivation
      1. remove-double-neg99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    15. Step-by-step derivation
      1. mul-1-neg99.2%

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

        \[\leadsto -\color{blue}{\frac{x}{z} \cdot y} \]
    16. Simplified100.0%

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

    if -6.7999999999999994e-176 < z < -3.49999999999999989e-186

    1. Initial program 100.0%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 100.0%

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

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

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

    if -3.49999999999999989e-186 < z < -8.60000000000000001e-187

    1. Initial program 68.2%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 68.2%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}} \]
    6. Step-by-step derivation
      1. remove-double-neg68.2%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(0 - \left(y - z\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      7. associate--r-99.5%

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

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

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

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

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{0 - \left(t - z\right)}} \]
      12. associate--r-99.5%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(0 - t\right) + z}} \]
      13. neg-sub099.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    15. Step-by-step derivation
      1. mul-1-neg68.2%

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

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

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

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

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

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

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

    if 3.4e13 < z

    1. Initial program 74.8%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 53.9%

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

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

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

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y - z}{z}\right)} \]
      4. distribute-frac-neg73.6%

        \[\leadsto x \cdot \color{blue}{\frac{-\left(y - z\right)}{z}} \]
      5. neg-sub073.6%

        \[\leadsto x \cdot \frac{\color{blue}{0 - \left(y - z\right)}}{z} \]
      6. associate--r-73.6%

        \[\leadsto x \cdot \frac{\color{blue}{\left(0 - y\right) + z}}{z} \]
      7. neg-sub073.6%

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{z} - \frac{y}{z}\right)} \]
      11. *-inverses73.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{-106}:\\ \;\;\;\;x \cdot \frac{z - y}{z}\\ \mathbf{elif}\;z \leq -9.95 \cdot 10^{-173}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{-176}:\\ \;\;\;\;y \cdot \frac{x}{-z}\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-186}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq -8.6 \cdot 10^{-187}:\\ \;\;\;\;\frac{y}{\frac{z}{-x}}\\ \mathbf{elif}\;z \leq 34000000000000:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 71.8% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y - z}{t}\\ t_2 := x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;z \leq -7.2 \cdot 10^{-109}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -9.95 \cdot 10^{-173}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{-176}:\\ \;\;\;\;y \cdot \frac{x}{-z}\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{-183}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq -8.6 \cdot 10^{-187}:\\ \;\;\;\;\frac{y}{\frac{z}{-x}}\\ \mathbf{elif}\;z \leq 60000000000000:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (/ (- y z) t))) (t_2 (* x (- 1.0 (/ y z)))))
   (if (<= z -7.2e-109)
     t_2
     (if (<= z -9.95e-173)
       t_1
       (if (<= z -6.8e-176)
         (* y (/ x (- z)))
         (if (<= z -2.5e-183)
           (* x (/ y t))
           (if (<= z -8.6e-187)
             (/ y (/ z (- x)))
             (if (<= z 60000000000000.0) t_1 t_2))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * ((y - z) / t);
	double t_2 = x * (1.0 - (y / z));
	double tmp;
	if (z <= -7.2e-109) {
		tmp = t_2;
	} else if (z <= -9.95e-173) {
		tmp = t_1;
	} else if (z <= -6.8e-176) {
		tmp = y * (x / -z);
	} else if (z <= -2.5e-183) {
		tmp = x * (y / t);
	} else if (z <= -8.6e-187) {
		tmp = y / (z / -x);
	} else if (z <= 60000000000000.0) {
		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 - z) / t)
    t_2 = x * (1.0d0 - (y / z))
    if (z <= (-7.2d-109)) then
        tmp = t_2
    else if (z <= (-9.95d-173)) then
        tmp = t_1
    else if (z <= (-6.8d-176)) then
        tmp = y * (x / -z)
    else if (z <= (-2.5d-183)) then
        tmp = x * (y / t)
    else if (z <= (-8.6d-187)) then
        tmp = y / (z / -x)
    else if (z <= 60000000000000.0d0) 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 - z) / t);
	double t_2 = x * (1.0 - (y / z));
	double tmp;
	if (z <= -7.2e-109) {
		tmp = t_2;
	} else if (z <= -9.95e-173) {
		tmp = t_1;
	} else if (z <= -6.8e-176) {
		tmp = y * (x / -z);
	} else if (z <= -2.5e-183) {
		tmp = x * (y / t);
	} else if (z <= -8.6e-187) {
		tmp = y / (z / -x);
	} else if (z <= 60000000000000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * ((y - z) / t)
	t_2 = x * (1.0 - (y / z))
	tmp = 0
	if z <= -7.2e-109:
		tmp = t_2
	elif z <= -9.95e-173:
		tmp = t_1
	elif z <= -6.8e-176:
		tmp = y * (x / -z)
	elif z <= -2.5e-183:
		tmp = x * (y / t)
	elif z <= -8.6e-187:
		tmp = y / (z / -x)
	elif z <= 60000000000000.0:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(Float64(y - z) / t))
	t_2 = Float64(x * Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (z <= -7.2e-109)
		tmp = t_2;
	elseif (z <= -9.95e-173)
		tmp = t_1;
	elseif (z <= -6.8e-176)
		tmp = Float64(y * Float64(x / Float64(-z)));
	elseif (z <= -2.5e-183)
		tmp = Float64(x * Float64(y / t));
	elseif (z <= -8.6e-187)
		tmp = Float64(y / Float64(z / Float64(-x)));
	elseif (z <= 60000000000000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * ((y - z) / t);
	t_2 = x * (1.0 - (y / z));
	tmp = 0.0;
	if (z <= -7.2e-109)
		tmp = t_2;
	elseif (z <= -9.95e-173)
		tmp = t_1;
	elseif (z <= -6.8e-176)
		tmp = y * (x / -z);
	elseif (z <= -2.5e-183)
		tmp = x * (y / t);
	elseif (z <= -8.6e-187)
		tmp = y / (z / -x);
	elseif (z <= 60000000000000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.2e-109], t$95$2, If[LessEqual[z, -9.95e-173], t$95$1, If[LessEqual[z, -6.8e-176], N[(y * N[(x / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.5e-183], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -8.6e-187], N[(y / N[(z / (-x)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 60000000000000.0], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \frac{y - z}{t}\\
t_2 := x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{-109}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -9.95 \cdot 10^{-173}:\\
\;\;\;\;t\_1\\

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

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

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

\mathbf{elif}\;z \leq 60000000000000:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -7.2000000000000001e-109 or 6e13 < z

    1. Initial program 79.6%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 56.6%

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

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

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

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y - z}{z}\right)} \]
      4. distribute-frac-neg73.6%

        \[\leadsto x \cdot \color{blue}{\frac{-\left(y - z\right)}{z}} \]
      5. neg-sub073.6%

        \[\leadsto x \cdot \frac{\color{blue}{0 - \left(y - z\right)}}{z} \]
      6. associate--r-73.6%

        \[\leadsto x \cdot \frac{\color{blue}{\left(0 - y\right) + z}}{z} \]
      7. neg-sub073.6%

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{z} - \frac{y}{z}\right)} \]
      11. *-inverses73.6%

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

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

    if -7.2000000000000001e-109 < z < -9.9499999999999999e-173 or -8.60000000000000001e-187 < z < 6e13

    1. Initial program 92.4%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 79.3%

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

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

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

    if -9.9499999999999999e-173 < z < -6.7999999999999994e-176

    1. Initial program 99.2%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 99.2%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}} \]
    6. Step-by-step derivation
      1. remove-double-neg99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    15. Step-by-step derivation
      1. mul-1-neg99.2%

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

        \[\leadsto -\color{blue}{\frac{x}{z} \cdot y} \]
    16. Simplified100.0%

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

    if -6.7999999999999994e-176 < z < -2.5000000000000001e-183

    1. Initial program 100.0%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 100.0%

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

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

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

    if -2.5000000000000001e-183 < z < -8.60000000000000001e-187

    1. Initial program 76.1%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 76.1%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}} \]
    6. Step-by-step derivation
      1. remove-double-neg76.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(0 - \left(y - z\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      7. associate--r-99.6%

        \[\leadsto \color{blue}{\left(\left(0 - y\right) + z\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      8. neg-sub099.6%

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

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

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

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{0 - \left(t - z\right)}} \]
      12. associate--r-99.6%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(0 - t\right) + z}} \]
      13. neg-sub099.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    15. Step-by-step derivation
      1. mul-1-neg76.1%

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

        \[\leadsto -\color{blue}{\frac{x}{z} \cdot y} \]
    16. Simplified99.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{-109}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -9.95 \cdot 10^{-173}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{-176}:\\ \;\;\;\;y \cdot \frac{x}{-z}\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{-183}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq -8.6 \cdot 10^{-187}:\\ \;\;\;\;\frac{y}{\frac{z}{-x}}\\ \mathbf{elif}\;z \leq 60000000000000:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 58.8% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;z \leq -3.9 \cdot 10^{-56}:\\
\;\;\;\;\frac{z \cdot x}{z}\\

\mathbf{elif}\;z \leq 42000000000000:\\
\;\;\;\;\frac{y}{\frac{t}{x}}\\

\mathbf{elif}\;z \leq 2 \cdot 10^{+73}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.45 \cdot 10^{+84}:\\
\;\;\;\;\frac{y}{\frac{z}{-x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.1999999999999999e90 or 4.2e13 < z < 1.99999999999999997e73 or 1.44999999999999994e84 < z

    1. Initial program 75.3%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 67.7%

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

    if -2.1999999999999999e90 < z < -3.2000000000000002e-14

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

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

    if -3.2000000000000002e-14 < z < -3.9e-56

    1. Initial program 100.0%

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

        \[\leadsto \frac{\color{blue}{-\left(-x \cdot \left(y - z\right)\right)}}{t - z} \]
      2. distribute-lft-neg-out100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.9e-56 < z < 4.2e13

    1. Initial program 92.4%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num89.5%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{x}}} \]
    11. Applied egg-rr63.9%

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

    if 1.99999999999999997e73 < z < 1.44999999999999994e84

    1. Initial program 62.3%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 62.3%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}} \]
    6. Step-by-step derivation
      1. remove-double-neg62.3%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(0 - \left(y - z\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      7. associate--r-99.7%

        \[\leadsto \color{blue}{\left(\left(0 - y\right) + z\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      8. neg-sub099.7%

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

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

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

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{0 - \left(t - z\right)}} \]
      12. associate--r-99.7%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(0 - t\right) + z}} \]
      13. neg-sub099.7%

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

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{z + \left(-t\right)}} \]
      15. sub-neg99.7%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    15. Step-by-step derivation
      1. mul-1-neg33.0%

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

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

      \[\leadsto \color{blue}{-\frac{x}{z} \cdot y} \]
    17. Step-by-step derivation
      1. *-commutative51.6%

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

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

        \[\leadsto -\color{blue}{\frac{y}{\frac{z}{x}}} \]
    18. Applied egg-rr51.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+90}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-14}:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq -3.9 \cdot 10^{-56}:\\ \;\;\;\;\frac{z \cdot x}{z}\\ \mathbf{elif}\;z \leq 42000000000000:\\ \;\;\;\;\frac{y}{\frac{t}{x}}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+73}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+84}:\\ \;\;\;\;\frac{y}{\frac{z}{-x}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 58.8% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;z \leq -3.1 \cdot 10^{-56}:\\
\;\;\;\;\frac{z \cdot x}{z}\\

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

\mathbf{elif}\;z \leq 1.3 \cdot 10^{+74}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 2.7 \cdot 10^{+84}:\\
\;\;\;\;y \cdot \frac{x}{-z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.26e91 or 4.4e15 < z < 1.3e74 or 2.7e84 < z

    1. Initial program 75.3%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 67.7%

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

    if -1.26e91 < z < -2.1499999999999999e-13

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

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

    if -2.1499999999999999e-13 < z < -3.09999999999999987e-56

    1. Initial program 100.0%

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

        \[\leadsto \frac{\color{blue}{-\left(-x \cdot \left(y - z\right)\right)}}{t - z} \]
      2. distribute-lft-neg-out100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.09999999999999987e-56 < z < 4.4e15

    1. Initial program 92.4%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num89.5%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{x}}} \]
    11. Applied egg-rr63.9%

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

    if 1.3e74 < z < 2.7e84

    1. Initial program 62.3%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 62.3%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}} \]
    6. Step-by-step derivation
      1. remove-double-neg62.3%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(0 - \left(y - z\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      7. associate--r-99.7%

        \[\leadsto \color{blue}{\left(\left(0 - y\right) + z\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      8. neg-sub099.7%

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

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

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

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{0 - \left(t - z\right)}} \]
      12. associate--r-99.7%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(0 - t\right) + z}} \]
      13. neg-sub099.7%

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

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{z + \left(-t\right)}} \]
      15. sub-neg99.7%

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

        \[\leadsto \color{blue}{\frac{x}{z - t} \cdot \left(z - y\right)} \]
    7. Simplified99.7%

      \[\leadsto \color{blue}{\frac{x}{z - t} \cdot \left(z - y\right)} \]
    8. Taylor expanded in t around 0 23.7%

      \[\leadsto \color{blue}{\frac{x \cdot \left(z - y\right)}{z}} \]
    9. Step-by-step derivation
      1. associate-/l*42.3%

        \[\leadsto \color{blue}{x \cdot \frac{z - y}{z}} \]
    10. Simplified42.3%

      \[\leadsto \color{blue}{x \cdot \frac{z - y}{z}} \]
    11. Taylor expanded in z around 0 33.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    12. Step-by-step derivation
      1. associate-*r/33.0%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot y\right)}{z}} \]
      2. neg-mul-133.0%

        \[\leadsto \frac{\color{blue}{-x \cdot y}}{z} \]
      3. distribute-rgt-neg-in33.0%

        \[\leadsto \frac{\color{blue}{x \cdot \left(-y\right)}}{z} \]
    13. Simplified33.0%

      \[\leadsto \color{blue}{\frac{x \cdot \left(-y\right)}{z}} \]
    14. Taylor expanded in x around 0 33.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    15. Step-by-step derivation
      1. mul-1-neg33.0%

        \[\leadsto \color{blue}{-\frac{x \cdot y}{z}} \]
      2. associate-*l/51.6%

        \[\leadsto -\color{blue}{\frac{x}{z} \cdot y} \]
    16. Simplified51.6%

      \[\leadsto \color{blue}{-\frac{x}{z} \cdot y} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification63.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.26 \cdot 10^{+91}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -2.15 \cdot 10^{-13}:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq -3.1 \cdot 10^{-56}:\\ \;\;\;\;\frac{z \cdot x}{z}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+15}:\\ \;\;\;\;\frac{y}{\frac{t}{x}}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+74}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{+84}:\\ \;\;\;\;y \cdot \frac{x}{-z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 58.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+90}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{-15} \lor \neg \left(z \leq -1.45 \cdot 10^{-55}\right) \land \left(z \leq 52000000000000 \lor \neg \left(z \leq 8.5 \cdot 10^{+71}\right) \land z \leq 1.25 \cdot 10^{+84}\right):\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -5.2e+90)
   x
   (if (or (<= z -9.2e-15)
           (and (not (<= z -1.45e-55))
                (or (<= z 52000000000000.0)
                    (and (not (<= z 8.5e+71)) (<= z 1.25e+84)))))
     (* y (/ x t))
     x)))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -5.2e+90) {
		tmp = x;
	} else if ((z <= -9.2e-15) || (!(z <= -1.45e-55) && ((z <= 52000000000000.0) || (!(z <= 8.5e+71) && (z <= 1.25e+84))))) {
		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 <= (-5.2d+90)) then
        tmp = x
    else if ((z <= (-9.2d-15)) .or. (.not. (z <= (-1.45d-55))) .and. (z <= 52000000000000.0d0) .or. (.not. (z <= 8.5d+71)) .and. (z <= 1.25d+84)) 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 <= -5.2e+90) {
		tmp = x;
	} else if ((z <= -9.2e-15) || (!(z <= -1.45e-55) && ((z <= 52000000000000.0) || (!(z <= 8.5e+71) && (z <= 1.25e+84))))) {
		tmp = y * (x / t);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -5.2e+90:
		tmp = x
	elif (z <= -9.2e-15) or (not (z <= -1.45e-55) and ((z <= 52000000000000.0) or (not (z <= 8.5e+71) and (z <= 1.25e+84)))):
		tmp = y * (x / t)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -5.2e+90)
		tmp = x;
	elseif ((z <= -9.2e-15) || (!(z <= -1.45e-55) && ((z <= 52000000000000.0) || (!(z <= 8.5e+71) && (z <= 1.25e+84)))))
		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 <= -5.2e+90)
		tmp = x;
	elseif ((z <= -9.2e-15) || (~((z <= -1.45e-55)) && ((z <= 52000000000000.0) || (~((z <= 8.5e+71)) && (z <= 1.25e+84)))))
		tmp = y * (x / t);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -5.2e+90], x, If[Or[LessEqual[z, -9.2e-15], And[N[Not[LessEqual[z, -1.45e-55]], $MachinePrecision], Or[LessEqual[z, 52000000000000.0], And[N[Not[LessEqual[z, 8.5e+71]], $MachinePrecision], LessEqual[z, 1.25e+84]]]]], N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+90}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq -9.2 \cdot 10^{-15} \lor \neg \left(z \leq -1.45 \cdot 10^{-55}\right) \land \left(z \leq 52000000000000 \lor \neg \left(z \leq 8.5 \cdot 10^{+71}\right) \land z \leq 1.25 \cdot 10^{+84}\right):\\
\;\;\;\;y \cdot \frac{x}{t}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.1999999999999997e90 or -9.19999999999999961e-15 < z < -1.45e-55 or 5.2e13 < z < 8.4999999999999996e71 or 1.25e84 < z

    1. Initial program 77.3%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*99.8%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 66.8%

      \[\leadsto \color{blue}{x} \]

    if -5.1999999999999997e90 < z < -9.19999999999999961e-15 or -1.45e-55 < z < 5.2e13 or 8.4999999999999996e71 < z < 1.25e84

    1. Initial program 91.0%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*91.5%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified91.5%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num91.2%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
      2. un-div-inv91.2%

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    6. Applied egg-rr91.2%

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    7. Taylor expanded in z around 0 58.9%

      \[\leadsto \frac{x}{\color{blue}{\frac{t}{y}}} \]
    8. Step-by-step derivation
      1. associate-/r/59.8%

        \[\leadsto \color{blue}{\frac{x}{t} \cdot y} \]
    9. Applied egg-rr59.8%

      \[\leadsto \color{blue}{\frac{x}{t} \cdot y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification62.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+90}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{-15} \lor \neg \left(z \leq -1.45 \cdot 10^{-55}\right) \land \left(z \leq 52000000000000 \lor \neg \left(z \leq 8.5 \cdot 10^{+71}\right) \land z \leq 1.25 \cdot 10^{+84}\right):\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 59.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{+90}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.32 \cdot 10^{-14} \lor \neg \left(z \leq -2.6 \cdot 10^{-58}\right) \land \left(z \leq 1.2 \cdot 10^{+14} \lor \neg \left(z \leq 3.5 \cdot 10^{+74}\right) \land z \leq 4.2 \cdot 10^{+84}\right):\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -2.5e+90)
   x
   (if (or (<= z -1.32e-14)
           (and (not (<= z -2.6e-58))
                (or (<= z 1.2e+14) (and (not (<= z 3.5e+74)) (<= z 4.2e+84)))))
     (* x (/ y t))
     x)))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -2.5e+90) {
		tmp = x;
	} else if ((z <= -1.32e-14) || (!(z <= -2.6e-58) && ((z <= 1.2e+14) || (!(z <= 3.5e+74) && (z <= 4.2e+84))))) {
		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 <= (-2.5d+90)) then
        tmp = x
    else if ((z <= (-1.32d-14)) .or. (.not. (z <= (-2.6d-58))) .and. (z <= 1.2d+14) .or. (.not. (z <= 3.5d+74)) .and. (z <= 4.2d+84)) 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 <= -2.5e+90) {
		tmp = x;
	} else if ((z <= -1.32e-14) || (!(z <= -2.6e-58) && ((z <= 1.2e+14) || (!(z <= 3.5e+74) && (z <= 4.2e+84))))) {
		tmp = x * (y / t);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -2.5e+90:
		tmp = x
	elif (z <= -1.32e-14) or (not (z <= -2.6e-58) and ((z <= 1.2e+14) or (not (z <= 3.5e+74) and (z <= 4.2e+84)))):
		tmp = x * (y / t)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -2.5e+90)
		tmp = x;
	elseif ((z <= -1.32e-14) || (!(z <= -2.6e-58) && ((z <= 1.2e+14) || (!(z <= 3.5e+74) && (z <= 4.2e+84)))))
		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 <= -2.5e+90)
		tmp = x;
	elseif ((z <= -1.32e-14) || (~((z <= -2.6e-58)) && ((z <= 1.2e+14) || (~((z <= 3.5e+74)) && (z <= 4.2e+84)))))
		tmp = x * (y / t);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.5e+90], x, If[Or[LessEqual[z, -1.32e-14], And[N[Not[LessEqual[z, -2.6e-58]], $MachinePrecision], Or[LessEqual[z, 1.2e+14], And[N[Not[LessEqual[z, 3.5e+74]], $MachinePrecision], LessEqual[z, 4.2e+84]]]]], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+90}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq -1.32 \cdot 10^{-14} \lor \neg \left(z \leq -2.6 \cdot 10^{-58}\right) \land \left(z \leq 1.2 \cdot 10^{+14} \lor \neg \left(z \leq 3.5 \cdot 10^{+74}\right) \land z \leq 4.2 \cdot 10^{+84}\right):\\
\;\;\;\;x \cdot \frac{y}{t}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.5000000000000002e90 or -1.32e-14 < z < -2.60000000000000007e-58 or 1.2e14 < z < 3.50000000000000014e74 or 4.20000000000000037e84 < z

    1. Initial program 77.3%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*99.8%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 66.8%

      \[\leadsto \color{blue}{x} \]

    if -2.5000000000000002e90 < z < -1.32e-14 or -2.60000000000000007e-58 < z < 1.2e14 or 3.50000000000000014e74 < z < 4.20000000000000037e84

    1. Initial program 91.0%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*91.5%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified91.5%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 57.7%

      \[\leadsto \color{blue}{\frac{x \cdot y}{t}} \]
    6. Step-by-step derivation
      1. associate-/l*58.9%

        \[\leadsto \color{blue}{x \cdot \frac{y}{t}} \]
    7. Simplified58.9%

      \[\leadsto \color{blue}{x \cdot \frac{y}{t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification62.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{+90}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.32 \cdot 10^{-14} \lor \neg \left(z \leq -2.6 \cdot 10^{-58}\right) \land \left(z \leq 1.2 \cdot 10^{+14} \lor \neg \left(z \leq 3.5 \cdot 10^{+74}\right) \land z \leq 4.2 \cdot 10^{+84}\right):\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 58.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{x}{t}\\ \mathbf{if}\;z \leq -2.35 \cdot 10^{+90}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-12}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.48 \cdot 10^{-55}:\\ \;\;\;\;\frac{z \cdot x}{z}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+14}:\\ \;\;\;\;\frac{y}{\frac{t}{x}}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+74}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+84}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* y (/ x t))))
   (if (<= z -2.35e+90)
     x
     (if (<= z -1.2e-12)
       t_1
       (if (<= z -1.48e-55)
         (/ (* z x) z)
         (if (<= z 5e+14)
           (/ y (/ t x))
           (if (<= z 1.4e+74) x (if (<= z 1.1e+84) t_1 x))))))))
double code(double x, double y, double z, double t) {
	double t_1 = y * (x / t);
	double tmp;
	if (z <= -2.35e+90) {
		tmp = x;
	} else if (z <= -1.2e-12) {
		tmp = t_1;
	} else if (z <= -1.48e-55) {
		tmp = (z * x) / z;
	} else if (z <= 5e+14) {
		tmp = y / (t / x);
	} else if (z <= 1.4e+74) {
		tmp = x;
	} else if (z <= 1.1e+84) {
		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)
    if (z <= (-2.35d+90)) then
        tmp = x
    else if (z <= (-1.2d-12)) then
        tmp = t_1
    else if (z <= (-1.48d-55)) then
        tmp = (z * x) / z
    else if (z <= 5d+14) then
        tmp = y / (t / x)
    else if (z <= 1.4d+74) then
        tmp = x
    else if (z <= 1.1d+84) 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);
	double tmp;
	if (z <= -2.35e+90) {
		tmp = x;
	} else if (z <= -1.2e-12) {
		tmp = t_1;
	} else if (z <= -1.48e-55) {
		tmp = (z * x) / z;
	} else if (z <= 5e+14) {
		tmp = y / (t / x);
	} else if (z <= 1.4e+74) {
		tmp = x;
	} else if (z <= 1.1e+84) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = y * (x / t)
	tmp = 0
	if z <= -2.35e+90:
		tmp = x
	elif z <= -1.2e-12:
		tmp = t_1
	elif z <= -1.48e-55:
		tmp = (z * x) / z
	elif z <= 5e+14:
		tmp = y / (t / x)
	elif z <= 1.4e+74:
		tmp = x
	elif z <= 1.1e+84:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	t_1 = Float64(y * Float64(x / t))
	tmp = 0.0
	if (z <= -2.35e+90)
		tmp = x;
	elseif (z <= -1.2e-12)
		tmp = t_1;
	elseif (z <= -1.48e-55)
		tmp = Float64(Float64(z * x) / z);
	elseif (z <= 5e+14)
		tmp = Float64(y / Float64(t / x));
	elseif (z <= 1.4e+74)
		tmp = x;
	elseif (z <= 1.1e+84)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = y * (x / t);
	tmp = 0.0;
	if (z <= -2.35e+90)
		tmp = x;
	elseif (z <= -1.2e-12)
		tmp = t_1;
	elseif (z <= -1.48e-55)
		tmp = (z * x) / z;
	elseif (z <= 5e+14)
		tmp = y / (t / x);
	elseif (z <= 1.4e+74)
		tmp = x;
	elseif (z <= 1.1e+84)
		tmp = t_1;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.35e+90], x, If[LessEqual[z, -1.2e-12], t$95$1, If[LessEqual[z, -1.48e-55], N[(N[(z * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 5e+14], N[(y / N[(t / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e+74], x, If[LessEqual[z, 1.1e+84], t$95$1, x]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \frac{x}{t}\\
\mathbf{if}\;z \leq -2.35 \cdot 10^{+90}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq -1.2 \cdot 10^{-12}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.48 \cdot 10^{-55}:\\
\;\;\;\;\frac{z \cdot x}{z}\\

\mathbf{elif}\;z \leq 5 \cdot 10^{+14}:\\
\;\;\;\;\frac{y}{\frac{t}{x}}\\

\mathbf{elif}\;z \leq 1.4 \cdot 10^{+74}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.1 \cdot 10^{+84}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.3500000000000001e90 or 5e14 < z < 1.40000000000000001e74 or 1.0999999999999999e84 < z

    1. Initial program 75.3%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*99.8%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 67.7%

      \[\leadsto \color{blue}{x} \]

    if -2.3500000000000001e90 < z < -1.19999999999999994e-12 or 1.40000000000000001e74 < z < 1.0999999999999999e84

    1. Initial program 84.3%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*99.8%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.7%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
      2. un-div-inv99.7%

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    6. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    7. Taylor expanded in z around 0 39.2%

      \[\leadsto \frac{x}{\color{blue}{\frac{t}{y}}} \]
    8. Step-by-step derivation
      1. associate-/r/39.3%

        \[\leadsto \color{blue}{\frac{x}{t} \cdot y} \]
    9. Applied egg-rr39.3%

      \[\leadsto \color{blue}{\frac{x}{t} \cdot y} \]

    if -1.19999999999999994e-12 < z < -1.4800000000000001e-55

    1. Initial program 100.0%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. remove-double-neg100.0%

        \[\leadsto \frac{\color{blue}{-\left(-x \cdot \left(y - z\right)\right)}}{t - z} \]
      2. distribute-lft-neg-out100.0%

        \[\leadsto \frac{-\color{blue}{\left(-x\right) \cdot \left(y - z\right)}}{t - z} \]
      3. distribute-neg-frac100.0%

        \[\leadsto \color{blue}{-\frac{\left(-x\right) \cdot \left(y - z\right)}{t - z}} \]
      4. distribute-neg-frac2100.0%

        \[\leadsto \color{blue}{\frac{\left(-x\right) \cdot \left(y - z\right)}{-\left(t - z\right)}} \]
      5. distribute-lft-neg-out100.0%

        \[\leadsto \frac{\color{blue}{-x \cdot \left(y - z\right)}}{-\left(t - z\right)} \]
      6. distribute-rgt-neg-in100.0%

        \[\leadsto \frac{\color{blue}{x \cdot \left(-\left(y - z\right)\right)}}{-\left(t - z\right)} \]
      7. sub-neg100.0%

        \[\leadsto \frac{x \cdot \left(-\color{blue}{\left(y + \left(-z\right)\right)}\right)}{-\left(t - z\right)} \]
      8. distribute-neg-in100.0%

        \[\leadsto \frac{x \cdot \color{blue}{\left(\left(-y\right) + \left(-\left(-z\right)\right)\right)}}{-\left(t - z\right)} \]
      9. remove-double-neg100.0%

        \[\leadsto \frac{x \cdot \left(\left(-y\right) + \color{blue}{z}\right)}{-\left(t - z\right)} \]
      10. +-commutative100.0%

        \[\leadsto \frac{x \cdot \color{blue}{\left(z + \left(-y\right)\right)}}{-\left(t - z\right)} \]
      11. sub-neg100.0%

        \[\leadsto \frac{x \cdot \color{blue}{\left(z - y\right)}}{-\left(t - z\right)} \]
      12. sub-neg100.0%

        \[\leadsto \frac{x \cdot \left(z - y\right)}{-\color{blue}{\left(t + \left(-z\right)\right)}} \]
      13. distribute-neg-in100.0%

        \[\leadsto \frac{x \cdot \left(z - y\right)}{\color{blue}{\left(-t\right) + \left(-\left(-z\right)\right)}} \]
      14. remove-double-neg100.0%

        \[\leadsto \frac{x \cdot \left(z - y\right)}{\left(-t\right) + \color{blue}{z}} \]
      15. +-commutative100.0%

        \[\leadsto \frac{x \cdot \left(z - y\right)}{\color{blue}{z + \left(-t\right)}} \]
      16. sub-neg100.0%

        \[\leadsto \frac{x \cdot \left(z - y\right)}{\color{blue}{z - t}} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\frac{x \cdot \left(z - y\right)}{z - t}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 66.8%

      \[\leadsto \color{blue}{\frac{x \cdot \left(z - y\right)}{z}} \]
    6. Taylor expanded in z around inf 55.8%

      \[\leadsto \frac{\color{blue}{x \cdot z}}{z} \]

    if -1.4800000000000001e-55 < z < 5e14

    1. Initial program 92.4%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*89.9%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified89.9%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num89.5%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
      2. un-div-inv89.5%

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    6. Applied egg-rr89.5%

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    7. Taylor expanded in z around 0 62.8%

      \[\leadsto \frac{x}{\color{blue}{\frac{t}{y}}} \]
    8. Step-by-step derivation
      1. associate-/r/63.9%

        \[\leadsto \color{blue}{\frac{x}{t} \cdot y} \]
    9. Applied egg-rr63.9%

      \[\leadsto \color{blue}{\frac{x}{t} \cdot y} \]
    10. Step-by-step derivation
      1. *-commutative63.9%

        \[\leadsto \color{blue}{y \cdot \frac{x}{t}} \]
      2. clear-num63.9%

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{t}{x}}} \]
      3. un-div-inv63.9%

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{x}}} \]
    11. Applied egg-rr63.9%

      \[\leadsto \color{blue}{\frac{y}{\frac{t}{x}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification62.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.35 \cdot 10^{+90}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-12}:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq -1.48 \cdot 10^{-55}:\\ \;\;\;\;\frac{z \cdot x}{z}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+14}:\\ \;\;\;\;\frac{y}{\frac{t}{x}}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+74}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+84}:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 58.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{x}{t}\\ \mathbf{if}\;z \leq -5.2 \cdot 10^{+90}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-13}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{-55}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+14}:\\ \;\;\;\;\frac{y}{\frac{t}{x}}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+70}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+83}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* y (/ x t))))
   (if (<= z -5.2e+90)
     x
     (if (<= z -3.2e-13)
       t_1
       (if (<= z -1.75e-55)
         x
         (if (<= z 1.1e+14)
           (/ y (/ t x))
           (if (<= z 2.4e+70) x (if (<= z 9.5e+83) t_1 x))))))))
double code(double x, double y, double z, double t) {
	double t_1 = y * (x / t);
	double tmp;
	if (z <= -5.2e+90) {
		tmp = x;
	} else if (z <= -3.2e-13) {
		tmp = t_1;
	} else if (z <= -1.75e-55) {
		tmp = x;
	} else if (z <= 1.1e+14) {
		tmp = y / (t / x);
	} else if (z <= 2.4e+70) {
		tmp = x;
	} else if (z <= 9.5e+83) {
		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)
    if (z <= (-5.2d+90)) then
        tmp = x
    else if (z <= (-3.2d-13)) then
        tmp = t_1
    else if (z <= (-1.75d-55)) then
        tmp = x
    else if (z <= 1.1d+14) then
        tmp = y / (t / x)
    else if (z <= 2.4d+70) then
        tmp = x
    else if (z <= 9.5d+83) 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);
	double tmp;
	if (z <= -5.2e+90) {
		tmp = x;
	} else if (z <= -3.2e-13) {
		tmp = t_1;
	} else if (z <= -1.75e-55) {
		tmp = x;
	} else if (z <= 1.1e+14) {
		tmp = y / (t / x);
	} else if (z <= 2.4e+70) {
		tmp = x;
	} else if (z <= 9.5e+83) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = y * (x / t)
	tmp = 0
	if z <= -5.2e+90:
		tmp = x
	elif z <= -3.2e-13:
		tmp = t_1
	elif z <= -1.75e-55:
		tmp = x
	elif z <= 1.1e+14:
		tmp = y / (t / x)
	elif z <= 2.4e+70:
		tmp = x
	elif z <= 9.5e+83:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	t_1 = Float64(y * Float64(x / t))
	tmp = 0.0
	if (z <= -5.2e+90)
		tmp = x;
	elseif (z <= -3.2e-13)
		tmp = t_1;
	elseif (z <= -1.75e-55)
		tmp = x;
	elseif (z <= 1.1e+14)
		tmp = Float64(y / Float64(t / x));
	elseif (z <= 2.4e+70)
		tmp = x;
	elseif (z <= 9.5e+83)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = y * (x / t);
	tmp = 0.0;
	if (z <= -5.2e+90)
		tmp = x;
	elseif (z <= -3.2e-13)
		tmp = t_1;
	elseif (z <= -1.75e-55)
		tmp = x;
	elseif (z <= 1.1e+14)
		tmp = y / (t / x);
	elseif (z <= 2.4e+70)
		tmp = x;
	elseif (z <= 9.5e+83)
		tmp = t_1;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.2e+90], x, If[LessEqual[z, -3.2e-13], t$95$1, If[LessEqual[z, -1.75e-55], x, If[LessEqual[z, 1.1e+14], N[(y / N[(t / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.4e+70], x, If[LessEqual[z, 9.5e+83], t$95$1, x]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \frac{x}{t}\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{+90}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq -3.2 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.75 \cdot 10^{-55}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.1 \cdot 10^{+14}:\\
\;\;\;\;\frac{y}{\frac{t}{x}}\\

\mathbf{elif}\;z \leq 2.4 \cdot 10^{+70}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 9.5 \cdot 10^{+83}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.1999999999999997e90 or -3.2e-13 < z < -1.75000000000000013e-55 or 1.1e14 < z < 2.39999999999999987e70 or 9.5000000000000002e83 < z

    1. Initial program 77.3%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*99.8%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 66.8%

      \[\leadsto \color{blue}{x} \]

    if -5.1999999999999997e90 < z < -3.2e-13 or 2.39999999999999987e70 < z < 9.5000000000000002e83

    1. Initial program 84.3%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*99.8%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.7%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
      2. un-div-inv99.7%

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    6. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    7. Taylor expanded in z around 0 39.2%

      \[\leadsto \frac{x}{\color{blue}{\frac{t}{y}}} \]
    8. Step-by-step derivation
      1. associate-/r/39.3%

        \[\leadsto \color{blue}{\frac{x}{t} \cdot y} \]
    9. Applied egg-rr39.3%

      \[\leadsto \color{blue}{\frac{x}{t} \cdot y} \]

    if -1.75000000000000013e-55 < z < 1.1e14

    1. Initial program 92.4%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*89.9%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified89.9%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num89.5%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
      2. un-div-inv89.5%

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    6. Applied egg-rr89.5%

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    7. Taylor expanded in z around 0 62.8%

      \[\leadsto \frac{x}{\color{blue}{\frac{t}{y}}} \]
    8. Step-by-step derivation
      1. associate-/r/63.9%

        \[\leadsto \color{blue}{\frac{x}{t} \cdot y} \]
    9. Applied egg-rr63.9%

      \[\leadsto \color{blue}{\frac{x}{t} \cdot y} \]
    10. Step-by-step derivation
      1. *-commutative63.9%

        \[\leadsto \color{blue}{y \cdot \frac{x}{t}} \]
      2. clear-num63.9%

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{t}{x}}} \]
      3. un-div-inv63.9%

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{x}}} \]
    11. Applied egg-rr63.9%

      \[\leadsto \color{blue}{\frac{y}{\frac{t}{x}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification62.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+90}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-13}:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{-55}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+14}:\\ \;\;\;\;\frac{y}{\frac{t}{x}}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+70}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+83}:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 71.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{-107}:\\ \;\;\;\;x \cdot \frac{z - y}{z}\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-172}:\\ \;\;\;\;\frac{x \cdot \left(y - z\right)}{t}\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-180}:\\ \;\;\;\;\frac{x \cdot \left(-y\right)}{z}\\ \mathbf{elif}\;z \leq 130000000000:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+203}:\\ \;\;\;\;\frac{x}{1 - \frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{z - y}}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -8e-107)
   (* x (/ (- z y) z))
   (if (<= z -9.5e-172)
     (/ (* x (- y z)) t)
     (if (<= z -3e-180)
       (/ (* x (- y)) z)
       (if (<= z 130000000000.0)
         (* (- y z) (/ x t))
         (if (<= z 4e+203) (/ x (- 1.0 (/ t z))) (/ x (/ z (- z y)))))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -8e-107) {
		tmp = x * ((z - y) / z);
	} else if (z <= -9.5e-172) {
		tmp = (x * (y - z)) / t;
	} else if (z <= -3e-180) {
		tmp = (x * -y) / z;
	} else if (z <= 130000000000.0) {
		tmp = (y - z) * (x / t);
	} else if (z <= 4e+203) {
		tmp = x / (1.0 - (t / z));
	} else {
		tmp = x / (z / (z - y));
	}
	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 <= (-8d-107)) then
        tmp = x * ((z - y) / z)
    else if (z <= (-9.5d-172)) then
        tmp = (x * (y - z)) / t
    else if (z <= (-3d-180)) then
        tmp = (x * -y) / z
    else if (z <= 130000000000.0d0) then
        tmp = (y - z) * (x / t)
    else if (z <= 4d+203) then
        tmp = x / (1.0d0 - (t / z))
    else
        tmp = x / (z / (z - y))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -8e-107) {
		tmp = x * ((z - y) / z);
	} else if (z <= -9.5e-172) {
		tmp = (x * (y - z)) / t;
	} else if (z <= -3e-180) {
		tmp = (x * -y) / z;
	} else if (z <= 130000000000.0) {
		tmp = (y - z) * (x / t);
	} else if (z <= 4e+203) {
		tmp = x / (1.0 - (t / z));
	} else {
		tmp = x / (z / (z - y));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -8e-107:
		tmp = x * ((z - y) / z)
	elif z <= -9.5e-172:
		tmp = (x * (y - z)) / t
	elif z <= -3e-180:
		tmp = (x * -y) / z
	elif z <= 130000000000.0:
		tmp = (y - z) * (x / t)
	elif z <= 4e+203:
		tmp = x / (1.0 - (t / z))
	else:
		tmp = x / (z / (z - y))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -8e-107)
		tmp = Float64(x * Float64(Float64(z - y) / z));
	elseif (z <= -9.5e-172)
		tmp = Float64(Float64(x * Float64(y - z)) / t);
	elseif (z <= -3e-180)
		tmp = Float64(Float64(x * Float64(-y)) / z);
	elseif (z <= 130000000000.0)
		tmp = Float64(Float64(y - z) * Float64(x / t));
	elseif (z <= 4e+203)
		tmp = Float64(x / Float64(1.0 - Float64(t / z)));
	else
		tmp = Float64(x / Float64(z / Float64(z - y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -8e-107)
		tmp = x * ((z - y) / z);
	elseif (z <= -9.5e-172)
		tmp = (x * (y - z)) / t;
	elseif (z <= -3e-180)
		tmp = (x * -y) / z;
	elseif (z <= 130000000000.0)
		tmp = (y - z) * (x / t);
	elseif (z <= 4e+203)
		tmp = x / (1.0 - (t / z));
	else
		tmp = x / (z / (z - y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -8e-107], N[(x * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9.5e-172], N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, -3e-180], N[(N[(x * (-y)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 130000000000.0], N[(N[(y - z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e+203], N[(x / N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(z / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{-107}:\\
\;\;\;\;x \cdot \frac{z - y}{z}\\

\mathbf{elif}\;z \leq -9.5 \cdot 10^{-172}:\\
\;\;\;\;\frac{x \cdot \left(y - z\right)}{t}\\

\mathbf{elif}\;z \leq -3 \cdot 10^{-180}:\\
\;\;\;\;\frac{x \cdot \left(-y\right)}{z}\\

\mathbf{elif}\;z \leq 130000000000:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\

\mathbf{elif}\;z \leq 4 \cdot 10^{+203}:\\
\;\;\;\;\frac{x}{1 - \frac{t}{z}}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{z - y}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -8e-107

    1. Initial program 84.1%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*98.9%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified98.9%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 84.1%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}} \]
    6. Step-by-step derivation
      1. remove-double-neg84.1%

        \[\leadsto \frac{x \cdot \left(y - z\right)}{\color{blue}{-\left(-\left(t - z\right)\right)}} \]
      2. distribute-neg-frac284.1%

        \[\leadsto \color{blue}{-\frac{x \cdot \left(y - z\right)}{-\left(t - z\right)}} \]
      3. *-commutative84.1%

        \[\leadsto -\frac{\color{blue}{\left(y - z\right) \cdot x}}{-\left(t - z\right)} \]
      4. associate-/l*78.1%

        \[\leadsto -\color{blue}{\left(y - z\right) \cdot \frac{x}{-\left(t - z\right)}} \]
      5. distribute-lft-neg-out78.1%

        \[\leadsto \color{blue}{\left(-\left(y - z\right)\right) \cdot \frac{x}{-\left(t - z\right)}} \]
      6. neg-sub078.1%

        \[\leadsto \color{blue}{\left(0 - \left(y - z\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      7. associate--r-78.1%

        \[\leadsto \color{blue}{\left(\left(0 - y\right) + z\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      8. neg-sub078.1%

        \[\leadsto \left(\color{blue}{\left(-y\right)} + z\right) \cdot \frac{x}{-\left(t - z\right)} \]
      9. +-commutative78.1%

        \[\leadsto \color{blue}{\left(z + \left(-y\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      10. sub-neg78.1%

        \[\leadsto \color{blue}{\left(z - y\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      11. neg-sub078.1%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{0 - \left(t - z\right)}} \]
      12. associate--r-78.1%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(0 - t\right) + z}} \]
      13. neg-sub078.1%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(-t\right)} + z} \]
      14. +-commutative78.1%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{z + \left(-t\right)}} \]
      15. sub-neg78.1%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{z - t}} \]
      16. *-commutative78.1%

        \[\leadsto \color{blue}{\frac{x}{z - t} \cdot \left(z - y\right)} \]
    7. Simplified78.1%

      \[\leadsto \color{blue}{\frac{x}{z - t} \cdot \left(z - y\right)} \]
    8. Taylor expanded in t around 0 59.1%

      \[\leadsto \color{blue}{\frac{x \cdot \left(z - y\right)}{z}} \]
    9. Step-by-step derivation
      1. associate-/l*73.6%

        \[\leadsto \color{blue}{x \cdot \frac{z - y}{z}} \]
    10. Simplified73.6%

      \[\leadsto \color{blue}{x \cdot \frac{z - y}{z}} \]

    if -8e-107 < z < -9.50000000000000053e-172

    1. Initial program 99.7%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*82.3%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified82.3%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 90.6%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t}} \]

    if -9.50000000000000053e-172 < z < -3.0000000000000001e-180

    1. Initial program 99.8%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*86.4%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified86.4%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 99.8%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}} \]
    6. Step-by-step derivation
      1. remove-double-neg99.8%

        \[\leadsto \frac{x \cdot \left(y - z\right)}{\color{blue}{-\left(-\left(t - z\right)\right)}} \]
      2. distribute-neg-frac299.8%

        \[\leadsto \color{blue}{-\frac{x \cdot \left(y - z\right)}{-\left(t - z\right)}} \]
      3. *-commutative99.8%

        \[\leadsto -\frac{\color{blue}{\left(y - z\right) \cdot x}}{-\left(t - z\right)} \]
      4. associate-/l*100.0%

        \[\leadsto -\color{blue}{\left(y - z\right) \cdot \frac{x}{-\left(t - z\right)}} \]
      5. distribute-lft-neg-out100.0%

        \[\leadsto \color{blue}{\left(-\left(y - z\right)\right) \cdot \frac{x}{-\left(t - z\right)}} \]
      6. neg-sub0100.0%

        \[\leadsto \color{blue}{\left(0 - \left(y - z\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      7. associate--r-100.0%

        \[\leadsto \color{blue}{\left(\left(0 - y\right) + z\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      8. neg-sub0100.0%

        \[\leadsto \left(\color{blue}{\left(-y\right)} + z\right) \cdot \frac{x}{-\left(t - z\right)} \]
      9. +-commutative100.0%

        \[\leadsto \color{blue}{\left(z + \left(-y\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      10. sub-neg100.0%

        \[\leadsto \color{blue}{\left(z - y\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      11. neg-sub0100.0%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{0 - \left(t - z\right)}} \]
      12. associate--r-100.0%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(0 - t\right) + z}} \]
      13. neg-sub0100.0%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(-t\right)} + z} \]
      14. +-commutative100.0%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{z + \left(-t\right)}} \]
      15. sub-neg100.0%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{z - t}} \]
      16. *-commutative100.0%

        \[\leadsto \color{blue}{\frac{x}{z - t} \cdot \left(z - y\right)} \]
    7. Simplified100.0%

      \[\leadsto \color{blue}{\frac{x}{z - t} \cdot \left(z - y\right)} \]
    8. Taylor expanded in t around 0 99.8%

      \[\leadsto \color{blue}{\frac{x \cdot \left(z - y\right)}{z}} \]
    9. Step-by-step derivation
      1. associate-/l*33.0%

        \[\leadsto \color{blue}{x \cdot \frac{z - y}{z}} \]
    10. Simplified33.0%

      \[\leadsto \color{blue}{x \cdot \frac{z - y}{z}} \]
    11. Taylor expanded in z around 0 99.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    12. Step-by-step derivation
      1. associate-*r/99.8%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot y\right)}{z}} \]
      2. neg-mul-199.8%

        \[\leadsto \frac{\color{blue}{-x \cdot y}}{z} \]
      3. distribute-rgt-neg-in99.8%

        \[\leadsto \frac{\color{blue}{x \cdot \left(-y\right)}}{z} \]
    13. Simplified99.8%

      \[\leadsto \color{blue}{\frac{x \cdot \left(-y\right)}{z}} \]

    if -3.0000000000000001e-180 < z < 1.3e11

    1. Initial program 90.5%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*90.6%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified90.6%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num90.5%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
      2. un-div-inv90.6%

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    6. Applied egg-rr90.6%

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    7. Taylor expanded in t around inf 77.2%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t}} \]
    8. Step-by-step derivation
      1. *-commutative77.2%

        \[\leadsto \frac{\color{blue}{\left(y - z\right) \cdot x}}{t} \]
      2. associate-/l*81.2%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{x}{t}} \]
    9. Simplified81.2%

      \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{x}{t}} \]

    if 1.3e11 < z < 4e203

    1. Initial program 76.4%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*99.7%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.6%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
      2. un-div-inv99.7%

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    6. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    7. Taylor expanded in y around 0 78.5%

      \[\leadsto \frac{x}{\color{blue}{-1 \cdot \frac{t - z}{z}}} \]
    8. Step-by-step derivation
      1. mul-1-neg78.5%

        \[\leadsto \frac{x}{\color{blue}{-\frac{t - z}{z}}} \]
    9. Simplified78.5%

      \[\leadsto \frac{x}{\color{blue}{-\frac{t - z}{z}}} \]
    10. Taylor expanded in x around 0 78.5%

      \[\leadsto \color{blue}{\frac{x}{1 - \frac{t}{z}}} \]

    if 4e203 < z

    1. Initial program 72.7%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*99.9%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.9%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
      2. un-div-inv99.9%

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    6. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    7. Taylor expanded in t around 0 94.0%

      \[\leadsto \frac{x}{\color{blue}{-1 \cdot \frac{z}{y - z}}} \]
    8. Step-by-step derivation
      1. neg-mul-194.0%

        \[\leadsto \frac{x}{\color{blue}{-\frac{z}{y - z}}} \]
      2. distribute-neg-frac294.0%

        \[\leadsto \frac{x}{\color{blue}{\frac{z}{-\left(y - z\right)}}} \]
      3. neg-sub094.0%

        \[\leadsto \frac{x}{\frac{z}{\color{blue}{0 - \left(y - z\right)}}} \]
      4. associate-+l-94.0%

        \[\leadsto \frac{x}{\frac{z}{\color{blue}{\left(0 - y\right) + z}}} \]
      5. neg-sub094.0%

        \[\leadsto \frac{x}{\frac{z}{\color{blue}{\left(-y\right)} + z}} \]
      6. +-commutative94.0%

        \[\leadsto \frac{x}{\frac{z}{\color{blue}{z + \left(-y\right)}}} \]
      7. sub-neg94.0%

        \[\leadsto \frac{x}{\frac{z}{\color{blue}{z - y}}} \]
    9. Simplified94.0%

      \[\leadsto \frac{x}{\color{blue}{\frac{z}{z - y}}} \]
  3. Recombined 6 regimes into one program.
  4. Add Preprocessing

Alternative 15: 71.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{if}\;z \leq -1.05 \cdot 10^{-106}:\\ \;\;\;\;x \cdot \frac{z - y}{z}\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-172}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-180}:\\ \;\;\;\;\frac{x \cdot \left(-y\right)}{z}\\ \mathbf{elif}\;z \leq 330000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+202}:\\ \;\;\;\;\frac{x}{1 - \frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{z - y}}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (- y z) (/ x t))))
   (if (<= z -1.05e-106)
     (* x (/ (- z y) z))
     (if (<= z -9.5e-172)
       t_1
       (if (<= z -3e-180)
         (/ (* x (- y)) z)
         (if (<= z 330000000000.0)
           t_1
           (if (<= z 7e+202) (/ x (- 1.0 (/ t z))) (/ x (/ z (- z y))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (x / t);
	double tmp;
	if (z <= -1.05e-106) {
		tmp = x * ((z - y) / z);
	} else if (z <= -9.5e-172) {
		tmp = t_1;
	} else if (z <= -3e-180) {
		tmp = (x * -y) / z;
	} else if (z <= 330000000000.0) {
		tmp = t_1;
	} else if (z <= 7e+202) {
		tmp = x / (1.0 - (t / z));
	} else {
		tmp = x / (z / (z - y));
	}
	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 - z) * (x / t)
    if (z <= (-1.05d-106)) then
        tmp = x * ((z - y) / z)
    else if (z <= (-9.5d-172)) then
        tmp = t_1
    else if (z <= (-3d-180)) then
        tmp = (x * -y) / z
    else if (z <= 330000000000.0d0) then
        tmp = t_1
    else if (z <= 7d+202) then
        tmp = x / (1.0d0 - (t / z))
    else
        tmp = x / (z / (z - y))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (x / t);
	double tmp;
	if (z <= -1.05e-106) {
		tmp = x * ((z - y) / z);
	} else if (z <= -9.5e-172) {
		tmp = t_1;
	} else if (z <= -3e-180) {
		tmp = (x * -y) / z;
	} else if (z <= 330000000000.0) {
		tmp = t_1;
	} else if (z <= 7e+202) {
		tmp = x / (1.0 - (t / z));
	} else {
		tmp = x / (z / (z - y));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (y - z) * (x / t)
	tmp = 0
	if z <= -1.05e-106:
		tmp = x * ((z - y) / z)
	elif z <= -9.5e-172:
		tmp = t_1
	elif z <= -3e-180:
		tmp = (x * -y) / z
	elif z <= 330000000000.0:
		tmp = t_1
	elif z <= 7e+202:
		tmp = x / (1.0 - (t / z))
	else:
		tmp = x / (z / (z - y))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(y - z) * Float64(x / t))
	tmp = 0.0
	if (z <= -1.05e-106)
		tmp = Float64(x * Float64(Float64(z - y) / z));
	elseif (z <= -9.5e-172)
		tmp = t_1;
	elseif (z <= -3e-180)
		tmp = Float64(Float64(x * Float64(-y)) / z);
	elseif (z <= 330000000000.0)
		tmp = t_1;
	elseif (z <= 7e+202)
		tmp = Float64(x / Float64(1.0 - Float64(t / z)));
	else
		tmp = Float64(x / Float64(z / Float64(z - y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (y - z) * (x / t);
	tmp = 0.0;
	if (z <= -1.05e-106)
		tmp = x * ((z - y) / z);
	elseif (z <= -9.5e-172)
		tmp = t_1;
	elseif (z <= -3e-180)
		tmp = (x * -y) / z;
	elseif (z <= 330000000000.0)
		tmp = t_1;
	elseif (z <= 7e+202)
		tmp = x / (1.0 - (t / z));
	else
		tmp = x / (z / (z - y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.05e-106], N[(x * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9.5e-172], t$95$1, If[LessEqual[z, -3e-180], N[(N[(x * (-y)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 330000000000.0], t$95$1, If[LessEqual[z, 7e+202], N[(x / N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(z / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \frac{x}{t}\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{-106}:\\
\;\;\;\;x \cdot \frac{z - y}{z}\\

\mathbf{elif}\;z \leq -9.5 \cdot 10^{-172}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -3 \cdot 10^{-180}:\\
\;\;\;\;\frac{x \cdot \left(-y\right)}{z}\\

\mathbf{elif}\;z \leq 330000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 7 \cdot 10^{+202}:\\
\;\;\;\;\frac{x}{1 - \frac{t}{z}}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{z - y}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.05000000000000002e-106

    1. Initial program 84.1%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*98.9%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified98.9%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 84.1%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}} \]
    6. Step-by-step derivation
      1. remove-double-neg84.1%

        \[\leadsto \frac{x \cdot \left(y - z\right)}{\color{blue}{-\left(-\left(t - z\right)\right)}} \]
      2. distribute-neg-frac284.1%

        \[\leadsto \color{blue}{-\frac{x \cdot \left(y - z\right)}{-\left(t - z\right)}} \]
      3. *-commutative84.1%

        \[\leadsto -\frac{\color{blue}{\left(y - z\right) \cdot x}}{-\left(t - z\right)} \]
      4. associate-/l*78.1%

        \[\leadsto -\color{blue}{\left(y - z\right) \cdot \frac{x}{-\left(t - z\right)}} \]
      5. distribute-lft-neg-out78.1%

        \[\leadsto \color{blue}{\left(-\left(y - z\right)\right) \cdot \frac{x}{-\left(t - z\right)}} \]
      6. neg-sub078.1%

        \[\leadsto \color{blue}{\left(0 - \left(y - z\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      7. associate--r-78.1%

        \[\leadsto \color{blue}{\left(\left(0 - y\right) + z\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      8. neg-sub078.1%

        \[\leadsto \left(\color{blue}{\left(-y\right)} + z\right) \cdot \frac{x}{-\left(t - z\right)} \]
      9. +-commutative78.1%

        \[\leadsto \color{blue}{\left(z + \left(-y\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      10. sub-neg78.1%

        \[\leadsto \color{blue}{\left(z - y\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      11. neg-sub078.1%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{0 - \left(t - z\right)}} \]
      12. associate--r-78.1%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(0 - t\right) + z}} \]
      13. neg-sub078.1%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(-t\right)} + z} \]
      14. +-commutative78.1%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{z + \left(-t\right)}} \]
      15. sub-neg78.1%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{z - t}} \]
      16. *-commutative78.1%

        \[\leadsto \color{blue}{\frac{x}{z - t} \cdot \left(z - y\right)} \]
    7. Simplified78.1%

      \[\leadsto \color{blue}{\frac{x}{z - t} \cdot \left(z - y\right)} \]
    8. Taylor expanded in t around 0 59.1%

      \[\leadsto \color{blue}{\frac{x \cdot \left(z - y\right)}{z}} \]
    9. Step-by-step derivation
      1. associate-/l*73.6%

        \[\leadsto \color{blue}{x \cdot \frac{z - y}{z}} \]
    10. Simplified73.6%

      \[\leadsto \color{blue}{x \cdot \frac{z - y}{z}} \]

    if -1.05000000000000002e-106 < z < -9.50000000000000053e-172 or -3.0000000000000001e-180 < z < 3.3e11

    1. Initial program 91.5%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*89.7%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified89.7%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num89.7%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
      2. un-div-inv89.7%

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    6. Applied egg-rr89.7%

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    7. Taylor expanded in t around inf 78.6%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t}} \]
    8. Step-by-step derivation
      1. *-commutative78.6%

        \[\leadsto \frac{\color{blue}{\left(y - z\right) \cdot x}}{t} \]
      2. associate-/l*82.2%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{x}{t}} \]
    9. Simplified82.2%

      \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{x}{t}} \]

    if -9.50000000000000053e-172 < z < -3.0000000000000001e-180

    1. Initial program 99.8%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*86.4%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified86.4%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 99.8%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}} \]
    6. Step-by-step derivation
      1. remove-double-neg99.8%

        \[\leadsto \frac{x \cdot \left(y - z\right)}{\color{blue}{-\left(-\left(t - z\right)\right)}} \]
      2. distribute-neg-frac299.8%

        \[\leadsto \color{blue}{-\frac{x \cdot \left(y - z\right)}{-\left(t - z\right)}} \]
      3. *-commutative99.8%

        \[\leadsto -\frac{\color{blue}{\left(y - z\right) \cdot x}}{-\left(t - z\right)} \]
      4. associate-/l*100.0%

        \[\leadsto -\color{blue}{\left(y - z\right) \cdot \frac{x}{-\left(t - z\right)}} \]
      5. distribute-lft-neg-out100.0%

        \[\leadsto \color{blue}{\left(-\left(y - z\right)\right) \cdot \frac{x}{-\left(t - z\right)}} \]
      6. neg-sub0100.0%

        \[\leadsto \color{blue}{\left(0 - \left(y - z\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      7. associate--r-100.0%

        \[\leadsto \color{blue}{\left(\left(0 - y\right) + z\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      8. neg-sub0100.0%

        \[\leadsto \left(\color{blue}{\left(-y\right)} + z\right) \cdot \frac{x}{-\left(t - z\right)} \]
      9. +-commutative100.0%

        \[\leadsto \color{blue}{\left(z + \left(-y\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      10. sub-neg100.0%

        \[\leadsto \color{blue}{\left(z - y\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      11. neg-sub0100.0%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{0 - \left(t - z\right)}} \]
      12. associate--r-100.0%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(0 - t\right) + z}} \]
      13. neg-sub0100.0%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(-t\right)} + z} \]
      14. +-commutative100.0%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{z + \left(-t\right)}} \]
      15. sub-neg100.0%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{z - t}} \]
      16. *-commutative100.0%

        \[\leadsto \color{blue}{\frac{x}{z - t} \cdot \left(z - y\right)} \]
    7. Simplified100.0%

      \[\leadsto \color{blue}{\frac{x}{z - t} \cdot \left(z - y\right)} \]
    8. Taylor expanded in t around 0 99.8%

      \[\leadsto \color{blue}{\frac{x \cdot \left(z - y\right)}{z}} \]
    9. Step-by-step derivation
      1. associate-/l*33.0%

        \[\leadsto \color{blue}{x \cdot \frac{z - y}{z}} \]
    10. Simplified33.0%

      \[\leadsto \color{blue}{x \cdot \frac{z - y}{z}} \]
    11. Taylor expanded in z around 0 99.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    12. Step-by-step derivation
      1. associate-*r/99.8%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot y\right)}{z}} \]
      2. neg-mul-199.8%

        \[\leadsto \frac{\color{blue}{-x \cdot y}}{z} \]
      3. distribute-rgt-neg-in99.8%

        \[\leadsto \frac{\color{blue}{x \cdot \left(-y\right)}}{z} \]
    13. Simplified99.8%

      \[\leadsto \color{blue}{\frac{x \cdot \left(-y\right)}{z}} \]

    if 3.3e11 < z < 6.99999999999999975e202

    1. Initial program 76.4%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*99.7%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.6%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
      2. un-div-inv99.7%

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    6. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    7. Taylor expanded in y around 0 78.5%

      \[\leadsto \frac{x}{\color{blue}{-1 \cdot \frac{t - z}{z}}} \]
    8. Step-by-step derivation
      1. mul-1-neg78.5%

        \[\leadsto \frac{x}{\color{blue}{-\frac{t - z}{z}}} \]
    9. Simplified78.5%

      \[\leadsto \frac{x}{\color{blue}{-\frac{t - z}{z}}} \]
    10. Taylor expanded in x around 0 78.5%

      \[\leadsto \color{blue}{\frac{x}{1 - \frac{t}{z}}} \]

    if 6.99999999999999975e202 < z

    1. Initial program 72.7%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*99.9%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.9%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
      2. un-div-inv99.9%

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    6. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    7. Taylor expanded in t around 0 94.0%

      \[\leadsto \frac{x}{\color{blue}{-1 \cdot \frac{z}{y - z}}} \]
    8. Step-by-step derivation
      1. neg-mul-194.0%

        \[\leadsto \frac{x}{\color{blue}{-\frac{z}{y - z}}} \]
      2. distribute-neg-frac294.0%

        \[\leadsto \frac{x}{\color{blue}{\frac{z}{-\left(y - z\right)}}} \]
      3. neg-sub094.0%

        \[\leadsto \frac{x}{\frac{z}{\color{blue}{0 - \left(y - z\right)}}} \]
      4. associate-+l-94.0%

        \[\leadsto \frac{x}{\frac{z}{\color{blue}{\left(0 - y\right) + z}}} \]
      5. neg-sub094.0%

        \[\leadsto \frac{x}{\frac{z}{\color{blue}{\left(-y\right)} + z}} \]
      6. +-commutative94.0%

        \[\leadsto \frac{x}{\frac{z}{\color{blue}{z + \left(-y\right)}}} \]
      7. sub-neg94.0%

        \[\leadsto \frac{x}{\frac{z}{\color{blue}{z - y}}} \]
    9. Simplified94.0%

      \[\leadsto \frac{x}{\color{blue}{\frac{z}{z - y}}} \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 16: 71.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{if}\;z \leq -1.05 \cdot 10^{-106}:\\ \;\;\;\;x \cdot \frac{z - y}{z}\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-172}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-180}:\\ \;\;\;\;\frac{x \cdot \left(-y\right)}{z}\\ \mathbf{elif}\;z \leq 90000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{+202}:\\ \;\;\;\;\frac{x}{1 - \frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (- y z) (/ x t))))
   (if (<= z -1.05e-106)
     (* x (/ (- z y) z))
     (if (<= z -9.5e-172)
       t_1
       (if (<= z -3e-180)
         (/ (* x (- y)) z)
         (if (<= z 90000000000.0)
           t_1
           (if (<= z 6.6e+202)
             (/ x (- 1.0 (/ t z)))
             (* x (- 1.0 (/ y z))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (x / t);
	double tmp;
	if (z <= -1.05e-106) {
		tmp = x * ((z - y) / z);
	} else if (z <= -9.5e-172) {
		tmp = t_1;
	} else if (z <= -3e-180) {
		tmp = (x * -y) / z;
	} else if (z <= 90000000000.0) {
		tmp = t_1;
	} else if (z <= 6.6e+202) {
		tmp = x / (1.0 - (t / z));
	} else {
		tmp = x * (1.0 - (y / 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) :: t_1
    real(8) :: tmp
    t_1 = (y - z) * (x / t)
    if (z <= (-1.05d-106)) then
        tmp = x * ((z - y) / z)
    else if (z <= (-9.5d-172)) then
        tmp = t_1
    else if (z <= (-3d-180)) then
        tmp = (x * -y) / z
    else if (z <= 90000000000.0d0) then
        tmp = t_1
    else if (z <= 6.6d+202) then
        tmp = x / (1.0d0 - (t / z))
    else
        tmp = x * (1.0d0 - (y / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (x / t);
	double tmp;
	if (z <= -1.05e-106) {
		tmp = x * ((z - y) / z);
	} else if (z <= -9.5e-172) {
		tmp = t_1;
	} else if (z <= -3e-180) {
		tmp = (x * -y) / z;
	} else if (z <= 90000000000.0) {
		tmp = t_1;
	} else if (z <= 6.6e+202) {
		tmp = x / (1.0 - (t / z));
	} else {
		tmp = x * (1.0 - (y / z));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (y - z) * (x / t)
	tmp = 0
	if z <= -1.05e-106:
		tmp = x * ((z - y) / z)
	elif z <= -9.5e-172:
		tmp = t_1
	elif z <= -3e-180:
		tmp = (x * -y) / z
	elif z <= 90000000000.0:
		tmp = t_1
	elif z <= 6.6e+202:
		tmp = x / (1.0 - (t / z))
	else:
		tmp = x * (1.0 - (y / z))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(y - z) * Float64(x / t))
	tmp = 0.0
	if (z <= -1.05e-106)
		tmp = Float64(x * Float64(Float64(z - y) / z));
	elseif (z <= -9.5e-172)
		tmp = t_1;
	elseif (z <= -3e-180)
		tmp = Float64(Float64(x * Float64(-y)) / z);
	elseif (z <= 90000000000.0)
		tmp = t_1;
	elseif (z <= 6.6e+202)
		tmp = Float64(x / Float64(1.0 - Float64(t / z)));
	else
		tmp = Float64(x * Float64(1.0 - Float64(y / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (y - z) * (x / t);
	tmp = 0.0;
	if (z <= -1.05e-106)
		tmp = x * ((z - y) / z);
	elseif (z <= -9.5e-172)
		tmp = t_1;
	elseif (z <= -3e-180)
		tmp = (x * -y) / z;
	elseif (z <= 90000000000.0)
		tmp = t_1;
	elseif (z <= 6.6e+202)
		tmp = x / (1.0 - (t / z));
	else
		tmp = x * (1.0 - (y / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.05e-106], N[(x * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9.5e-172], t$95$1, If[LessEqual[z, -3e-180], N[(N[(x * (-y)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 90000000000.0], t$95$1, If[LessEqual[z, 6.6e+202], N[(x / N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \frac{x}{t}\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{-106}:\\
\;\;\;\;x \cdot \frac{z - y}{z}\\

\mathbf{elif}\;z \leq -9.5 \cdot 10^{-172}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -3 \cdot 10^{-180}:\\
\;\;\;\;\frac{x \cdot \left(-y\right)}{z}\\

\mathbf{elif}\;z \leq 90000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 6.6 \cdot 10^{+202}:\\
\;\;\;\;\frac{x}{1 - \frac{t}{z}}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.05000000000000002e-106

    1. Initial program 84.1%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*98.9%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified98.9%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 84.1%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}} \]
    6. Step-by-step derivation
      1. remove-double-neg84.1%

        \[\leadsto \frac{x \cdot \left(y - z\right)}{\color{blue}{-\left(-\left(t - z\right)\right)}} \]
      2. distribute-neg-frac284.1%

        \[\leadsto \color{blue}{-\frac{x \cdot \left(y - z\right)}{-\left(t - z\right)}} \]
      3. *-commutative84.1%

        \[\leadsto -\frac{\color{blue}{\left(y - z\right) \cdot x}}{-\left(t - z\right)} \]
      4. associate-/l*78.1%

        \[\leadsto -\color{blue}{\left(y - z\right) \cdot \frac{x}{-\left(t - z\right)}} \]
      5. distribute-lft-neg-out78.1%

        \[\leadsto \color{blue}{\left(-\left(y - z\right)\right) \cdot \frac{x}{-\left(t - z\right)}} \]
      6. neg-sub078.1%

        \[\leadsto \color{blue}{\left(0 - \left(y - z\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      7. associate--r-78.1%

        \[\leadsto \color{blue}{\left(\left(0 - y\right) + z\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      8. neg-sub078.1%

        \[\leadsto \left(\color{blue}{\left(-y\right)} + z\right) \cdot \frac{x}{-\left(t - z\right)} \]
      9. +-commutative78.1%

        \[\leadsto \color{blue}{\left(z + \left(-y\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      10. sub-neg78.1%

        \[\leadsto \color{blue}{\left(z - y\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      11. neg-sub078.1%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{0 - \left(t - z\right)}} \]
      12. associate--r-78.1%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(0 - t\right) + z}} \]
      13. neg-sub078.1%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(-t\right)} + z} \]
      14. +-commutative78.1%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{z + \left(-t\right)}} \]
      15. sub-neg78.1%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{z - t}} \]
      16. *-commutative78.1%

        \[\leadsto \color{blue}{\frac{x}{z - t} \cdot \left(z - y\right)} \]
    7. Simplified78.1%

      \[\leadsto \color{blue}{\frac{x}{z - t} \cdot \left(z - y\right)} \]
    8. Taylor expanded in t around 0 59.1%

      \[\leadsto \color{blue}{\frac{x \cdot \left(z - y\right)}{z}} \]
    9. Step-by-step derivation
      1. associate-/l*73.6%

        \[\leadsto \color{blue}{x \cdot \frac{z - y}{z}} \]
    10. Simplified73.6%

      \[\leadsto \color{blue}{x \cdot \frac{z - y}{z}} \]

    if -1.05000000000000002e-106 < z < -9.50000000000000053e-172 or -3.0000000000000001e-180 < z < 9e10

    1. Initial program 91.5%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*89.7%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified89.7%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num89.7%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
      2. un-div-inv89.7%

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    6. Applied egg-rr89.7%

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    7. Taylor expanded in t around inf 78.6%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t}} \]
    8. Step-by-step derivation
      1. *-commutative78.6%

        \[\leadsto \frac{\color{blue}{\left(y - z\right) \cdot x}}{t} \]
      2. associate-/l*82.2%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{x}{t}} \]
    9. Simplified82.2%

      \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{x}{t}} \]

    if -9.50000000000000053e-172 < z < -3.0000000000000001e-180

    1. Initial program 99.8%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*86.4%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified86.4%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 99.8%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}} \]
    6. Step-by-step derivation
      1. remove-double-neg99.8%

        \[\leadsto \frac{x \cdot \left(y - z\right)}{\color{blue}{-\left(-\left(t - z\right)\right)}} \]
      2. distribute-neg-frac299.8%

        \[\leadsto \color{blue}{-\frac{x \cdot \left(y - z\right)}{-\left(t - z\right)}} \]
      3. *-commutative99.8%

        \[\leadsto -\frac{\color{blue}{\left(y - z\right) \cdot x}}{-\left(t - z\right)} \]
      4. associate-/l*100.0%

        \[\leadsto -\color{blue}{\left(y - z\right) \cdot \frac{x}{-\left(t - z\right)}} \]
      5. distribute-lft-neg-out100.0%

        \[\leadsto \color{blue}{\left(-\left(y - z\right)\right) \cdot \frac{x}{-\left(t - z\right)}} \]
      6. neg-sub0100.0%

        \[\leadsto \color{blue}{\left(0 - \left(y - z\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      7. associate--r-100.0%

        \[\leadsto \color{blue}{\left(\left(0 - y\right) + z\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      8. neg-sub0100.0%

        \[\leadsto \left(\color{blue}{\left(-y\right)} + z\right) \cdot \frac{x}{-\left(t - z\right)} \]
      9. +-commutative100.0%

        \[\leadsto \color{blue}{\left(z + \left(-y\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      10. sub-neg100.0%

        \[\leadsto \color{blue}{\left(z - y\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      11. neg-sub0100.0%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{0 - \left(t - z\right)}} \]
      12. associate--r-100.0%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(0 - t\right) + z}} \]
      13. neg-sub0100.0%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(-t\right)} + z} \]
      14. +-commutative100.0%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{z + \left(-t\right)}} \]
      15. sub-neg100.0%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{z - t}} \]
      16. *-commutative100.0%

        \[\leadsto \color{blue}{\frac{x}{z - t} \cdot \left(z - y\right)} \]
    7. Simplified100.0%

      \[\leadsto \color{blue}{\frac{x}{z - t} \cdot \left(z - y\right)} \]
    8. Taylor expanded in t around 0 99.8%

      \[\leadsto \color{blue}{\frac{x \cdot \left(z - y\right)}{z}} \]
    9. Step-by-step derivation
      1. associate-/l*33.0%

        \[\leadsto \color{blue}{x \cdot \frac{z - y}{z}} \]
    10. Simplified33.0%

      \[\leadsto \color{blue}{x \cdot \frac{z - y}{z}} \]
    11. Taylor expanded in z around 0 99.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    12. Step-by-step derivation
      1. associate-*r/99.8%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot y\right)}{z}} \]
      2. neg-mul-199.8%

        \[\leadsto \frac{\color{blue}{-x \cdot y}}{z} \]
      3. distribute-rgt-neg-in99.8%

        \[\leadsto \frac{\color{blue}{x \cdot \left(-y\right)}}{z} \]
    13. Simplified99.8%

      \[\leadsto \color{blue}{\frac{x \cdot \left(-y\right)}{z}} \]

    if 9e10 < z < 6.5999999999999998e202

    1. Initial program 76.4%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*99.7%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.6%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
      2. un-div-inv99.7%

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    6. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    7. Taylor expanded in y around 0 78.5%

      \[\leadsto \frac{x}{\color{blue}{-1 \cdot \frac{t - z}{z}}} \]
    8. Step-by-step derivation
      1. mul-1-neg78.5%

        \[\leadsto \frac{x}{\color{blue}{-\frac{t - z}{z}}} \]
    9. Simplified78.5%

      \[\leadsto \frac{x}{\color{blue}{-\frac{t - z}{z}}} \]
    10. Taylor expanded in x around 0 78.5%

      \[\leadsto \color{blue}{\frac{x}{1 - \frac{t}{z}}} \]

    if 6.5999999999999998e202 < z

    1. Initial program 72.7%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*99.9%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 66.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \left(y - z\right)}{z}} \]
    6. Step-by-step derivation
      1. mul-1-neg66.8%

        \[\leadsto \color{blue}{-\frac{x \cdot \left(y - z\right)}{z}} \]
      2. associate-/l*94.0%

        \[\leadsto -\color{blue}{x \cdot \frac{y - z}{z}} \]
      3. distribute-rgt-neg-in94.0%

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y - z}{z}\right)} \]
      4. distribute-frac-neg94.0%

        \[\leadsto x \cdot \color{blue}{\frac{-\left(y - z\right)}{z}} \]
      5. neg-sub094.0%

        \[\leadsto x \cdot \frac{\color{blue}{0 - \left(y - z\right)}}{z} \]
      6. associate--r-94.0%

        \[\leadsto x \cdot \frac{\color{blue}{\left(0 - y\right) + z}}{z} \]
      7. neg-sub094.0%

        \[\leadsto x \cdot \frac{\color{blue}{\left(-y\right)} + z}{z} \]
      8. +-commutative94.0%

        \[\leadsto x \cdot \frac{\color{blue}{z + \left(-y\right)}}{z} \]
      9. sub-neg94.0%

        \[\leadsto x \cdot \frac{\color{blue}{z - y}}{z} \]
      10. div-sub94.0%

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{z} - \frac{y}{z}\right)} \]
      11. *-inverses94.0%

        \[\leadsto x \cdot \left(\color{blue}{1} - \frac{y}{z}\right) \]
    7. Simplified94.0%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{y}{z}\right)} \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 17: 71.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{if}\;z \leq -1.05 \cdot 10^{-106}:\\ \;\;\;\;x \cdot \frac{z - y}{z}\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-172}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-180}:\\ \;\;\;\;\frac{x \cdot \left(-y\right)}{z}\\ \mathbf{elif}\;z \leq 8.4 \cdot 10^{-52}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (- y z) (/ x t))))
   (if (<= z -1.05e-106)
     (* x (/ (- z y) z))
     (if (<= z -9.5e-172)
       t_1
       (if (<= z -3e-180)
         (/ (* x (- y)) z)
         (if (<= z 8.4e-52) t_1 (* x (- 1.0 (/ y z)))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (x / t);
	double tmp;
	if (z <= -1.05e-106) {
		tmp = x * ((z - y) / z);
	} else if (z <= -9.5e-172) {
		tmp = t_1;
	} else if (z <= -3e-180) {
		tmp = (x * -y) / z;
	} else if (z <= 8.4e-52) {
		tmp = t_1;
	} else {
		tmp = x * (1.0 - (y / 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) :: t_1
    real(8) :: tmp
    t_1 = (y - z) * (x / t)
    if (z <= (-1.05d-106)) then
        tmp = x * ((z - y) / z)
    else if (z <= (-9.5d-172)) then
        tmp = t_1
    else if (z <= (-3d-180)) then
        tmp = (x * -y) / z
    else if (z <= 8.4d-52) then
        tmp = t_1
    else
        tmp = x * (1.0d0 - (y / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (x / t);
	double tmp;
	if (z <= -1.05e-106) {
		tmp = x * ((z - y) / z);
	} else if (z <= -9.5e-172) {
		tmp = t_1;
	} else if (z <= -3e-180) {
		tmp = (x * -y) / z;
	} else if (z <= 8.4e-52) {
		tmp = t_1;
	} else {
		tmp = x * (1.0 - (y / z));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (y - z) * (x / t)
	tmp = 0
	if z <= -1.05e-106:
		tmp = x * ((z - y) / z)
	elif z <= -9.5e-172:
		tmp = t_1
	elif z <= -3e-180:
		tmp = (x * -y) / z
	elif z <= 8.4e-52:
		tmp = t_1
	else:
		tmp = x * (1.0 - (y / z))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(y - z) * Float64(x / t))
	tmp = 0.0
	if (z <= -1.05e-106)
		tmp = Float64(x * Float64(Float64(z - y) / z));
	elseif (z <= -9.5e-172)
		tmp = t_1;
	elseif (z <= -3e-180)
		tmp = Float64(Float64(x * Float64(-y)) / z);
	elseif (z <= 8.4e-52)
		tmp = t_1;
	else
		tmp = Float64(x * Float64(1.0 - Float64(y / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (y - z) * (x / t);
	tmp = 0.0;
	if (z <= -1.05e-106)
		tmp = x * ((z - y) / z);
	elseif (z <= -9.5e-172)
		tmp = t_1;
	elseif (z <= -3e-180)
		tmp = (x * -y) / z;
	elseif (z <= 8.4e-52)
		tmp = t_1;
	else
		tmp = x * (1.0 - (y / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.05e-106], N[(x * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9.5e-172], t$95$1, If[LessEqual[z, -3e-180], N[(N[(x * (-y)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 8.4e-52], t$95$1, N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \frac{x}{t}\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{-106}:\\
\;\;\;\;x \cdot \frac{z - y}{z}\\

\mathbf{elif}\;z \leq -9.5 \cdot 10^{-172}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -3 \cdot 10^{-180}:\\
\;\;\;\;\frac{x \cdot \left(-y\right)}{z}\\

\mathbf{elif}\;z \leq 8.4 \cdot 10^{-52}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.05000000000000002e-106

    1. Initial program 84.1%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*98.9%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified98.9%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 84.1%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}} \]
    6. Step-by-step derivation
      1. remove-double-neg84.1%

        \[\leadsto \frac{x \cdot \left(y - z\right)}{\color{blue}{-\left(-\left(t - z\right)\right)}} \]
      2. distribute-neg-frac284.1%

        \[\leadsto \color{blue}{-\frac{x \cdot \left(y - z\right)}{-\left(t - z\right)}} \]
      3. *-commutative84.1%

        \[\leadsto -\frac{\color{blue}{\left(y - z\right) \cdot x}}{-\left(t - z\right)} \]
      4. associate-/l*78.1%

        \[\leadsto -\color{blue}{\left(y - z\right) \cdot \frac{x}{-\left(t - z\right)}} \]
      5. distribute-lft-neg-out78.1%

        \[\leadsto \color{blue}{\left(-\left(y - z\right)\right) \cdot \frac{x}{-\left(t - z\right)}} \]
      6. neg-sub078.1%

        \[\leadsto \color{blue}{\left(0 - \left(y - z\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      7. associate--r-78.1%

        \[\leadsto \color{blue}{\left(\left(0 - y\right) + z\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      8. neg-sub078.1%

        \[\leadsto \left(\color{blue}{\left(-y\right)} + z\right) \cdot \frac{x}{-\left(t - z\right)} \]
      9. +-commutative78.1%

        \[\leadsto \color{blue}{\left(z + \left(-y\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      10. sub-neg78.1%

        \[\leadsto \color{blue}{\left(z - y\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      11. neg-sub078.1%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{0 - \left(t - z\right)}} \]
      12. associate--r-78.1%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(0 - t\right) + z}} \]
      13. neg-sub078.1%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(-t\right)} + z} \]
      14. +-commutative78.1%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{z + \left(-t\right)}} \]
      15. sub-neg78.1%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{z - t}} \]
      16. *-commutative78.1%

        \[\leadsto \color{blue}{\frac{x}{z - t} \cdot \left(z - y\right)} \]
    7. Simplified78.1%

      \[\leadsto \color{blue}{\frac{x}{z - t} \cdot \left(z - y\right)} \]
    8. Taylor expanded in t around 0 59.1%

      \[\leadsto \color{blue}{\frac{x \cdot \left(z - y\right)}{z}} \]
    9. Step-by-step derivation
      1. associate-/l*73.6%

        \[\leadsto \color{blue}{x \cdot \frac{z - y}{z}} \]
    10. Simplified73.6%

      \[\leadsto \color{blue}{x \cdot \frac{z - y}{z}} \]

    if -1.05000000000000002e-106 < z < -9.50000000000000053e-172 or -3.0000000000000001e-180 < z < 8.3999999999999995e-52

    1. Initial program 89.9%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*87.8%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified87.8%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num87.7%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
      2. un-div-inv87.7%

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    6. Applied egg-rr87.7%

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    7. Taylor expanded in t around inf 81.2%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t}} \]
    8. Step-by-step derivation
      1. *-commutative81.2%

        \[\leadsto \frac{\color{blue}{\left(y - z\right) \cdot x}}{t} \]
      2. associate-/l*87.6%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{x}{t}} \]
    9. Simplified87.6%

      \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{x}{t}} \]

    if -9.50000000000000053e-172 < z < -3.0000000000000001e-180

    1. Initial program 99.8%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*86.4%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified86.4%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 99.8%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}} \]
    6. Step-by-step derivation
      1. remove-double-neg99.8%

        \[\leadsto \frac{x \cdot \left(y - z\right)}{\color{blue}{-\left(-\left(t - z\right)\right)}} \]
      2. distribute-neg-frac299.8%

        \[\leadsto \color{blue}{-\frac{x \cdot \left(y - z\right)}{-\left(t - z\right)}} \]
      3. *-commutative99.8%

        \[\leadsto -\frac{\color{blue}{\left(y - z\right) \cdot x}}{-\left(t - z\right)} \]
      4. associate-/l*100.0%

        \[\leadsto -\color{blue}{\left(y - z\right) \cdot \frac{x}{-\left(t - z\right)}} \]
      5. distribute-lft-neg-out100.0%

        \[\leadsto \color{blue}{\left(-\left(y - z\right)\right) \cdot \frac{x}{-\left(t - z\right)}} \]
      6. neg-sub0100.0%

        \[\leadsto \color{blue}{\left(0 - \left(y - z\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      7. associate--r-100.0%

        \[\leadsto \color{blue}{\left(\left(0 - y\right) + z\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      8. neg-sub0100.0%

        \[\leadsto \left(\color{blue}{\left(-y\right)} + z\right) \cdot \frac{x}{-\left(t - z\right)} \]
      9. +-commutative100.0%

        \[\leadsto \color{blue}{\left(z + \left(-y\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      10. sub-neg100.0%

        \[\leadsto \color{blue}{\left(z - y\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      11. neg-sub0100.0%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{0 - \left(t - z\right)}} \]
      12. associate--r-100.0%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(0 - t\right) + z}} \]
      13. neg-sub0100.0%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(-t\right)} + z} \]
      14. +-commutative100.0%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{z + \left(-t\right)}} \]
      15. sub-neg100.0%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{z - t}} \]
      16. *-commutative100.0%

        \[\leadsto \color{blue}{\frac{x}{z - t} \cdot \left(z - y\right)} \]
    7. Simplified100.0%

      \[\leadsto \color{blue}{\frac{x}{z - t} \cdot \left(z - y\right)} \]
    8. Taylor expanded in t around 0 99.8%

      \[\leadsto \color{blue}{\frac{x \cdot \left(z - y\right)}{z}} \]
    9. Step-by-step derivation
      1. associate-/l*33.0%

        \[\leadsto \color{blue}{x \cdot \frac{z - y}{z}} \]
    10. Simplified33.0%

      \[\leadsto \color{blue}{x \cdot \frac{z - y}{z}} \]
    11. Taylor expanded in z around 0 99.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    12. Step-by-step derivation
      1. associate-*r/99.8%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot y\right)}{z}} \]
      2. neg-mul-199.8%

        \[\leadsto \frac{\color{blue}{-x \cdot y}}{z} \]
      3. distribute-rgt-neg-in99.8%

        \[\leadsto \frac{\color{blue}{x \cdot \left(-y\right)}}{z} \]
    13. Simplified99.8%

      \[\leadsto \color{blue}{\frac{x \cdot \left(-y\right)}{z}} \]

    if 8.3999999999999995e-52 < z

    1. Initial program 79.8%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*99.8%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 52.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \left(y - z\right)}{z}} \]
    6. Step-by-step derivation
      1. mul-1-neg52.4%

        \[\leadsto \color{blue}{-\frac{x \cdot \left(y - z\right)}{z}} \]
      2. associate-/l*68.1%

        \[\leadsto -\color{blue}{x \cdot \frac{y - z}{z}} \]
      3. distribute-rgt-neg-in68.1%

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y - z}{z}\right)} \]
      4. distribute-frac-neg68.1%

        \[\leadsto x \cdot \color{blue}{\frac{-\left(y - z\right)}{z}} \]
      5. neg-sub068.1%

        \[\leadsto x \cdot \frac{\color{blue}{0 - \left(y - z\right)}}{z} \]
      6. associate--r-68.1%

        \[\leadsto x \cdot \frac{\color{blue}{\left(0 - y\right) + z}}{z} \]
      7. neg-sub068.1%

        \[\leadsto x \cdot \frac{\color{blue}{\left(-y\right)} + z}{z} \]
      8. +-commutative68.1%

        \[\leadsto x \cdot \frac{\color{blue}{z + \left(-y\right)}}{z} \]
      9. sub-neg68.1%

        \[\leadsto x \cdot \frac{\color{blue}{z - y}}{z} \]
      10. div-sub68.1%

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{z} - \frac{y}{z}\right)} \]
      11. *-inverses68.1%

        \[\leadsto x \cdot \left(\color{blue}{1} - \frac{y}{z}\right) \]
    7. Simplified68.1%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{y}{z}\right)} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 18: 67.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;z \leq -2.5 \cdot 10^{-72}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-158}:\\ \;\;\;\;\frac{z \cdot \left(-x\right)}{t}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-242}:\\ \;\;\;\;\frac{y}{\frac{t}{x}}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-9}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y z)))))
   (if (<= z -2.5e-72)
     t_1
     (if (<= z -4.2e-158)
       (/ (* z (- x)) t)
       (if (<= z 2.8e-242)
         (/ y (/ t x))
         (if (<= z 4.4e-9) (/ x (/ t y)) t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (1.0 - (y / z));
	double tmp;
	if (z <= -2.5e-72) {
		tmp = t_1;
	} else if (z <= -4.2e-158) {
		tmp = (z * -x) / t;
	} else if (z <= 2.8e-242) {
		tmp = y / (t / x);
	} else if (z <= 4.4e-9) {
		tmp = x / (t / y);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / z))
    if (z <= (-2.5d-72)) then
        tmp = t_1
    else if (z <= (-4.2d-158)) then
        tmp = (z * -x) / t
    else if (z <= 2.8d-242) then
        tmp = y / (t / x)
    else if (z <= 4.4d-9) then
        tmp = x / (t / y)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x * (1.0 - (y / z));
	double tmp;
	if (z <= -2.5e-72) {
		tmp = t_1;
	} else if (z <= -4.2e-158) {
		tmp = (z * -x) / t;
	} else if (z <= 2.8e-242) {
		tmp = y / (t / x);
	} else if (z <= 4.4e-9) {
		tmp = x / (t / y);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (1.0 - (y / z))
	tmp = 0
	if z <= -2.5e-72:
		tmp = t_1
	elif z <= -4.2e-158:
		tmp = (z * -x) / t
	elif z <= 2.8e-242:
		tmp = y / (t / x)
	elif z <= 4.4e-9:
		tmp = x / (t / y)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (z <= -2.5e-72)
		tmp = t_1;
	elseif (z <= -4.2e-158)
		tmp = Float64(Float64(z * Float64(-x)) / t);
	elseif (z <= 2.8e-242)
		tmp = Float64(y / Float64(t / x));
	elseif (z <= 4.4e-9)
		tmp = Float64(x / Float64(t / y));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (1.0 - (y / z));
	tmp = 0.0;
	if (z <= -2.5e-72)
		tmp = t_1;
	elseif (z <= -4.2e-158)
		tmp = (z * -x) / t;
	elseif (z <= 2.8e-242)
		tmp = y / (t / x);
	elseif (z <= 4.4e-9)
		tmp = x / (t / y);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.5e-72], t$95$1, If[LessEqual[z, -4.2e-158], N[(N[(z * (-x)), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 2.8e-242], N[(y / N[(t / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e-9], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{-72}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -4.2 \cdot 10^{-158}:\\
\;\;\;\;\frac{z \cdot \left(-x\right)}{t}\\

\mathbf{elif}\;z \leq 2.8 \cdot 10^{-242}:\\
\;\;\;\;\frac{y}{\frac{t}{x}}\\

\mathbf{elif}\;z \leq 4.4 \cdot 10^{-9}:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.4999999999999998e-72 or 4.3999999999999997e-9 < z

    1. Initial program 79.8%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*99.3%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified99.3%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 56.1%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \left(y - z\right)}{z}} \]
    6. Step-by-step derivation
      1. mul-1-neg56.1%

        \[\leadsto \color{blue}{-\frac{x \cdot \left(y - z\right)}{z}} \]
      2. associate-/l*72.9%

        \[\leadsto -\color{blue}{x \cdot \frac{y - z}{z}} \]
      3. distribute-rgt-neg-in72.9%

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y - z}{z}\right)} \]
      4. distribute-frac-neg72.9%

        \[\leadsto x \cdot \color{blue}{\frac{-\left(y - z\right)}{z}} \]
      5. neg-sub072.9%

        \[\leadsto x \cdot \frac{\color{blue}{0 - \left(y - z\right)}}{z} \]
      6. associate--r-72.9%

        \[\leadsto x \cdot \frac{\color{blue}{\left(0 - y\right) + z}}{z} \]
      7. neg-sub072.9%

        \[\leadsto x \cdot \frac{\color{blue}{\left(-y\right)} + z}{z} \]
      8. +-commutative72.9%

        \[\leadsto x \cdot \frac{\color{blue}{z + \left(-y\right)}}{z} \]
      9. sub-neg72.9%

        \[\leadsto x \cdot \frac{\color{blue}{z - y}}{z} \]
      10. div-sub72.9%

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{z} - \frac{y}{z}\right)} \]
      11. *-inverses72.9%

        \[\leadsto x \cdot \left(\color{blue}{1} - \frac{y}{z}\right) \]
    7. Simplified72.9%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{y}{z}\right)} \]

    if -2.4999999999999998e-72 < z < -4.19999999999999983e-158

    1. Initial program 99.8%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*93.0%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified93.0%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 72.0%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t}} \]
    6. Step-by-step derivation
      1. associate-/l*65.2%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t}} \]
    7. Simplified65.2%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t}} \]
    8. Taylor expanded in y around 0 60.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    9. Step-by-step derivation
      1. associate-*r/60.0%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot z\right)}{t}} \]
      2. neg-mul-160.0%

        \[\leadsto \frac{\color{blue}{-x \cdot z}}{t} \]
      3. *-commutative60.0%

        \[\leadsto \frac{-\color{blue}{z \cdot x}}{t} \]
      4. distribute-lft-neg-in60.0%

        \[\leadsto \frac{\color{blue}{\left(-z\right) \cdot x}}{t} \]
    10. Simplified60.0%

      \[\leadsto \color{blue}{\frac{\left(-z\right) \cdot x}{t}} \]

    if -4.19999999999999983e-158 < z < 2.79999999999999983e-242

    1. Initial program 89.0%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*82.4%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified82.4%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num82.4%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
      2. un-div-inv82.3%

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    6. Applied egg-rr82.3%

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    7. Taylor expanded in z around 0 75.0%

      \[\leadsto \frac{x}{\color{blue}{\frac{t}{y}}} \]
    8. Step-by-step derivation
      1. associate-/r/84.4%

        \[\leadsto \color{blue}{\frac{x}{t} \cdot y} \]
    9. Applied egg-rr84.4%

      \[\leadsto \color{blue}{\frac{x}{t} \cdot y} \]
    10. Step-by-step derivation
      1. *-commutative84.4%

        \[\leadsto \color{blue}{y \cdot \frac{x}{t}} \]
      2. clear-num84.3%

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{t}{x}}} \]
      3. un-div-inv84.4%

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{x}}} \]
    11. Applied egg-rr84.4%

      \[\leadsto \color{blue}{\frac{y}{\frac{t}{x}}} \]

    if 2.79999999999999983e-242 < z < 4.3999999999999997e-9

    1. Initial program 92.4%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*94.3%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified94.3%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num94.2%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
      2. un-div-inv94.3%

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    6. Applied egg-rr94.3%

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    7. Taylor expanded in z around 0 65.7%

      \[\leadsto \frac{x}{\color{blue}{\frac{t}{y}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification72.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{-72}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-158}:\\ \;\;\;\;\frac{z \cdot \left(-x\right)}{t}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-242}:\\ \;\;\;\;\frac{y}{\frac{t}{x}}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-9}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 96.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -8.6 \cdot 10^{+81} \lor \neg \left(z \leq 3.8 \cdot 10^{-90}\right):\\ \;\;\;\;x \cdot \frac{y - z}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z - t} \cdot \left(z - y\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -8.6e+81) (not (<= z 3.8e-90)))
   (* x (/ (- y z) (- t z)))
   (* (/ x (- z t)) (- z y))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -8.6e+81) || !(z <= 3.8e-90)) {
		tmp = x * ((y - z) / (t - z));
	} else {
		tmp = (x / (z - t)) * (z - y);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((z <= (-8.6d+81)) .or. (.not. (z <= 3.8d-90))) then
        tmp = x * ((y - z) / (t - z))
    else
        tmp = (x / (z - t)) * (z - y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -8.6e+81) || !(z <= 3.8e-90)) {
		tmp = x * ((y - z) / (t - z));
	} else {
		tmp = (x / (z - t)) * (z - y);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -8.6e+81) or not (z <= 3.8e-90):
		tmp = x * ((y - z) / (t - z))
	else:
		tmp = (x / (z - t)) * (z - y)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -8.6e+81) || !(z <= 3.8e-90))
		tmp = Float64(x * Float64(Float64(y - z) / Float64(t - z)));
	else
		tmp = Float64(Float64(x / Float64(z - t)) * Float64(z - y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -8.6e+81) || ~((z <= 3.8e-90)))
		tmp = x * ((y - z) / (t - z));
	else
		tmp = (x / (z - t)) * (z - y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -8.6e+81], N[Not[LessEqual[z, 3.8e-90]], $MachinePrecision]], N[(x * N[(N[(y - z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.6 \cdot 10^{+81} \lor \neg \left(z \leq 3.8 \cdot 10^{-90}\right):\\
\;\;\;\;x \cdot \frac{y - z}{t - z}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{z - t} \cdot \left(z - y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.6000000000000003e81 or 3.8e-90 < z

    1. Initial program 79.8%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*99.8%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing

    if -8.6000000000000003e81 < z < 3.8e-90

    1. Initial program 90.9%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*89.9%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    3. Simplified89.9%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 90.9%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}} \]
    6. Step-by-step derivation
      1. remove-double-neg90.9%

        \[\leadsto \frac{x \cdot \left(y - z\right)}{\color{blue}{-\left(-\left(t - z\right)\right)}} \]
      2. distribute-neg-frac290.9%

        \[\leadsto \color{blue}{-\frac{x \cdot \left(y - z\right)}{-\left(t - z\right)}} \]
      3. *-commutative90.9%

        \[\leadsto -\frac{\color{blue}{\left(y - z\right) \cdot x}}{-\left(t - z\right)} \]
      4. associate-/l*97.4%

        \[\leadsto -\color{blue}{\left(y - z\right) \cdot \frac{x}{-\left(t - z\right)}} \]
      5. distribute-lft-neg-out97.4%

        \[\leadsto \color{blue}{\left(-\left(y - z\right)\right) \cdot \frac{x}{-\left(t - z\right)}} \]
      6. neg-sub097.4%

        \[\leadsto \color{blue}{\left(0 - \left(y - z\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      7. associate--r-97.4%

        \[\leadsto \color{blue}{\left(\left(0 - y\right) + z\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      8. neg-sub097.4%

        \[\leadsto \left(\color{blue}{\left(-y\right)} + z\right) \cdot \frac{x}{-\left(t - z\right)} \]
      9. +-commutative97.4%

        \[\leadsto \color{blue}{\left(z + \left(-y\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      10. sub-neg97.4%

        \[\leadsto \color{blue}{\left(z - y\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      11. neg-sub097.4%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{0 - \left(t - z\right)}} \]
      12. associate--r-97.4%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(0 - t\right) + z}} \]
      13. neg-sub097.4%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(-t\right)} + z} \]
      14. +-commutative97.4%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{z + \left(-t\right)}} \]
      15. sub-neg97.4%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{z - t}} \]
      16. *-commutative97.4%

        \[\leadsto \color{blue}{\frac{x}{z - t} \cdot \left(z - y\right)} \]
    7. Simplified97.4%

      \[\leadsto \color{blue}{\frac{x}{z - t} \cdot \left(z - y\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.6 \cdot 10^{+81} \lor \neg \left(z \leq 3.8 \cdot 10^{-90}\right):\\ \;\;\;\;x \cdot \frac{y - z}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z - t} \cdot \left(z - y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 96.7% 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 85.0%

    \[\frac{x \cdot \left(y - z\right)}{t - z} \]
  2. Step-by-step derivation
    1. associate-/l*95.1%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
  3. Simplified95.1%

    \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
  4. Add Preprocessing
  5. Add Preprocessing

Alternative 21: 35.2% accurate, 9.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
	return x;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x
end function
public static double code(double x, double y, double z, double t) {
	return x;
}
def code(x, y, z, t):
	return x
function code(x, y, z, t)
	return x
end
function tmp = code(x, y, z, t)
	tmp = x;
end
code[x_, y_, z_, t_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 85.0%

    \[\frac{x \cdot \left(y - z\right)}{t - z} \]
  2. Step-by-step derivation
    1. associate-/l*95.1%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
  3. Simplified95.1%

    \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
  4. Add Preprocessing
  5. Taylor expanded in z around inf 33.9%

    \[\leadsto \color{blue}{x} \]
  6. Add Preprocessing

Developer target: 96.6% 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 2024105 
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
  :precision binary64

  :alt
  (/ x (/ (- t z) (- y z)))

  (/ (* x (- y z)) (- t z)))