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

Percentage Accurate: 95.6% → 98.1%
Time: 13.4s
Alternatives: 16
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 16 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.6% 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: 98.1% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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

    if -2.34999999999999986e-80 < y < 2.00000000000000011e-128

    1. Initial program 86.5%

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

        \[\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+86.5%

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

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

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

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

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

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

        \[\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-186.5%

        \[\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-frac85.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-neg85.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-185.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. *-commutative85.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*85.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000011e-128 < y

    1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

        \[\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.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-neg97.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-197.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. *-commutative97.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*97.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. *-commutative97.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. div-inv99.7%

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

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

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

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

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

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

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

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

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

Alternative 2: 97.9% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z 3) < -1.99999999999999988e-11

    1. Initial program 99.7%

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

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

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

        \[\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. clear-num99.8%

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

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

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

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

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

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

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

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

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

    if -1.99999999999999988e-11 < (*.f64 z 3)

    1. Initial program 90.1%

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

        \[\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+90.1%

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

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

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

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

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

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

        \[\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-190.1%

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

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

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

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

        \[\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*95.1%

        \[\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. *-commutative95.1%

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

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

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

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

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

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

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

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

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

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

Alternative 3: 98.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{y} - y\\ \mathbf{if}\;y \leq -5 \cdot 10^{-81}:\\ \;\;\;\;x + t\_1 \cdot \frac{0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 9.8 \cdot 10^{-110}:\\ \;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;x + t\_1 \cdot \left(0.3333333333333333 \cdot \frac{1}{z}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (/ t y) y)))
   (if (<= y -5e-81)
     (+ x (* t_1 (/ 0.3333333333333333 z)))
     (if (<= y 9.8e-110)
       (+ x (/ (* t (/ 0.3333333333333333 z)) y))
       (+ x (* t_1 (* 0.3333333333333333 (/ 1.0 z))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (t / y) - y;
	double tmp;
	if (y <= -5e-81) {
		tmp = x + (t_1 * (0.3333333333333333 / z));
	} else if (y <= 9.8e-110) {
		tmp = x + ((t * (0.3333333333333333 / z)) / y);
	} else {
		tmp = x + (t_1 * (0.3333333333333333 * (1.0 / 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 <= (-5d-81)) then
        tmp = x + (t_1 * (0.3333333333333333d0 / z))
    else if (y <= 9.8d-110) then
        tmp = x + ((t * (0.3333333333333333d0 / z)) / y)
    else
        tmp = x + (t_1 * (0.3333333333333333d0 * (1.0d0 / 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 <= -5e-81) {
		tmp = x + (t_1 * (0.3333333333333333 / z));
	} else if (y <= 9.8e-110) {
		tmp = x + ((t * (0.3333333333333333 / z)) / y);
	} else {
		tmp = x + (t_1 * (0.3333333333333333 * (1.0 / z)));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (t / y) - y
	tmp = 0
	if y <= -5e-81:
		tmp = x + (t_1 * (0.3333333333333333 / z))
	elif y <= 9.8e-110:
		tmp = x + ((t * (0.3333333333333333 / z)) / y)
	else:
		tmp = x + (t_1 * (0.3333333333333333 * (1.0 / z)))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(t / y) - y)
	tmp = 0.0
	if (y <= -5e-81)
		tmp = Float64(x + Float64(t_1 * Float64(0.3333333333333333 / z)));
	elseif (y <= 9.8e-110)
		tmp = Float64(x + Float64(Float64(t * Float64(0.3333333333333333 / z)) / y));
	else
		tmp = Float64(x + Float64(t_1 * Float64(0.3333333333333333 * Float64(1.0 / z))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (t / y) - y;
	tmp = 0.0;
	if (y <= -5e-81)
		tmp = x + (t_1 * (0.3333333333333333 / z));
	elseif (y <= 9.8e-110)
		tmp = x + ((t * (0.3333333333333333 / z)) / y);
	else
		tmp = x + (t_1 * (0.3333333333333333 * (1.0 / 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, -5e-81], N[(x + N[(t$95$1 * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.8e-110], N[(x + N[(N[(t * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(t$95$1 * N[(0.3333333333333333 * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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

\mathbf{else}:\\
\;\;\;\;x + t\_1 \cdot \left(0.3333333333333333 \cdot \frac{1}{z}\right)\\


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

    1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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

    if -4.99999999999999981e-81 < y < 9.7999999999999995e-110

    1. Initial program 86.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-neg86.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+86.0%

        \[\leadsto \color{blue}{x + \left(\left(-\frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      3. +-commutative86.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-neg86.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-neg86.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-in86.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-neg86.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-neg86.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-186.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-frac86.1%

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

        \[\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-186.1%

        \[\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. *-commutative86.1%

        \[\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*86.1%

        \[\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. *-commutative86.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.7999999999999995e-110 < y

    1. Initial program 97.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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.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. *-commutative97.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. 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. div-inv99.8%

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

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

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

Alternative 4: 97.9% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z 3) < -1.99999999999999988e-11

    1. Initial program 99.7%

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

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

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

        \[\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. 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 -1.99999999999999988e-11 < (*.f64 z 3)

    1. Initial program 90.1%

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

        \[\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+90.1%

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

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

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

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

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

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

        \[\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-190.1%

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

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

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

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

        \[\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*95.1%

        \[\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. *-commutative95.1%

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

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

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

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

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

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

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

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

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

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

Alternative 5: 98.0% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.5600000000000001e-75 or 6.3999999999999999e-130 < y

    1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

        \[\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.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-neg96.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-196.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. *-commutative96.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*96.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. *-commutative96.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.7%

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

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

    if -1.5600000000000001e-75 < y < 6.3999999999999999e-130

    1. Initial program 86.5%

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

        \[\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+86.5%

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

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

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

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

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

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

        \[\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-186.5%

        \[\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-frac85.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-neg85.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-185.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. *-commutative85.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*85.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 98.1% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.20000000000000007e-76 or 6.8000000000000001e-130 < y

    1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

        \[\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.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-neg96.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-196.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. *-commutative96.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*96.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. *-commutative96.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.7%

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

    if -1.20000000000000007e-76 < y < 6.8000000000000001e-130

    1. Initial program 86.5%

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

        \[\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+86.5%

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

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

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

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

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

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

        \[\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-186.5%

        \[\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-frac85.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-neg85.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-185.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. *-commutative85.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*85.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 91.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2 \cdot 10^{+62} \lor \neg \left(y \leq 2.7 \cdot 10^{+76}\right):\\ \;\;\;\;x - \frac{0.3333333333333333}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= y -2e+62) (not (<= y 2.7e+76)))
   (- 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 <= -2e+62) || !(y <= 2.7e+76)) {
		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 <= (-2d+62)) .or. (.not. (y <= 2.7d+76))) 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 <= -2e+62) || !(y <= 2.7e+76)) {
		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 <= -2e+62) or not (y <= 2.7e+76):
		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 <= -2e+62) || !(y <= 2.7e+76))
		tmp = Float64(x - Float64(0.3333333333333333 / Float64(z / y)));
	else
		tmp = Float64(x + 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 <= -2e+62) || ~((y <= 2.7e+76)))
		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, -2e+62], N[Not[LessEqual[y, 2.7e+76]], $MachinePrecision]], N[(x - N[(0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+62} \lor \neg \left(y \leq 2.7 \cdot 10^{+76}\right):\\
\;\;\;\;x - \frac{0.3333333333333333}{\frac{z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.00000000000000007e62 or 2.6999999999999999e76 < y

    1. Initial program 96.8%

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

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

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

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

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

    if -2.00000000000000007e62 < y < 2.6999999999999999e76

    1. Initial program 89.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-neg89.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+89.9%

        \[\leadsto \color{blue}{x + \left(\left(-\frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      3. +-commutative89.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-neg89.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-neg89.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-in89.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-neg89.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-neg89.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-189.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-frac89.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-neg89.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-189.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. *-commutative89.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*89.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. *-commutative89.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. 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 86.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 91.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+60} \lor \neg \left(y \leq 2.9 \cdot 10^{+76}\right):\\
\;\;\;\;x - \frac{0.3333333333333333}{\frac{z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.00000000000000026e60 or 2.9000000000000002e76 < y

    1. Initial program 96.8%

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

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

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

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

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

    if -9.00000000000000026e60 < y < 2.9000000000000002e76

    1. Initial program 89.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-neg89.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+89.9%

        \[\leadsto \color{blue}{x + \left(\left(-\frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      3. +-commutative89.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-neg89.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-neg89.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-in89.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-neg89.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-neg89.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-189.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-frac89.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-neg89.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-189.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. *-commutative89.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*89.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. *-commutative89.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. Simplified91.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 61.1% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+60} \lor \neg \left(y \leq 2.7 \cdot 10^{+76}\right):\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.00000000000000026e60 or 2.6999999999999999e76 < y

    1. Initial program 96.8%

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

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

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

        \[\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*96.8%

        \[\leadsto \left(\frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}} + x\right) + \left(-\frac{y}{z \cdot 3}\right) \]
      5. *-commutative96.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-neg296.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-in96.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-eval96.8%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot \color{blue}{-3}} \]
    3. Simplified96.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. Step-by-step derivation
      1. *-un-lft-identity96.8%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\color{blue}{\frac{0.3333333333333333 \cdot \frac{t}{z}}{y}} + x\right) + \frac{y}{z \cdot -3} \]
    9. Taylor expanded in y around inf 70.7%

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

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

        \[\leadsto \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
    11. Applied egg-rr70.8%

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

    if -9.00000000000000026e60 < y < 2.6999999999999999e76

    1. Initial program 89.9%

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

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

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

        \[\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*89.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\color{blue}{\frac{0.3333333333333333 \cdot \frac{t}{z}}{y}} + x\right) + \frac{y}{z \cdot -3} \]
    9. Step-by-step derivation
      1. clear-num98.4%

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

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

        \[\leadsto \left(\frac{0.3333333333333333 \cdot \frac{t}{z}}{y} + x\right) + {\left(\frac{\color{blue}{-3 \cdot z}}{y}\right)}^{-1} \]
      4. *-un-lft-identity98.4%

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

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

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

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

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

      \[\leadsto \left(\frac{0.3333333333333333 \cdot \frac{t}{z}}{y} + x\right) + \color{blue}{\frac{1}{-3 \cdot \frac{z}{y}}} \]
    13. Taylor expanded in t around inf 60.6%

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

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

Alternative 10: 63.1% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+62} \lor \neg \left(y \leq 2.7 \cdot 10^{+76}\right):\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.79999999999999984e62 or 2.6999999999999999e76 < y

    1. Initial program 96.8%

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

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

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

        \[\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*96.8%

        \[\leadsto \left(\frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}} + x\right) + \left(-\frac{y}{z \cdot 3}\right) \]
      5. *-commutative96.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-neg296.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-in96.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-eval96.8%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot \color{blue}{-3}} \]
    3. Simplified96.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. Step-by-step derivation
      1. *-un-lft-identity96.8%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\color{blue}{\frac{0.3333333333333333 \cdot \frac{t}{z}}{y}} + x\right) + \frac{y}{z \cdot -3} \]
    9. Taylor expanded in y around inf 70.7%

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

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

        \[\leadsto \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
    11. Applied egg-rr70.8%

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

    if -3.79999999999999984e62 < y < 2.6999999999999999e76

    1. Initial program 89.9%

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

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

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

        \[\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*89.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\color{blue}{\frac{0.3333333333333333 \cdot \frac{t}{z}}{y}} + x\right) + \frac{y}{z \cdot -3} \]
    9. Step-by-step derivation
      1. clear-num98.4%

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

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

        \[\leadsto \left(\frac{0.3333333333333333 \cdot \frac{t}{z}}{y} + x\right) + {\left(\frac{\color{blue}{-3 \cdot z}}{y}\right)}^{-1} \]
      4. *-un-lft-identity98.4%

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

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

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

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

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

      \[\leadsto \left(\frac{0.3333333333333333 \cdot \frac{t}{z}}{y} + x\right) + \color{blue}{\frac{1}{-3 \cdot \frac{z}{y}}} \]
    13. Taylor expanded in t around inf 60.6%

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

        \[\leadsto \color{blue}{\frac{0.3333333333333333 \cdot t}{y \cdot z}} \]
      2. times-frac66.5%

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{y} \cdot \frac{t}{z}} \]
      3. *-commutative66.5%

        \[\leadsto \color{blue}{\frac{t}{z} \cdot \frac{0.3333333333333333}{y}} \]
    15. Simplified66.5%

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

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

Alternative 11: 75.2% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{-111} \lor \neg \left(y \leq 6.4 \cdot 10^{+69}\right):\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.15e-111 or 6.3999999999999997e69 < y

    1. Initial program 95.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 87.1%

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

    if -1.15e-111 < y < 6.3999999999999997e69

    1. Initial program 89.5%

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

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

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

        \[\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*89.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{0.3333333333333333 \cdot \frac{t}{z}}{y} + x\right) + {\left(\frac{\color{blue}{-3 \cdot z}}{y}\right)}^{-1} \]
      4. *-un-lft-identity98.8%

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

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

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

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

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

      \[\leadsto \left(\frac{0.3333333333333333 \cdot \frac{t}{z}}{y} + x\right) + \color{blue}{\frac{1}{-3 \cdot \frac{z}{y}}} \]
    13. Taylor expanded in t around inf 66.4%

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

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

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{y} \cdot \frac{t}{z}} \]
      3. *-commutative73.2%

        \[\leadsto \color{blue}{\frac{t}{z} \cdot \frac{0.3333333333333333}{y}} \]
    15. Simplified73.2%

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

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

Alternative 12: 75.2% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{-111} \lor \neg \left(y \leq 6.4 \cdot 10^{+69}\right):\\
\;\;\;\;x - \frac{0.3333333333333333}{\frac{z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.0499999999999999e-111 or 6.3999999999999997e69 < y

    1. Initial program 95.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 87.1%

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

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

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

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

    if -1.0499999999999999e-111 < y < 6.3999999999999997e69

    1. Initial program 89.5%

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

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

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

        \[\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*89.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{0.3333333333333333 \cdot \frac{t}{z}}{y} + x\right) + {\left(\frac{\color{blue}{-3 \cdot z}}{y}\right)}^{-1} \]
      4. *-un-lft-identity98.8%

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

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

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

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

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

      \[\leadsto \left(\frac{0.3333333333333333 \cdot \frac{t}{z}}{y} + x\right) + \color{blue}{\frac{1}{-3 \cdot \frac{z}{y}}} \]
    13. Taylor expanded in t around inf 66.4%

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

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

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{y} \cdot \frac{t}{z}} \]
      3. *-commutative73.2%

        \[\leadsto \color{blue}{\frac{t}{z} \cdot \frac{0.3333333333333333}{y}} \]
    15. Simplified73.2%

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

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

Alternative 13: 75.2% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{-111} \lor \neg \left(y \leq 6.4 \cdot 10^{+69}\right):\\
\;\;\;\;x - \frac{0.3333333333333333}{\frac{z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.15e-111 or 6.3999999999999997e69 < y

    1. Initial program 95.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 87.1%

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

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

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

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

    if -1.15e-111 < y < 6.3999999999999997e69

    1. Initial program 89.5%

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

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

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

        \[\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*89.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{0.3333333333333333 \cdot \frac{t}{z}}{y} + x\right) + {\left(\frac{\color{blue}{-3 \cdot z}}{y}\right)}^{-1} \]
      4. *-un-lft-identity98.8%

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

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

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

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

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

      \[\leadsto \left(\frac{0.3333333333333333 \cdot \frac{t}{z}}{y} + x\right) + \color{blue}{\frac{1}{-3 \cdot \frac{z}{y}}} \]
    13. Taylor expanded in t around inf 66.4%

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{t}{y \cdot z}} \]
    14. Step-by-step derivation
      1. metadata-eval88.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333}{z}} \cdot t}{y} + x \]
    15. Applied egg-rr73.3%

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

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

Alternative 14: 47.2% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;z \leq 4.5 \cdot 10^{-26}:\\
\;\;\;\;\frac{y}{z} \cdot -0.3333333333333333\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.29999999999999978e76 or 4.4999999999999999e-26 < z

    1. Initial program 99.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-neg99.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+99.8%

        \[\leadsto \color{blue}{x + \left(\left(-\frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      3. +-commutative99.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-neg99.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-neg99.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-in99.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-neg99.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-neg99.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-199.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-frac87.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-neg87.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-187.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. *-commutative87.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*87.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. *-commutative87.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. Simplified87.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 55.0%

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

    if -4.29999999999999978e76 < z < 4.4999999999999999e-26

    1. Initial program 87.7%

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

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

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

        \[\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*87.7%

        \[\leadsto \left(\frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}} + x\right) + \left(-\frac{y}{z \cdot 3}\right) \]
      5. *-commutative87.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-neg287.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-in87.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-eval87.7%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot \color{blue}{-3}} \]
    3. Simplified87.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-identity87.7%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\color{blue}{\frac{0.3333333333333333 \cdot \frac{t}{z}}{y}} + x\right) + \frac{y}{z \cdot -3} \]
    9. Taylor expanded in y around inf 39.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.3 \cdot 10^{+76}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-26}:\\ \;\;\;\;\frac{y}{z} \cdot -0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 47.3% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;z \leq 2.1 \cdot 10^{-26}:\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.65e72 or 2.10000000000000008e-26 < z

    1. Initial program 99.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-neg99.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+99.8%

        \[\leadsto \color{blue}{x + \left(\left(-\frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      3. +-commutative99.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-neg99.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-neg99.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-in99.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-neg99.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-neg99.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-199.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-frac87.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-neg87.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-187.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. *-commutative87.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*87.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. *-commutative87.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. Simplified87.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 55.0%

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

    if -1.65e72 < z < 2.10000000000000008e-26

    1. Initial program 87.7%

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

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

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

        \[\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*87.7%

        \[\leadsto \left(\frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}} + x\right) + \left(-\frac{y}{z \cdot 3}\right) \]
      5. *-commutative87.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-neg287.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-in87.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-eval87.7%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot \color{blue}{-3}} \]
    3. Simplified87.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-identity87.7%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\color{blue}{\frac{0.3333333333333333 \cdot \frac{t}{z}}{y}} + x\right) + \frac{y}{z \cdot -3} \]
    9. Taylor expanded in y around inf 39.8%

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

        \[\leadsto -0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{z}{y}}} \]
      2. div-inv39.9%

        \[\leadsto \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
    11. Applied egg-rr39.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.65 \cdot 10^{+72}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-26}:\\ \;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 30.1% 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 92.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-neg92.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+92.6%

      \[\leadsto \color{blue}{x + \left(\left(-\frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
    3. +-commutative92.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-neg92.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-neg92.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-in92.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-neg92.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-neg92.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-192.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-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. Simplified94.6%

    \[\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 28.4%

    \[\leadsto \color{blue}{x} \]
  6. Final simplification28.4%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 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 2024039 
(FPCore (x y z t)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, H"
  :precision binary64

  :herbie-target
  (+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))

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