Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H

Percentage Accurate: 95.7% → 97.6%
Time: 13.2s
Alternatives: 19
Speedup: 0.7×

Specification

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

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

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

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

Alternative 1: 97.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{y} - y\\ \mathbf{if}\;y \leq -1.8 \cdot 10^{-5}:\\ \;\;\;\;x + \frac{t\_1 \cdot 0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{-132}:\\ \;\;\;\;x + \frac{\frac{\frac{t}{3}}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;x + t\_1 \cdot \frac{0.3333333333333333}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (/ t y) y)))
   (if (<= y -1.8e-5)
     (+ x (/ (* t_1 0.3333333333333333) z))
     (if (<= y 3.3e-132)
       (+ x (/ (/ (/ t 3.0) z) y))
       (+ x (* t_1 (/ 0.3333333333333333 z)))))))
double code(double x, double y, double z, double t) {
	double t_1 = (t / y) - y;
	double tmp;
	if (y <= -1.8e-5) {
		tmp = x + ((t_1 * 0.3333333333333333) / z);
	} else if (y <= 3.3e-132) {
		tmp = x + (((t / 3.0) / z) / y);
	} else {
		tmp = x + (t_1 * (0.3333333333333333 / 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 = (t / y) - y
    if (y <= (-1.8d-5)) then
        tmp = x + ((t_1 * 0.3333333333333333d0) / z)
    else if (y <= 3.3d-132) then
        tmp = x + (((t / 3.0d0) / z) / y)
    else
        tmp = x + (t_1 * (0.3333333333333333d0 / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (t / y) - y;
	double tmp;
	if (y <= -1.8e-5) {
		tmp = x + ((t_1 * 0.3333333333333333) / z);
	} else if (y <= 3.3e-132) {
		tmp = x + (((t / 3.0) / z) / y);
	} else {
		tmp = x + (t_1 * (0.3333333333333333 / z));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (t / y) - y
	tmp = 0
	if y <= -1.8e-5:
		tmp = x + ((t_1 * 0.3333333333333333) / z)
	elif y <= 3.3e-132:
		tmp = x + (((t / 3.0) / z) / y)
	else:
		tmp = x + (t_1 * (0.3333333333333333 / z))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(t / y) - y)
	tmp = 0.0
	if (y <= -1.8e-5)
		tmp = Float64(x + Float64(Float64(t_1 * 0.3333333333333333) / z));
	elseif (y <= 3.3e-132)
		tmp = Float64(x + Float64(Float64(Float64(t / 3.0) / z) / y));
	else
		tmp = Float64(x + Float64(t_1 * Float64(0.3333333333333333 / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (t / y) - y;
	tmp = 0.0;
	if (y <= -1.8e-5)
		tmp = x + ((t_1 * 0.3333333333333333) / z);
	elseif (y <= 3.3e-132)
		tmp = x + (((t / 3.0) / z) / y);
	else
		tmp = x + (t_1 * (0.3333333333333333 / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[y, -1.8e-5], N[(x + N[(N[(t$95$1 * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.3e-132], N[(x + N[(N[(N[(t / 3.0), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(t$95$1 * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t}{y} - y\\
\mathbf{if}\;y \leq -1.8 \cdot 10^{-5}:\\
\;\;\;\;x + \frac{t\_1 \cdot 0.3333333333333333}{z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.80000000000000005e-5

    1. Initial program 96.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}{z}} \]
    6. Applied egg-rr99.8%

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

    if -1.80000000000000005e-5 < y < 3.2999999999999997e-132

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{0.3333333333333333 \cdot \frac{t}{y \cdot z}} \]
    6. Step-by-step derivation
      1. clear-num94.0%

        \[\leadsto x + 0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{y \cdot z}{t}}} \]
      2. inv-pow94.0%

        \[\leadsto x + 0.3333333333333333 \cdot \color{blue}{{\left(\frac{y \cdot z}{t}\right)}^{-1}} \]
    7. Applied egg-rr94.0%

      \[\leadsto x + 0.3333333333333333 \cdot \color{blue}{{\left(\frac{y \cdot z}{t}\right)}^{-1}} \]
    8. Step-by-step derivation
      1. unpow-194.0%

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

        \[\leadsto x + 0.3333333333333333 \cdot \frac{1}{\color{blue}{y \cdot \frac{z}{t}}} \]
    9. Simplified98.7%

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

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

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

        \[\leadsto x + \color{blue}{\frac{0.3333333333333333 \cdot t}{y \cdot z}} \]
      4. *-commutative94.0%

        \[\leadsto x + \frac{\color{blue}{t \cdot 0.3333333333333333}}{y \cdot z} \]
      5. frac-times90.2%

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

        \[\leadsto x + \color{blue}{\frac{t \cdot \frac{0.3333333333333333}{z}}{y}} \]
    11. Applied egg-rr98.8%

      \[\leadsto x + \color{blue}{\frac{t \cdot \frac{0.3333333333333333}{z}}{y}} \]
    12. Step-by-step derivation
      1. metadata-eval98.8%

        \[\leadsto x + \frac{t \cdot \frac{\color{blue}{\frac{1}{3}}}{z}}{y} \]
      2. associate-/r*98.8%

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

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

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

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

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

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

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

    if 3.2999999999999997e-132 < y

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.8 \cdot 10^{-5}:\\ \;\;\;\;x + \frac{\left(\frac{t}{y} - y\right) \cdot 0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{-132}:\\ \;\;\;\;x + \frac{\frac{\frac{t}{3}}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{t}{y} - y\right) \cdot \frac{0.3333333333333333}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 63.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-0.3333333333333333}{\frac{z}{y}}\\ \mathbf{if}\;y \leq -2.1 \cdot 10^{+71}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{-8}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{-91}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ \mathbf{elif}\;y \leq 68000000000000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ -0.3333333333333333 (/ z y))))
   (if (<= y -2.1e+71)
     t_1
     (if (<= y -4.2e-8)
       x
       (if (<= y 2.9e-91)
         (* 0.3333333333333333 (/ (/ t z) y))
         (if (<= y 68000000000000.0) x t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = -0.3333333333333333 / (z / y);
	double tmp;
	if (y <= -2.1e+71) {
		tmp = t_1;
	} else if (y <= -4.2e-8) {
		tmp = x;
	} else if (y <= 2.9e-91) {
		tmp = 0.3333333333333333 * ((t / z) / y);
	} else if (y <= 68000000000000.0) {
		tmp = x;
	} 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 = (-0.3333333333333333d0) / (z / y)
    if (y <= (-2.1d+71)) then
        tmp = t_1
    else if (y <= (-4.2d-8)) then
        tmp = x
    else if (y <= 2.9d-91) then
        tmp = 0.3333333333333333d0 * ((t / z) / y)
    else if (y <= 68000000000000.0d0) then
        tmp = x
    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 = -0.3333333333333333 / (z / y);
	double tmp;
	if (y <= -2.1e+71) {
		tmp = t_1;
	} else if (y <= -4.2e-8) {
		tmp = x;
	} else if (y <= 2.9e-91) {
		tmp = 0.3333333333333333 * ((t / z) / y);
	} else if (y <= 68000000000000.0) {
		tmp = x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = -0.3333333333333333 / (z / y)
	tmp = 0
	if y <= -2.1e+71:
		tmp = t_1
	elif y <= -4.2e-8:
		tmp = x
	elif y <= 2.9e-91:
		tmp = 0.3333333333333333 * ((t / z) / y)
	elif y <= 68000000000000.0:
		tmp = x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(-0.3333333333333333 / Float64(z / y))
	tmp = 0.0
	if (y <= -2.1e+71)
		tmp = t_1;
	elseif (y <= -4.2e-8)
		tmp = x;
	elseif (y <= 2.9e-91)
		tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y));
	elseif (y <= 68000000000000.0)
		tmp = x;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = -0.3333333333333333 / (z / y);
	tmp = 0.0;
	if (y <= -2.1e+71)
		tmp = t_1;
	elseif (y <= -4.2e-8)
		tmp = x;
	elseif (y <= 2.9e-91)
		tmp = 0.3333333333333333 * ((t / z) / y);
	elseif (y <= 68000000000000.0)
		tmp = x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.1e+71], t$95$1, If[LessEqual[y, -4.2e-8], x, If[LessEqual[y, 2.9e-91], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 68000000000000.0], x, t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{if}\;y \leq -2.1 \cdot 10^{+71}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -4.2 \cdot 10^{-8}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 2.9 \cdot 10^{-91}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\

\mathbf{elif}\;y \leq 68000000000000:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.09999999999999989e71 or 6.8e13 < y

    1. Initial program 97.1%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 96.0%

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    5. Step-by-step derivation
      1. clear-num67.8%

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

        \[\leadsto \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
    6. Applied egg-rr68.0%

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

    if -2.09999999999999989e71 < y < -4.19999999999999989e-8 or 2.9000000000000001e-91 < y < 6.8e13

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.19999999999999989e-8 < y < 2.9000000000000001e-91

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.3333333333333333 \cdot \frac{\color{blue}{1 \cdot t}}{y \cdot z} \]
      2. times-frac74.8%

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

        \[\leadsto 0.3333333333333333 \cdot \color{blue}{\frac{1 \cdot \frac{t}{z}}{y}} \]
      4. *-lft-identity74.8%

        \[\leadsto 0.3333333333333333 \cdot \frac{\color{blue}{\frac{t}{z}}}{y} \]
    8. Simplified74.8%

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 3: 61.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-0.3333333333333333}{\frac{z}{y}}\\ \mathbf{if}\;y \leq -2.6 \cdot 10^{+71}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -2.6 \cdot 10^{-7}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-90}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+14}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ -0.3333333333333333 (/ z y))))
   (if (<= y -2.6e+71)
     t_1
     (if (<= y -2.6e-7)
       x
       (if (<= y 4.8e-90)
         (* 0.3333333333333333 (/ t (* z y)))
         (if (<= y 1.9e+14) x t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = -0.3333333333333333 / (z / y);
	double tmp;
	if (y <= -2.6e+71) {
		tmp = t_1;
	} else if (y <= -2.6e-7) {
		tmp = x;
	} else if (y <= 4.8e-90) {
		tmp = 0.3333333333333333 * (t / (z * y));
	} else if (y <= 1.9e+14) {
		tmp = x;
	} 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 = (-0.3333333333333333d0) / (z / y)
    if (y <= (-2.6d+71)) then
        tmp = t_1
    else if (y <= (-2.6d-7)) then
        tmp = x
    else if (y <= 4.8d-90) then
        tmp = 0.3333333333333333d0 * (t / (z * y))
    else if (y <= 1.9d+14) then
        tmp = x
    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 = -0.3333333333333333 / (z / y);
	double tmp;
	if (y <= -2.6e+71) {
		tmp = t_1;
	} else if (y <= -2.6e-7) {
		tmp = x;
	} else if (y <= 4.8e-90) {
		tmp = 0.3333333333333333 * (t / (z * y));
	} else if (y <= 1.9e+14) {
		tmp = x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = -0.3333333333333333 / (z / y)
	tmp = 0
	if y <= -2.6e+71:
		tmp = t_1
	elif y <= -2.6e-7:
		tmp = x
	elif y <= 4.8e-90:
		tmp = 0.3333333333333333 * (t / (z * y))
	elif y <= 1.9e+14:
		tmp = x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(-0.3333333333333333 / Float64(z / y))
	tmp = 0.0
	if (y <= -2.6e+71)
		tmp = t_1;
	elseif (y <= -2.6e-7)
		tmp = x;
	elseif (y <= 4.8e-90)
		tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y)));
	elseif (y <= 1.9e+14)
		tmp = x;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = -0.3333333333333333 / (z / y);
	tmp = 0.0;
	if (y <= -2.6e+71)
		tmp = t_1;
	elseif (y <= -2.6e-7)
		tmp = x;
	elseif (y <= 4.8e-90)
		tmp = 0.3333333333333333 * (t / (z * y));
	elseif (y <= 1.9e+14)
		tmp = x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.6e+71], t$95$1, If[LessEqual[y, -2.6e-7], x, If[LessEqual[y, 4.8e-90], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e+14], x, t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{if}\;y \leq -2.6 \cdot 10^{+71}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -2.6 \cdot 10^{-7}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 4.8 \cdot 10^{-90}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\

\mathbf{elif}\;y \leq 1.9 \cdot 10^{+14}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.59999999999999991e71 or 1.9e14 < y

    1. Initial program 97.1%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 96.0%

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    5. Step-by-step derivation
      1. clear-num67.8%

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

        \[\leadsto \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
    6. Applied egg-rr68.0%

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

    if -2.59999999999999991e71 < y < -2.59999999999999999e-7 or 4.8000000000000003e-90 < y < 1.9e14

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.59999999999999999e-7 < y < 4.8000000000000003e-90

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.6 \cdot 10^{+71}:\\ \;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\ \mathbf{elif}\;y \leq -2.6 \cdot 10^{-7}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-90}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+14}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 97.5% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z #s(literal 3 binary64)) < -9.9999999999999995e-127

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot -3}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-un-lft-identity99.7%

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

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

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

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

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

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

    if -9.9999999999999995e-127 < (*.f64 z #s(literal 3 binary64))

    1. Initial program 94.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative98.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot 3 \leq -1 \cdot 10^{-126}:\\ \;\;\;\;\left(\frac{t}{z \cdot \left(3 \cdot y\right)} + x\right) + \frac{\frac{y}{-3}}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 97.7% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z #s(literal 3 binary64)) < -2e80

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

    if -2e80 < (*.f64 z #s(literal 3 binary64))

    1. Initial program 95.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative98.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot 3 \leq -2 \cdot 10^{+80}:\\ \;\;\;\;\left(x + \frac{t}{3 \cdot \left(z \cdot y\right)}\right) + \frac{y}{z \cdot -3}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 97.6% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.80000000000000005e-5 or 3e-132 < y

    1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    4. Add Preprocessing

    if -1.80000000000000005e-5 < y < 3e-132

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{0.3333333333333333 \cdot \frac{t}{y \cdot z}} \]
    6. Step-by-step derivation
      1. clear-num94.0%

        \[\leadsto x + 0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{y \cdot z}{t}}} \]
      2. inv-pow94.0%

        \[\leadsto x + 0.3333333333333333 \cdot \color{blue}{{\left(\frac{y \cdot z}{t}\right)}^{-1}} \]
    7. Applied egg-rr94.0%

      \[\leadsto x + 0.3333333333333333 \cdot \color{blue}{{\left(\frac{y \cdot z}{t}\right)}^{-1}} \]
    8. Step-by-step derivation
      1. unpow-194.0%

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

        \[\leadsto x + 0.3333333333333333 \cdot \frac{1}{\color{blue}{y \cdot \frac{z}{t}}} \]
    9. Simplified98.7%

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

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

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

        \[\leadsto x + \color{blue}{\frac{0.3333333333333333 \cdot t}{y \cdot z}} \]
      4. *-commutative94.0%

        \[\leadsto x + \frac{\color{blue}{t \cdot 0.3333333333333333}}{y \cdot z} \]
      5. frac-times90.2%

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

        \[\leadsto x + \color{blue}{\frac{t \cdot \frac{0.3333333333333333}{z}}{y}} \]
    11. Applied egg-rr98.8%

      \[\leadsto x + \color{blue}{\frac{t \cdot \frac{0.3333333333333333}{z}}{y}} \]
    12. Step-by-step derivation
      1. metadata-eval98.8%

        \[\leadsto x + \frac{t \cdot \frac{\color{blue}{\frac{1}{3}}}{z}}{y} \]
      2. associate-/r*98.8%

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

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

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

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

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

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

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

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

Alternative 7: 89.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.6 \cdot 10^{+39} \lor \neg \left(y \leq 1.45 \cdot 10^{-17}\right):\\
\;\;\;\;x - \frac{0.3333333333333333}{\frac{z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.6000000000000004e39 or 1.4500000000000001e-17 < y

    1. Initial program 97.4%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 95.7%

      \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
    4. Step-by-step derivation
      1. clear-num95.7%

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{\frac{z}{y}}} \]
    5. Applied egg-rr95.8%

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

    if -9.6000000000000004e39 < y < 1.4500000000000001e-17

    1. Initial program 95.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{0.3333333333333333}{\frac{y \cdot z}{t}}} \]
    7. Applied egg-rr92.8%

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

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

Alternative 8: 89.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+37} \lor \neg \left(y \leq 1.2 \cdot 10^{-17}\right):\\
\;\;\;\;x - \frac{0.3333333333333333}{\frac{z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.70000000000000003e37 or 1.19999999999999993e-17 < y

    1. Initial program 97.4%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 95.7%

      \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
    4. Step-by-step derivation
      1. clear-num95.7%

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{\frac{z}{y}}} \]
    5. Applied egg-rr95.8%

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

    if -1.70000000000000003e37 < y < 1.19999999999999993e-17

    1. Initial program 95.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 91.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+38}:\\
\;\;\;\;x - \frac{0.3333333333333333}{\frac{z}{y}}\\

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

\mathbf{else}:\\
\;\;\;\;x + \frac{1}{-3 \cdot \frac{z}{y}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.05e38

    1. Initial program 95.9%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 97.8%

      \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
    4. Step-by-step derivation
      1. clear-num97.8%

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{\frac{z}{y}}} \]
    5. Applied egg-rr98.0%

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

    if -1.05e38 < y < 1.9000000000000001e-17

    1. Initial program 95.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + 0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{y \cdot z}{t}}} \]
      2. inv-pow92.7%

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

      \[\leadsto x + 0.3333333333333333 \cdot \color{blue}{{\left(\frac{y \cdot z}{t}\right)}^{-1}} \]
    8. Step-by-step derivation
      1. unpow-192.7%

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

        \[\leadsto x + 0.3333333333333333 \cdot \frac{1}{\color{blue}{y \cdot \frac{z}{t}}} \]
    9. Simplified96.3%

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

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

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

        \[\leadsto x + \color{blue}{\frac{0.3333333333333333 \cdot t}{y \cdot z}} \]
      4. *-commutative92.8%

        \[\leadsto x + \frac{\color{blue}{t \cdot 0.3333333333333333}}{y \cdot z} \]
      5. frac-times89.9%

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

        \[\leadsto x + \color{blue}{\frac{t \cdot \frac{0.3333333333333333}{z}}{y}} \]
    11. Applied egg-rr96.4%

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

        \[\leadsto x + \frac{t \cdot \frac{\color{blue}{\frac{1}{3}}}{z}}{y} \]
      2. associate-/r*96.4%

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{\frac{\frac{t}{3}}{z}}}{y} \]
    15. Simplified96.4%

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

    if 1.9000000000000001e-17 < y

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{z}{0.3333333333333333}}{\frac{t}{y} - y}}} \]
    8. Simplified99.6%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{z}{0.3333333333333333}}{\frac{t}{y} - y}}} \]
    9. Taylor expanded in t around 0 94.3%

      \[\leadsto x + \frac{1}{\color{blue}{-3 \cdot \frac{z}{y}}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 10: 91.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.8 \cdot 10^{+41}:\\
\;\;\;\;x - \frac{0.3333333333333333}{\frac{z}{y}}\\

\mathbf{elif}\;y \leq 1.08 \cdot 10^{-17}:\\
\;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{1}{-3 \cdot \frac{z}{y}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.7999999999999994e41

    1. Initial program 95.9%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 97.8%

      \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
    4. Step-by-step derivation
      1. clear-num97.8%

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{\frac{z}{y}}} \]
    5. Applied egg-rr98.0%

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

    if -7.7999999999999994e41 < y < 1.07999999999999995e-17

    1. Initial program 95.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + 0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{y \cdot z}{t}}} \]
      2. inv-pow92.7%

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

      \[\leadsto x + 0.3333333333333333 \cdot \color{blue}{{\left(\frac{y \cdot z}{t}\right)}^{-1}} \]
    8. Step-by-step derivation
      1. unpow-192.7%

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

        \[\leadsto x + 0.3333333333333333 \cdot \frac{1}{\color{blue}{y \cdot \frac{z}{t}}} \]
    9. Simplified96.3%

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

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

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

        \[\leadsto x + \color{blue}{\frac{0.3333333333333333 \cdot t}{y \cdot z}} \]
      4. *-commutative92.8%

        \[\leadsto x + \frac{\color{blue}{t \cdot 0.3333333333333333}}{y \cdot z} \]
      5. frac-times89.9%

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

        \[\leadsto x + \color{blue}{\frac{t \cdot \frac{0.3333333333333333}{z}}{y}} \]
    11. Applied egg-rr96.4%

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

    if 1.07999999999999995e-17 < y

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{z}{0.3333333333333333}}{\frac{t}{y} - y}}} \]
    8. Simplified99.6%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{z}{0.3333333333333333}}{\frac{t}{y} - y}}} \]
    9. Taylor expanded in t around 0 94.3%

      \[\leadsto x + \frac{1}{\color{blue}{-3 \cdot \frac{z}{y}}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 11: 89.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.75 \cdot 10^{+40}:\\
\;\;\;\;x - \frac{0.3333333333333333}{\frac{z}{y}}\\

\mathbf{elif}\;y \leq 7.2 \cdot 10^{-18}:\\
\;\;\;\;x + \frac{t \cdot 0.3333333333333333}{z \cdot y}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{1}{-3 \cdot \frac{z}{y}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.74999999999999987e40

    1. Initial program 95.9%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 97.8%

      \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
    4. Step-by-step derivation
      1. clear-num97.8%

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{\frac{z}{y}}} \]
    5. Applied egg-rr98.0%

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

    if -2.74999999999999987e40 < y < 7.20000000000000021e-18

    1. Initial program 95.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{0.3333333333333333 \cdot t}{y \cdot z}} \]
    7. Applied egg-rr92.8%

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

    if 7.20000000000000021e-18 < y

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{z}{0.3333333333333333}}{\frac{t}{y} - y}}} \]
    8. Simplified99.6%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{z}{0.3333333333333333}}{\frac{t}{y} - y}}} \]
    9. Taylor expanded in t around 0 94.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.75 \cdot 10^{+40}:\\ \;\;\;\;x - \frac{0.3333333333333333}{\frac{z}{y}}\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{-18}:\\ \;\;\;\;x + \frac{t \cdot 0.3333333333333333}{z \cdot y}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{1}{-3 \cdot \frac{z}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 89.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.4 \cdot 10^{+36}:\\
\;\;\;\;x - \frac{0.3333333333333333}{\frac{z}{y}}\\

\mathbf{elif}\;y \leq 1.7 \cdot 10^{-17}:\\
\;\;\;\;x + \frac{0.3333333333333333}{\frac{z \cdot y}{t}}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{1}{-3 \cdot \frac{z}{y}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.40000000000000058e36

    1. Initial program 95.9%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 97.8%

      \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
    4. Step-by-step derivation
      1. clear-num97.8%

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{\frac{z}{y}}} \]
    5. Applied egg-rr98.0%

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

    if -7.40000000000000058e36 < y < 1.6999999999999999e-17

    1. Initial program 95.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{0.3333333333333333}{\frac{y \cdot z}{t}}} \]
    7. Applied egg-rr92.8%

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

    if 1.6999999999999999e-17 < y

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{z}{0.3333333333333333}}{\frac{t}{y} - y}}} \]
    8. Simplified99.6%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{z}{0.3333333333333333}}{\frac{t}{y} - y}}} \]
    9. Taylor expanded in t around 0 94.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.4 \cdot 10^{+36}:\\ \;\;\;\;x - \frac{0.3333333333333333}{\frac{z}{y}}\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{-17}:\\ \;\;\;\;x + \frac{0.3333333333333333}{\frac{z \cdot y}{t}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{1}{-3 \cdot \frac{z}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 78.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{-8} \lor \neg \left(y \leq 2.9 \cdot 10^{-90}\right):\\
\;\;\;\;x - \frac{0.3333333333333333}{\frac{z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.2499999999999999e-8 or 2.89999999999999983e-90 < y

    1. Initial program 97.7%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 92.9%

      \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
    4. Step-by-step derivation
      1. clear-num92.9%

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{\frac{z}{y}}} \]
    5. Applied egg-rr93.0%

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

    if -1.2499999999999999e-8 < y < 2.89999999999999983e-90

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.3333333333333333 \cdot \frac{\color{blue}{1 \cdot t}}{y \cdot z} \]
      2. times-frac74.8%

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

        \[\leadsto 0.3333333333333333 \cdot \color{blue}{\frac{1 \cdot \frac{t}{z}}{y}} \]
      4. *-lft-identity74.8%

        \[\leadsto 0.3333333333333333 \cdot \frac{\color{blue}{\frac{t}{z}}}{y} \]
    8. Simplified74.8%

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

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

Alternative 14: 78.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{-8} \lor \neg \left(y \leq 1.75 \cdot 10^{-91}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1e-8 or 1.7499999999999999e-91 < y

    1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    6. Step-by-step derivation
      1. metadata-eval92.9%

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

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

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

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

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

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

        \[\leadsto x + y \cdot \color{blue}{\frac{-0.3333333333333333}{z}} \]
      8. metadata-eval93.0%

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

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

    if -1e-8 < y < 1.7499999999999999e-91

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.3333333333333333 \cdot \frac{\color{blue}{1 \cdot t}}{y \cdot z} \]
      2. times-frac74.8%

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

        \[\leadsto 0.3333333333333333 \cdot \color{blue}{\frac{1 \cdot \frac{t}{z}}{y}} \]
      4. *-lft-identity74.8%

        \[\leadsto 0.3333333333333333 \cdot \frac{\color{blue}{\frac{t}{z}}}{y} \]
    8. Simplified74.8%

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

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

Alternative 15: 78.0% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;y \leq 1.55 \cdot 10^{-90}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.0999999999999999e-7

    1. Initial program 96.4%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 96.4%

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

    if -4.0999999999999999e-7 < y < 1.5500000000000001e-90

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.3333333333333333 \cdot \frac{\color{blue}{1 \cdot t}}{y \cdot z} \]
      2. times-frac74.8%

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

        \[\leadsto 0.3333333333333333 \cdot \color{blue}{\frac{1 \cdot \frac{t}{z}}{y}} \]
      4. *-lft-identity74.8%

        \[\leadsto 0.3333333333333333 \cdot \frac{\color{blue}{\frac{t}{z}}}{y} \]
    8. Simplified74.8%

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

    if 1.5500000000000001e-90 < y

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    6. Step-by-step derivation
      1. metadata-eval90.6%

        \[\leadsto x + \color{blue}{\left(-0.3333333333333333\right)} \cdot \frac{y}{z} \]
      2. distribute-lft-neg-in90.6%

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

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \left(-\frac{0.3333333333333333}{z}\right)} \]
      7. distribute-neg-frac90.7%

        \[\leadsto x + y \cdot \color{blue}{\frac{-0.3333333333333333}{z}} \]
      8. metadata-eval90.7%

        \[\leadsto x + y \cdot \frac{\color{blue}{-0.3333333333333333}}{z} \]
    7. Simplified90.7%

      \[\leadsto x + \color{blue}{y \cdot \frac{-0.3333333333333333}{z}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 16: 47.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{+88}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.1e88 or 2.89999999999999993e64 < x

    1. Initial program 96.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.1e88 < x < 2.89999999999999993e64

    1. Initial program 96.7%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 55.8%

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    5. Step-by-step derivation
      1. clear-num44.2%

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

        \[\leadsto \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
    6. Applied egg-rr44.3%

      \[\leadsto \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 17: 47.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.7 \cdot 10^{+83}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 2.25 \cdot 10^{+64}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.6999999999999999e83 or 2.24999999999999987e64 < x

    1. Initial program 96.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.6999999999999999e83 < x < 2.24999999999999987e64

    1. Initial program 96.7%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 55.8%

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

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

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot y}{z}} \]
      2. *-commutative44.2%

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

        \[\leadsto \color{blue}{y \cdot \frac{-0.3333333333333333}{z}} \]
    6. Simplified44.2%

      \[\leadsto \color{blue}{y \cdot \frac{-0.3333333333333333}{z}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 18: 47.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.75 \cdot 10^{+83}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.74999999999999989e83 or 7.5000000000000005e64 < x

    1. Initial program 96.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.74999999999999989e83 < x < 7.5000000000000005e64

    1. Initial program 96.7%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 55.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.75 \cdot 10^{+83}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 7.5 \cdot 10^{+64}:\\ \;\;\;\;\frac{y}{z} \cdot -0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 30.3% accurate, 15.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 96.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Add Preprocessing

Developer Target 1: 96.1% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2024130 
(FPCore (x y z t)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, H"
  :precision binary64

  :alt
  (! :herbie-platform default (+ (- x (/ y (* z 3))) (/ (/ t (* z 3)) y)))

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