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

Percentage Accurate: 95.8% → 95.8%
Time: 10.8s
Alternatives: 18
Speedup: 1.0×

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 18 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 95.8% 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: 95.8% accurate, 1.0× speedup?

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

\\
\left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot -3}
\end{array}
Derivation
  1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

Alternative 2: 76.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ t_2 := x + \frac{y \cdot -0.3333333333333333}{z}\\ \mathbf{if}\;y \leq -5.6 \cdot 10^{-99}:\\ \;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq -1.06 \cdot 10^{-113}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -2.3 \cdot 10^{-156}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{-5}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{+27} \lor \neg \left(y \leq 4.4 \cdot 10^{+49}\right):\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{y \cdot \left(z \cdot 3\right)}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* 0.3333333333333333 (/ (/ t z) y)))
        (t_2 (+ x (/ (* y -0.3333333333333333) z))))
   (if (<= y -5.6e-99)
     (- x (* 0.3333333333333333 (/ y z)))
     (if (<= y -1.06e-113)
       t_1
       (if (<= y -2.3e-156)
         t_2
         (if (<= y 3.2e-5)
           t_1
           (if (or (<= y 6.2e+27) (not (<= y 4.4e+49)))
             t_2
             (/ t (* y (* z 3.0))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = 0.3333333333333333 * ((t / z) / y);
	double t_2 = x + ((y * -0.3333333333333333) / z);
	double tmp;
	if (y <= -5.6e-99) {
		tmp = x - (0.3333333333333333 * (y / z));
	} else if (y <= -1.06e-113) {
		tmp = t_1;
	} else if (y <= -2.3e-156) {
		tmp = t_2;
	} else if (y <= 3.2e-5) {
		tmp = t_1;
	} else if ((y <= 6.2e+27) || !(y <= 4.4e+49)) {
		tmp = t_2;
	} else {
		tmp = t / (y * (z * 3.0));
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = 0.3333333333333333d0 * ((t / z) / y)
    t_2 = x + ((y * (-0.3333333333333333d0)) / z)
    if (y <= (-5.6d-99)) then
        tmp = x - (0.3333333333333333d0 * (y / z))
    else if (y <= (-1.06d-113)) then
        tmp = t_1
    else if (y <= (-2.3d-156)) then
        tmp = t_2
    else if (y <= 3.2d-5) then
        tmp = t_1
    else if ((y <= 6.2d+27) .or. (.not. (y <= 4.4d+49))) then
        tmp = t_2
    else
        tmp = t / (y * (z * 3.0d0))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = 0.3333333333333333 * ((t / z) / y);
	double t_2 = x + ((y * -0.3333333333333333) / z);
	double tmp;
	if (y <= -5.6e-99) {
		tmp = x - (0.3333333333333333 * (y / z));
	} else if (y <= -1.06e-113) {
		tmp = t_1;
	} else if (y <= -2.3e-156) {
		tmp = t_2;
	} else if (y <= 3.2e-5) {
		tmp = t_1;
	} else if ((y <= 6.2e+27) || !(y <= 4.4e+49)) {
		tmp = t_2;
	} else {
		tmp = t / (y * (z * 3.0));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = 0.3333333333333333 * ((t / z) / y)
	t_2 = x + ((y * -0.3333333333333333) / z)
	tmp = 0
	if y <= -5.6e-99:
		tmp = x - (0.3333333333333333 * (y / z))
	elif y <= -1.06e-113:
		tmp = t_1
	elif y <= -2.3e-156:
		tmp = t_2
	elif y <= 3.2e-5:
		tmp = t_1
	elif (y <= 6.2e+27) or not (y <= 4.4e+49):
		tmp = t_2
	else:
		tmp = t / (y * (z * 3.0))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(0.3333333333333333 * Float64(Float64(t / z) / y))
	t_2 = Float64(x + Float64(Float64(y * -0.3333333333333333) / z))
	tmp = 0.0
	if (y <= -5.6e-99)
		tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z)));
	elseif (y <= -1.06e-113)
		tmp = t_1;
	elseif (y <= -2.3e-156)
		tmp = t_2;
	elseif (y <= 3.2e-5)
		tmp = t_1;
	elseif ((y <= 6.2e+27) || !(y <= 4.4e+49))
		tmp = t_2;
	else
		tmp = Float64(t / Float64(y * Float64(z * 3.0)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = 0.3333333333333333 * ((t / z) / y);
	t_2 = x + ((y * -0.3333333333333333) / z);
	tmp = 0.0;
	if (y <= -5.6e-99)
		tmp = x - (0.3333333333333333 * (y / z));
	elseif (y <= -1.06e-113)
		tmp = t_1;
	elseif (y <= -2.3e-156)
		tmp = t_2;
	elseif (y <= 3.2e-5)
		tmp = t_1;
	elseif ((y <= 6.2e+27) || ~((y <= 4.4e+49)))
		tmp = t_2;
	else
		tmp = t / (y * (z * 3.0));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.6e-99], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.06e-113], t$95$1, If[LessEqual[y, -2.3e-156], t$95$2, If[LessEqual[y, 3.2e-5], t$95$1, If[Or[LessEqual[y, 6.2e+27], N[Not[LessEqual[y, 4.4e+49]], $MachinePrecision]], t$95$2, N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -1.06 \cdot 10^{-113}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -2.3 \cdot 10^{-156}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq 3.2 \cdot 10^{-5}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 6.2 \cdot 10^{+27} \lor \neg \left(y \leq 4.4 \cdot 10^{+49}\right):\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -5.6000000000000001e-99

    1. Initial program 97.6%

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

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

    if -5.6000000000000001e-99 < y < -1.05999999999999995e-113 or -2.3e-156 < y < 3.19999999999999986e-5

    1. Initial program 95.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.3333333333333333 \cdot \frac{t}{\color{blue}{z \cdot y}} \]
      2. associate-/r*71.2%

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

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

    if -1.05999999999999995e-113 < y < -2.3e-156 or 3.19999999999999986e-5 < y < 6.19999999999999992e27 or 4.4000000000000001e49 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{z}{0.3333333333333333 \cdot \frac{t}{y} - 0.3333333333333333 \cdot y}}} \]
      4. *-un-lft-identity99.7%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{1 \cdot z}}{0.3333333333333333 \cdot \frac{t}{y} - 0.3333333333333333 \cdot y}} \]
      5. distribute-lft-out--99.7%

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{y \cdot -0.3333333333333333}}{z} \]
    10. Simplified94.1%

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

    if 6.19999999999999992e27 < y < 4.4000000000000001e49

    1. Initial program 85.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.3333333333333333 \cdot \frac{t}{\color{blue}{z \cdot y}} \]
      2. associate-/r*79.0%

        \[\leadsto 0.3333333333333333 \cdot \color{blue}{\frac{\frac{t}{z}}{y}} \]
    11. Simplified79.0%

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}} \]
    12. Step-by-step derivation
      1. associate-/l/79.0%

        \[\leadsto 0.3333333333333333 \cdot \color{blue}{\frac{t}{y \cdot z}} \]
      2. associate-*r/78.9%

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

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{y \cdot z} \cdot t} \]
      4. associate-/l/79.0%

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

        \[\leadsto \color{blue}{t \cdot \frac{\frac{0.3333333333333333}{z}}{y}} \]
      6. clear-num79.0%

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

        \[\leadsto \color{blue}{\frac{t}{\frac{y}{\frac{0.3333333333333333}{z}}}} \]
      8. div-inv79.2%

        \[\leadsto \frac{t}{\color{blue}{y \cdot \frac{1}{\frac{0.3333333333333333}{z}}}} \]
      9. clear-num79.0%

        \[\leadsto \frac{t}{y \cdot \color{blue}{\frac{z}{0.3333333333333333}}} \]
      10. div-inv79.2%

        \[\leadsto \frac{t}{y \cdot \color{blue}{\left(z \cdot \frac{1}{0.3333333333333333}\right)}} \]
      11. metadata-eval79.2%

        \[\leadsto \frac{t}{y \cdot \left(z \cdot \color{blue}{3}\right)} \]
    13. Applied egg-rr79.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.6 \cdot 10^{-99}:\\ \;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq -1.06 \cdot 10^{-113}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ \mathbf{elif}\;y \leq -2.3 \cdot 10^{-156}:\\ \;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{-5}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{+27} \lor \neg \left(y \leq 4.4 \cdot 10^{+49}\right):\\ \;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{y \cdot \left(z \cdot 3\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 76.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ t_2 := x + \frac{y \cdot -0.3333333333333333}{z}\\ \mathbf{if}\;y \leq -7 \cdot 10^{-99}:\\ \;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq -3.3 \cdot 10^{-114}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.85 \cdot 10^{-156}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-5}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{+27} \lor \neg \left(y \leq 4.4 \cdot 10^{+49}\right):\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* 0.3333333333333333 (/ (/ t z) y)))
        (t_2 (+ x (/ (* y -0.3333333333333333) z))))
   (if (<= y -7e-99)
     (- x (* 0.3333333333333333 (/ y z)))
     (if (<= y -3.3e-114)
       t_1
       (if (<= y -1.85e-156)
         t_2
         (if (<= y 3.1e-5)
           t_1
           (if (or (<= y 6.2e+27) (not (<= y 4.4e+49)))
             t_2
             (* 0.3333333333333333 (/ t (* z y))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = 0.3333333333333333 * ((t / z) / y);
	double t_2 = x + ((y * -0.3333333333333333) / z);
	double tmp;
	if (y <= -7e-99) {
		tmp = x - (0.3333333333333333 * (y / z));
	} else if (y <= -3.3e-114) {
		tmp = t_1;
	} else if (y <= -1.85e-156) {
		tmp = t_2;
	} else if (y <= 3.1e-5) {
		tmp = t_1;
	} else if ((y <= 6.2e+27) || !(y <= 4.4e+49)) {
		tmp = t_2;
	} 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = 0.3333333333333333d0 * ((t / z) / y)
    t_2 = x + ((y * (-0.3333333333333333d0)) / z)
    if (y <= (-7d-99)) then
        tmp = x - (0.3333333333333333d0 * (y / z))
    else if (y <= (-3.3d-114)) then
        tmp = t_1
    else if (y <= (-1.85d-156)) then
        tmp = t_2
    else if (y <= 3.1d-5) then
        tmp = t_1
    else if ((y <= 6.2d+27) .or. (.not. (y <= 4.4d+49))) then
        tmp = t_2
    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 t_1 = 0.3333333333333333 * ((t / z) / y);
	double t_2 = x + ((y * -0.3333333333333333) / z);
	double tmp;
	if (y <= -7e-99) {
		tmp = x - (0.3333333333333333 * (y / z));
	} else if (y <= -3.3e-114) {
		tmp = t_1;
	} else if (y <= -1.85e-156) {
		tmp = t_2;
	} else if (y <= 3.1e-5) {
		tmp = t_1;
	} else if ((y <= 6.2e+27) || !(y <= 4.4e+49)) {
		tmp = t_2;
	} else {
		tmp = 0.3333333333333333 * (t / (z * y));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = 0.3333333333333333 * ((t / z) / y)
	t_2 = x + ((y * -0.3333333333333333) / z)
	tmp = 0
	if y <= -7e-99:
		tmp = x - (0.3333333333333333 * (y / z))
	elif y <= -3.3e-114:
		tmp = t_1
	elif y <= -1.85e-156:
		tmp = t_2
	elif y <= 3.1e-5:
		tmp = t_1
	elif (y <= 6.2e+27) or not (y <= 4.4e+49):
		tmp = t_2
	else:
		tmp = 0.3333333333333333 * (t / (z * y))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(0.3333333333333333 * Float64(Float64(t / z) / y))
	t_2 = Float64(x + Float64(Float64(y * -0.3333333333333333) / z))
	tmp = 0.0
	if (y <= -7e-99)
		tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z)));
	elseif (y <= -3.3e-114)
		tmp = t_1;
	elseif (y <= -1.85e-156)
		tmp = t_2;
	elseif (y <= 3.1e-5)
		tmp = t_1;
	elseif ((y <= 6.2e+27) || !(y <= 4.4e+49))
		tmp = t_2;
	else
		tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = 0.3333333333333333 * ((t / z) / y);
	t_2 = x + ((y * -0.3333333333333333) / z);
	tmp = 0.0;
	if (y <= -7e-99)
		tmp = x - (0.3333333333333333 * (y / z));
	elseif (y <= -3.3e-114)
		tmp = t_1;
	elseif (y <= -1.85e-156)
		tmp = t_2;
	elseif (y <= 3.1e-5)
		tmp = t_1;
	elseif ((y <= 6.2e+27) || ~((y <= 4.4e+49)))
		tmp = t_2;
	else
		tmp = 0.3333333333333333 * (t / (z * y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7e-99], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.3e-114], t$95$1, If[LessEqual[y, -1.85e-156], t$95$2, If[LessEqual[y, 3.1e-5], t$95$1, If[Or[LessEqual[y, 6.2e+27], N[Not[LessEqual[y, 4.4e+49]], $MachinePrecision]], t$95$2, N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -3.3 \cdot 10^{-114}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -1.85 \cdot 10^{-156}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq 3.1 \cdot 10^{-5}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 6.2 \cdot 10^{+27} \lor \neg \left(y \leq 4.4 \cdot 10^{+49}\right):\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -6.9999999999999997e-99

    1. Initial program 97.6%

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

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

    if -6.9999999999999997e-99 < y < -3.30000000000000035e-114 or -1.85e-156 < y < 3.10000000000000014e-5

    1. Initial program 95.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.3333333333333333 \cdot \frac{t}{\color{blue}{z \cdot y}} \]
      2. associate-/r*71.2%

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

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

    if -3.30000000000000035e-114 < y < -1.85e-156 or 3.10000000000000014e-5 < y < 6.19999999999999992e27 or 4.4000000000000001e49 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{z}{0.3333333333333333 \cdot \frac{t}{y} - 0.3333333333333333 \cdot y}}} \]
      4. *-un-lft-identity99.7%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{1 \cdot z}}{0.3333333333333333 \cdot \frac{t}{y} - 0.3333333333333333 \cdot y}} \]
      5. distribute-lft-out--99.7%

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{y \cdot -0.3333333333333333}}{z} \]
    10. Simplified94.1%

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

    if 6.19999999999999992e27 < y < 4.4000000000000001e49

    1. Initial program 85.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{-99}:\\ \;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq -3.3 \cdot 10^{-114}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ \mathbf{elif}\;y \leq -1.85 \cdot 10^{-156}:\\ \;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-5}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{+27} \lor \neg \left(y \leq 4.4 \cdot 10^{+49}\right):\\ \;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 76.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ t_2 := x + \frac{y \cdot -0.3333333333333333}{z}\\ \mathbf{if}\;y \leq -2.4 \cdot 10^{-99}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -1.65 \cdot 10^{-114}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{-158}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-5}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{+27} \lor \neg \left(y \leq 4.4 \cdot 10^{+49}\right):\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* 0.3333333333333333 (/ (/ t z) y)))
        (t_2 (+ x (/ (* y -0.3333333333333333) z))))
   (if (<= y -2.4e-99)
     t_2
     (if (<= y -1.65e-114)
       t_1
       (if (<= y -4.2e-158)
         t_2
         (if (<= y 3.1e-5)
           t_1
           (if (or (<= y 6.2e+27) (not (<= y 4.4e+49)))
             t_2
             (* 0.3333333333333333 (/ t (* z y))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = 0.3333333333333333 * ((t / z) / y);
	double t_2 = x + ((y * -0.3333333333333333) / z);
	double tmp;
	if (y <= -2.4e-99) {
		tmp = t_2;
	} else if (y <= -1.65e-114) {
		tmp = t_1;
	} else if (y <= -4.2e-158) {
		tmp = t_2;
	} else if (y <= 3.1e-5) {
		tmp = t_1;
	} else if ((y <= 6.2e+27) || !(y <= 4.4e+49)) {
		tmp = t_2;
	} 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = 0.3333333333333333d0 * ((t / z) / y)
    t_2 = x + ((y * (-0.3333333333333333d0)) / z)
    if (y <= (-2.4d-99)) then
        tmp = t_2
    else if (y <= (-1.65d-114)) then
        tmp = t_1
    else if (y <= (-4.2d-158)) then
        tmp = t_2
    else if (y <= 3.1d-5) then
        tmp = t_1
    else if ((y <= 6.2d+27) .or. (.not. (y <= 4.4d+49))) then
        tmp = t_2
    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 t_1 = 0.3333333333333333 * ((t / z) / y);
	double t_2 = x + ((y * -0.3333333333333333) / z);
	double tmp;
	if (y <= -2.4e-99) {
		tmp = t_2;
	} else if (y <= -1.65e-114) {
		tmp = t_1;
	} else if (y <= -4.2e-158) {
		tmp = t_2;
	} else if (y <= 3.1e-5) {
		tmp = t_1;
	} else if ((y <= 6.2e+27) || !(y <= 4.4e+49)) {
		tmp = t_2;
	} else {
		tmp = 0.3333333333333333 * (t / (z * y));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = 0.3333333333333333 * ((t / z) / y)
	t_2 = x + ((y * -0.3333333333333333) / z)
	tmp = 0
	if y <= -2.4e-99:
		tmp = t_2
	elif y <= -1.65e-114:
		tmp = t_1
	elif y <= -4.2e-158:
		tmp = t_2
	elif y <= 3.1e-5:
		tmp = t_1
	elif (y <= 6.2e+27) or not (y <= 4.4e+49):
		tmp = t_2
	else:
		tmp = 0.3333333333333333 * (t / (z * y))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(0.3333333333333333 * Float64(Float64(t / z) / y))
	t_2 = Float64(x + Float64(Float64(y * -0.3333333333333333) / z))
	tmp = 0.0
	if (y <= -2.4e-99)
		tmp = t_2;
	elseif (y <= -1.65e-114)
		tmp = t_1;
	elseif (y <= -4.2e-158)
		tmp = t_2;
	elseif (y <= 3.1e-5)
		tmp = t_1;
	elseif ((y <= 6.2e+27) || !(y <= 4.4e+49))
		tmp = t_2;
	else
		tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = 0.3333333333333333 * ((t / z) / y);
	t_2 = x + ((y * -0.3333333333333333) / z);
	tmp = 0.0;
	if (y <= -2.4e-99)
		tmp = t_2;
	elseif (y <= -1.65e-114)
		tmp = t_1;
	elseif (y <= -4.2e-158)
		tmp = t_2;
	elseif (y <= 3.1e-5)
		tmp = t_1;
	elseif ((y <= 6.2e+27) || ~((y <= 4.4e+49)))
		tmp = t_2;
	else
		tmp = 0.3333333333333333 * (t / (z * y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.4e-99], t$95$2, If[LessEqual[y, -1.65e-114], t$95$1, If[LessEqual[y, -4.2e-158], t$95$2, If[LessEqual[y, 3.1e-5], t$95$1, If[Or[LessEqual[y, 6.2e+27], N[Not[LessEqual[y, 4.4e+49]], $MachinePrecision]], t$95$2, N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -1.65 \cdot 10^{-114}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -4.2 \cdot 10^{-158}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq 3.1 \cdot 10^{-5}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 6.2 \cdot 10^{+27} \lor \neg \left(y \leq 4.4 \cdot 10^{+49}\right):\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.4e-99 or -1.65000000000000017e-114 < y < -4.19999999999999983e-158 or 3.10000000000000014e-5 < y < 6.19999999999999992e27 or 4.4000000000000001e49 < y

    1. Initial program 98.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-neg98.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+98.5%

        \[\leadsto \color{blue}{x + \left(\left(-\frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      3. +-commutative98.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-neg98.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-neg98.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-in98.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-neg98.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-neg98.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-198.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-frac99.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-neg99.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-199.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. *-commutative99.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*99.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. *-commutative99.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.0%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{z}{0.3333333333333333 \cdot \frac{t}{y} - 0.3333333333333333 \cdot y}}} \]
      4. *-un-lft-identity99.1%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{1 \cdot z}}{0.3333333333333333 \cdot \frac{t}{y} - 0.3333333333333333 \cdot y}} \]
      5. distribute-lft-out--99.1%

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

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

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

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

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

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

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

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

    if -2.4e-99 < y < -1.65000000000000017e-114 or -4.19999999999999983e-158 < y < 3.10000000000000014e-5

    1. Initial program 95.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.3333333333333333 \cdot \frac{t}{\color{blue}{z \cdot y}} \]
      2. associate-/r*71.2%

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

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

    if 6.19999999999999992e27 < y < 4.4000000000000001e49

    1. Initial program 85.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.4 \cdot 10^{-99}:\\ \;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq -1.65 \cdot 10^{-114}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{-158}:\\ \;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-5}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{+27} \lor \neg \left(y \leq 4.4 \cdot 10^{+49}\right):\\ \;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 62.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ \mathbf{if}\;y \leq -7.2 \cdot 10^{+80}:\\ \;\;\;\;\frac{\frac{y}{-3}}{z}\\ \mathbf{elif}\;y \leq -9.2 \cdot 10^{-99}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -1.1 \cdot 10^{-114}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -2.2 \cdot 10^{-157}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 5 \cdot 10^{+53}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z \cdot -3}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* 0.3333333333333333 (/ (/ t z) y))))
   (if (<= y -7.2e+80)
     (/ (/ y -3.0) z)
     (if (<= y -9.2e-99)
       x
       (if (<= y -1.1e-114)
         t_1
         (if (<= y -2.2e-157) x (if (<= y 5e+53) t_1 (/ y (* z -3.0)))))))))
double code(double x, double y, double z, double t) {
	double t_1 = 0.3333333333333333 * ((t / z) / y);
	double tmp;
	if (y <= -7.2e+80) {
		tmp = (y / -3.0) / z;
	} else if (y <= -9.2e-99) {
		tmp = x;
	} else if (y <= -1.1e-114) {
		tmp = t_1;
	} else if (y <= -2.2e-157) {
		tmp = x;
	} else if (y <= 5e+53) {
		tmp = t_1;
	} else {
		tmp = y / (z * -3.0);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 0.3333333333333333d0 * ((t / z) / y)
    if (y <= (-7.2d+80)) then
        tmp = (y / (-3.0d0)) / z
    else if (y <= (-9.2d-99)) then
        tmp = x
    else if (y <= (-1.1d-114)) then
        tmp = t_1
    else if (y <= (-2.2d-157)) then
        tmp = x
    else if (y <= 5d+53) then
        tmp = t_1
    else
        tmp = y / (z * (-3.0d0))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = 0.3333333333333333 * ((t / z) / y);
	double tmp;
	if (y <= -7.2e+80) {
		tmp = (y / -3.0) / z;
	} else if (y <= -9.2e-99) {
		tmp = x;
	} else if (y <= -1.1e-114) {
		tmp = t_1;
	} else if (y <= -2.2e-157) {
		tmp = x;
	} else if (y <= 5e+53) {
		tmp = t_1;
	} else {
		tmp = y / (z * -3.0);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = 0.3333333333333333 * ((t / z) / y)
	tmp = 0
	if y <= -7.2e+80:
		tmp = (y / -3.0) / z
	elif y <= -9.2e-99:
		tmp = x
	elif y <= -1.1e-114:
		tmp = t_1
	elif y <= -2.2e-157:
		tmp = x
	elif y <= 5e+53:
		tmp = t_1
	else:
		tmp = y / (z * -3.0)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(0.3333333333333333 * Float64(Float64(t / z) / y))
	tmp = 0.0
	if (y <= -7.2e+80)
		tmp = Float64(Float64(y / -3.0) / z);
	elseif (y <= -9.2e-99)
		tmp = x;
	elseif (y <= -1.1e-114)
		tmp = t_1;
	elseif (y <= -2.2e-157)
		tmp = x;
	elseif (y <= 5e+53)
		tmp = t_1;
	else
		tmp = Float64(y / Float64(z * -3.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = 0.3333333333333333 * ((t / z) / y);
	tmp = 0.0;
	if (y <= -7.2e+80)
		tmp = (y / -3.0) / z;
	elseif (y <= -9.2e-99)
		tmp = x;
	elseif (y <= -1.1e-114)
		tmp = t_1;
	elseif (y <= -2.2e-157)
		tmp = x;
	elseif (y <= 5e+53)
		tmp = t_1;
	else
		tmp = y / (z * -3.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.2e+80], N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, -9.2e-99], x, If[LessEqual[y, -1.1e-114], t$95$1, If[LessEqual[y, -2.2e-157], x, If[LessEqual[y, 5e+53], t$95$1, N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -9.2 \cdot 10^{-99}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq -1.1 \cdot 10^{-114}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -2.2 \cdot 10^{-157}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 5 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -7.1999999999999999e80

    1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    10. Step-by-step derivation
      1. *-commutative67.3%

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

        \[\leadsto \color{blue}{\frac{y \cdot -0.3333333333333333}{z}} \]
      3. associate-*r/67.4%

        \[\leadsto \color{blue}{y \cdot \frac{-0.3333333333333333}{z}} \]
    11. Simplified67.4%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{-0.3333333333333333}}} \]
      3. div-inv67.3%

        \[\leadsto \frac{y}{\color{blue}{z \cdot \frac{1}{-0.3333333333333333}}} \]
      4. metadata-eval67.3%

        \[\leadsto \frac{y}{z \cdot \color{blue}{-3}} \]
    13. Applied egg-rr67.3%

      \[\leadsto \color{blue}{\frac{y}{z \cdot -3}} \]
    14. Step-by-step derivation
      1. *-commutative67.3%

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

        \[\leadsto \color{blue}{\frac{\frac{y}{-3}}{z}} \]
    15. Simplified67.4%

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

    if -7.1999999999999999e80 < y < -9.1999999999999994e-99 or -1.10000000000000006e-114 < y < -2.2000000000000001e-157

    1. Initial program 98.0%

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

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

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

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

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

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

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

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

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

      \[\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 inf 52.3%

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

    if -9.1999999999999994e-99 < y < -1.10000000000000006e-114 or -2.2000000000000001e-157 < y < 5.0000000000000004e53

    1. Initial program 95.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{t}{y \cdot z}} \]
    10. Step-by-step derivation
      1. *-commutative67.9%

        \[\leadsto 0.3333333333333333 \cdot \frac{t}{\color{blue}{z \cdot y}} \]
      2. associate-/r*68.1%

        \[\leadsto 0.3333333333333333 \cdot \color{blue}{\frac{\frac{t}{z}}{y}} \]
    11. Simplified68.1%

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

    if 5.0000000000000004e53 < y

    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. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    10. Step-by-step derivation
      1. *-commutative72.4%

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

        \[\leadsto \color{blue}{\frac{y \cdot -0.3333333333333333}{z}} \]
      3. associate-*r/72.3%

        \[\leadsto \color{blue}{y \cdot \frac{-0.3333333333333333}{z}} \]
    11. Simplified72.3%

      \[\leadsto \color{blue}{y \cdot \frac{-0.3333333333333333}{z}} \]
    12. Step-by-step derivation
      1. clear-num72.3%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{-0.3333333333333333}}} \]
      3. div-inv72.4%

        \[\leadsto \frac{y}{\color{blue}{z \cdot \frac{1}{-0.3333333333333333}}} \]
      4. metadata-eval72.4%

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

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

Alternative 6: 60.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\ \mathbf{if}\;y \leq -1.85 \cdot 10^{+82}:\\ \;\;\;\;\frac{\frac{y}{-3}}{z}\\ \mathbf{elif}\;y \leq -7.8 \cdot 10^{-99}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -1.38 \cdot 10^{-114}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-156}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{+54}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z \cdot -3}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* 0.3333333333333333 (/ t (* z y)))))
   (if (<= y -1.85e+82)
     (/ (/ y -3.0) z)
     (if (<= y -7.8e-99)
       x
       (if (<= y -1.38e-114)
         t_1
         (if (<= y -3.2e-156) x (if (<= y 1.7e+54) t_1 (/ y (* z -3.0)))))))))
double code(double x, double y, double z, double t) {
	double t_1 = 0.3333333333333333 * (t / (z * y));
	double tmp;
	if (y <= -1.85e+82) {
		tmp = (y / -3.0) / z;
	} else if (y <= -7.8e-99) {
		tmp = x;
	} else if (y <= -1.38e-114) {
		tmp = t_1;
	} else if (y <= -3.2e-156) {
		tmp = x;
	} else if (y <= 1.7e+54) {
		tmp = t_1;
	} else {
		tmp = y / (z * -3.0);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 0.3333333333333333d0 * (t / (z * y))
    if (y <= (-1.85d+82)) then
        tmp = (y / (-3.0d0)) / z
    else if (y <= (-7.8d-99)) then
        tmp = x
    else if (y <= (-1.38d-114)) then
        tmp = t_1
    else if (y <= (-3.2d-156)) then
        tmp = x
    else if (y <= 1.7d+54) then
        tmp = t_1
    else
        tmp = y / (z * (-3.0d0))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = 0.3333333333333333 * (t / (z * y));
	double tmp;
	if (y <= -1.85e+82) {
		tmp = (y / -3.0) / z;
	} else if (y <= -7.8e-99) {
		tmp = x;
	} else if (y <= -1.38e-114) {
		tmp = t_1;
	} else if (y <= -3.2e-156) {
		tmp = x;
	} else if (y <= 1.7e+54) {
		tmp = t_1;
	} else {
		tmp = y / (z * -3.0);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = 0.3333333333333333 * (t / (z * y))
	tmp = 0
	if y <= -1.85e+82:
		tmp = (y / -3.0) / z
	elif y <= -7.8e-99:
		tmp = x
	elif y <= -1.38e-114:
		tmp = t_1
	elif y <= -3.2e-156:
		tmp = x
	elif y <= 1.7e+54:
		tmp = t_1
	else:
		tmp = y / (z * -3.0)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(0.3333333333333333 * Float64(t / Float64(z * y)))
	tmp = 0.0
	if (y <= -1.85e+82)
		tmp = Float64(Float64(y / -3.0) / z);
	elseif (y <= -7.8e-99)
		tmp = x;
	elseif (y <= -1.38e-114)
		tmp = t_1;
	elseif (y <= -3.2e-156)
		tmp = x;
	elseif (y <= 1.7e+54)
		tmp = t_1;
	else
		tmp = Float64(y / Float64(z * -3.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = 0.3333333333333333 * (t / (z * y));
	tmp = 0.0;
	if (y <= -1.85e+82)
		tmp = (y / -3.0) / z;
	elseif (y <= -7.8e-99)
		tmp = x;
	elseif (y <= -1.38e-114)
		tmp = t_1;
	elseif (y <= -3.2e-156)
		tmp = x;
	elseif (y <= 1.7e+54)
		tmp = t_1;
	else
		tmp = y / (z * -3.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.85e+82], N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, -7.8e-99], x, If[LessEqual[y, -1.38e-114], t$95$1, If[LessEqual[y, -3.2e-156], x, If[LessEqual[y, 1.7e+54], t$95$1, N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{if}\;y \leq -1.85 \cdot 10^{+82}:\\
\;\;\;\;\frac{\frac{y}{-3}}{z}\\

\mathbf{elif}\;y \leq -7.8 \cdot 10^{-99}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq -1.38 \cdot 10^{-114}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -3.2 \cdot 10^{-156}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.7 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.8500000000000001e82

    1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    10. Step-by-step derivation
      1. *-commutative67.3%

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

        \[\leadsto \color{blue}{\frac{y \cdot -0.3333333333333333}{z}} \]
      3. associate-*r/67.4%

        \[\leadsto \color{blue}{y \cdot \frac{-0.3333333333333333}{z}} \]
    11. Simplified67.4%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{-0.3333333333333333}}} \]
      3. div-inv67.3%

        \[\leadsto \frac{y}{\color{blue}{z \cdot \frac{1}{-0.3333333333333333}}} \]
      4. metadata-eval67.3%

        \[\leadsto \frac{y}{z \cdot \color{blue}{-3}} \]
    13. Applied egg-rr67.3%

      \[\leadsto \color{blue}{\frac{y}{z \cdot -3}} \]
    14. Step-by-step derivation
      1. *-commutative67.3%

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

        \[\leadsto \color{blue}{\frac{\frac{y}{-3}}{z}} \]
    15. Simplified67.4%

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

    if -1.8500000000000001e82 < y < -7.79999999999999975e-99 or -1.38e-114 < y < -3.19999999999999982e-156

    1. Initial program 98.0%

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

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

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

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

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

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

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

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

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

      \[\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 inf 52.3%

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

    if -7.79999999999999975e-99 < y < -1.38e-114 or -3.19999999999999982e-156 < y < 1.7e54

    1. Initial program 95.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.7e54 < y

    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. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    10. Step-by-step derivation
      1. *-commutative72.4%

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

        \[\leadsto \color{blue}{\frac{y \cdot -0.3333333333333333}{z}} \]
      3. associate-*r/72.3%

        \[\leadsto \color{blue}{y \cdot \frac{-0.3333333333333333}{z}} \]
    11. Simplified72.3%

      \[\leadsto \color{blue}{y \cdot \frac{-0.3333333333333333}{z}} \]
    12. Step-by-step derivation
      1. clear-num72.3%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{-0.3333333333333333}}} \]
      3. div-inv72.4%

        \[\leadsto \frac{y}{\color{blue}{z \cdot \frac{1}{-0.3333333333333333}}} \]
      4. metadata-eval72.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.85 \cdot 10^{+82}:\\ \;\;\;\;\frac{\frac{y}{-3}}{z}\\ \mathbf{elif}\;y \leq -7.8 \cdot 10^{-99}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -1.38 \cdot 10^{-114}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-156}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{+54}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z \cdot -3}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 91.8% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq 4.4 \cdot 10^{+49}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \left(\frac{1}{y} \cdot \frac{t}{z}\right)\\

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


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

    1. Initial program 98.2%

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

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

    if -1.6499999999999999e24 < y < 4.4000000000000001e49

    1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(-\left(\frac{\color{blue}{-1 \cdot t}}{\left(z \cdot 3\right) \cdot y} - \left(-\frac{y}{z \cdot 3}\right)\right)\right) \]
      10. times-frac94.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-neg94.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-194.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. *-commutative94.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*93.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. *-commutative93.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. Simplified94.5%

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

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

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

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

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

    if 4.4000000000000001e49 < y

    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-frac99.8%

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

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

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

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \frac{\color{blue}{y \cdot -1}}{z \cdot 3}\right)\right) \]
      14. associate-/l*99.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. *-commutative99.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.7%

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{z}{0.3333333333333333 \cdot \frac{t}{y} - 0.3333333333333333 \cdot y}}} \]
      4. *-un-lft-identity99.7%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{1 \cdot z}}{0.3333333333333333 \cdot \frac{t}{y} - 0.3333333333333333 \cdot y}} \]
      5. distribute-lft-out--99.7%

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

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

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

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

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

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

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

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

Alternative 8: 89.5% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq 4.6 \cdot 10^{+50}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\

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


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

    1. Initial program 98.2%

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

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

    if -5.79999999999999958e24 < y < 4.59999999999999994e50

    1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(-\left(\frac{\color{blue}{-1 \cdot t}}{\left(z \cdot 3\right) \cdot y} - \left(-\frac{y}{z \cdot 3}\right)\right)\right) \]
      10. times-frac94.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-neg94.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-194.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. *-commutative94.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*93.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. *-commutative93.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. Simplified94.5%

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

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

    if 4.59999999999999994e50 < y

    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-frac99.8%

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

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

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

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \frac{\color{blue}{y \cdot -1}}{z \cdot 3}\right)\right) \]
      14. associate-/l*99.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. *-commutative99.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.7%

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{z}{0.3333333333333333 \cdot \frac{t}{y} - 0.3333333333333333 \cdot y}}} \]
      4. *-un-lft-identity99.7%

        \[\leadsto x + \frac{1}{\frac{\color{blue}{1 \cdot z}}{0.3333333333333333 \cdot \frac{t}{y} - 0.3333333333333333 \cdot y}} \]
      5. distribute-lft-out--99.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.8 \cdot 10^{+24}:\\ \;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{+50}:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 77.7% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.25e112

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.25e112 < x < 1.3799999999999999e181

    1. Initial program 96.2%

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

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

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

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

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

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

    if 1.3799999999999999e181 < x

    1. Initial program 100.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-neg100.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+100.0%

        \[\leadsto \color{blue}{x + \left(\left(-\frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      3. +-commutative100.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-neg100.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-neg100.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-in100.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-neg100.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-neg100.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-1100.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-frac94.8%

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

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

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

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \frac{\color{blue}{y \cdot -1}}{z \cdot 3}\right)\right) \]
      14. associate-/l*94.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. *-commutative94.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. Simplified94.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 94.8%

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

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

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

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

        \[\leadsto x + \frac{1}{\frac{\color{blue}{1 \cdot z}}{0.3333333333333333 \cdot \frac{t}{y} - 0.3333333333333333 \cdot y}} \]
      5. distribute-lft-out--94.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.25 \cdot 10^{+112}:\\ \;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\ \mathbf{elif}\;x \leq 1.38 \cdot 10^{+181}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 77.7% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.25e112

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.25e112 < x < 1.3799999999999999e181

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.3333333333333333 \cdot \color{blue}{\frac{\frac{t}{y}}{z}} + \left(-0.3333333333333333 \cdot \frac{y}{z}\right) \]
      5. fma-define76.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(0.3333333333333333, \frac{\frac{t}{y}}{z}, -0.3333333333333333 \cdot \frac{y}{z}\right)} \]
      6. fma-neg76.8%

        \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{\frac{t}{y}}{z} - 0.3333333333333333 \cdot \frac{y}{z}} \]
      7. distribute-lft-out--76.8%

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

        \[\leadsto 0.3333333333333333 \cdot \color{blue}{\frac{\frac{t}{y} - y}{z}} \]
      9. associate-*r/77.3%

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

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    11. Simplified77.2%

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

    if 1.3799999999999999e181 < x

    1. Initial program 100.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-neg100.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+100.0%

        \[\leadsto \color{blue}{x + \left(\left(-\frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      3. +-commutative100.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-neg100.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-neg100.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-in100.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-neg100.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-neg100.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-1100.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-frac94.8%

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

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

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

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \frac{\color{blue}{y \cdot -1}}{z \cdot 3}\right)\right) \]
      14. associate-/l*94.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. *-commutative94.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. Simplified94.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 94.8%

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

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

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

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

        \[\leadsto x + \frac{1}{\frac{\color{blue}{1 \cdot z}}{0.3333333333333333 \cdot \frac{t}{y} - 0.3333333333333333 \cdot y}} \]
      5. distribute-lft-out--94.8%

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

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

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

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

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

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

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

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

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

Alternative 11: 48.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{+80} \lor \neg \left(y \leq 1.52 \cdot 10^{+81}\right):\\
\;\;\;\;\frac{\frac{y}{-3}}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.49999999999999967e80 or 1.51999999999999999e81 < y

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    10. Step-by-step derivation
      1. *-commutative72.9%

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

        \[\leadsto \color{blue}{\frac{y \cdot -0.3333333333333333}{z}} \]
      3. associate-*r/72.9%

        \[\leadsto \color{blue}{y \cdot \frac{-0.3333333333333333}{z}} \]
    11. Simplified72.9%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{-0.3333333333333333}}} \]
      3. div-inv72.9%

        \[\leadsto \frac{y}{\color{blue}{z \cdot \frac{1}{-0.3333333333333333}}} \]
      4. metadata-eval72.9%

        \[\leadsto \frac{y}{z \cdot \color{blue}{-3}} \]
    13. Applied egg-rr72.9%

      \[\leadsto \color{blue}{\frac{y}{z \cdot -3}} \]
    14. Step-by-step derivation
      1. *-commutative72.9%

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

        \[\leadsto \color{blue}{\frac{\frac{y}{-3}}{z}} \]
    15. Simplified73.0%

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

    if -5.49999999999999967e80 < y < 1.51999999999999999e81

    1. Initial program 96.3%

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

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

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

        \[\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. Taylor expanded in z around inf 35.7%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification48.2%

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

Alternative 12: 47.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.1 \cdot 10^{+82} \lor \neg \left(y \leq 3.7 \cdot 10^{+80}\right):\\
\;\;\;\;\frac{y}{z} \cdot -0.3333333333333333\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.1000000000000003e82 or 3.69999999999999996e80 < y

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.1000000000000003e82 < y < 3.69999999999999996e80

    1. Initial program 96.3%

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

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

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

        \[\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. Taylor expanded in z around inf 35.7%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification48.2%

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

Alternative 13: 48.0% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;y \leq 1.32 \cdot 10^{+82}:\\
\;\;\;\;x\\

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


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

    1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    10. Step-by-step derivation
      1. *-commutative67.3%

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

        \[\leadsto \color{blue}{\frac{y \cdot -0.3333333333333333}{z}} \]
      3. associate-*r/67.4%

        \[\leadsto \color{blue}{y \cdot \frac{-0.3333333333333333}{z}} \]
    11. Simplified67.4%

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

    if -8.0000000000000001e86 < y < 1.32e82

    1. Initial program 96.3%

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

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

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

        \[\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. Taylor expanded in z around inf 35.7%

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

    if 1.32e82 < y

    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. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    10. Step-by-step derivation
      1. *-commutative79.6%

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

        \[\leadsto \color{blue}{\frac{y \cdot -0.3333333333333333}{z}} \]
      3. associate-*r/79.5%

        \[\leadsto \color{blue}{y \cdot \frac{-0.3333333333333333}{z}} \]
    11. Simplified79.5%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{-0.3333333333333333}}} \]
      3. div-inv79.7%

        \[\leadsto \frac{y}{\color{blue}{z \cdot \frac{1}{-0.3333333333333333}}} \]
      4. metadata-eval79.7%

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

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

Alternative 14: 47.9% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;y \leq 4.5 \cdot 10^{+83}:\\
\;\;\;\;x\\

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


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

    1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    10. Step-by-step derivation
      1. *-commutative67.3%

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

        \[\leadsto \color{blue}{\frac{y \cdot -0.3333333333333333}{z}} \]
      3. associate-*r/67.4%

        \[\leadsto \color{blue}{y \cdot \frac{-0.3333333333333333}{z}} \]
    11. Simplified67.4%

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

    if -1.84999999999999998e80 < y < 4.4999999999999999e83

    1. Initial program 96.3%

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

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

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

        \[\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. Taylor expanded in z around inf 35.7%

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

    if 4.4999999999999999e83 < y

    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. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 95.7% accurate, 1.2× speedup?

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

\\
x + \frac{1}{3 \cdot \frac{z}{\frac{t}{y} - y}}
\end{array}
Derivation
  1. Initial program 97.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-neg97.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+97.1%

      \[\leadsto \color{blue}{x + \left(\left(-\frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
    3. +-commutative97.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-neg97.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-neg97.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-in97.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-neg97.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-neg97.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-197.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.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-neg96.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-196.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. *-commutative96.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*96.4%

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

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

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

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

      \[\leadsto x + \frac{\color{blue}{0.3333333333333333 \cdot \frac{t}{y} - 0.3333333333333333 \cdot y}}{z} \]
    3. clear-num96.8%

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

      \[\leadsto x + \frac{1}{\frac{\color{blue}{1 \cdot z}}{0.3333333333333333 \cdot \frac{t}{y} - 0.3333333333333333 \cdot y}} \]
    5. distribute-lft-out--96.8%

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

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

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

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

Alternative 16: 95.7% accurate, 1.4× speedup?

\[\begin{array}{l} \\ x + \frac{\frac{t}{y} - y}{z \cdot 3} \end{array} \]
(FPCore (x y z t) :precision binary64 (+ x (/ (- (/ t y) y) (* z 3.0))))
double code(double x, double y, double z, double t) {
	return x + (((t / y) - y) / (z * 3.0));
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x + (((t / y) - y) / (z * 3.0d0))
end function
public static double code(double x, double y, double z, double t) {
	return x + (((t / y) - y) / (z * 3.0));
}
def code(x, y, z, t):
	return x + (((t / y) - y) / (z * 3.0))
function code(x, y, z, t)
	return Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0)))
end
function tmp = code(x, y, z, t)
	tmp = x + (((t / y) - y) / (z * 3.0));
end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{\frac{t}{y} - y}{z \cdot 3}
\end{array}
Derivation
  1. Initial program 97.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-neg97.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+97.1%

      \[\leadsto \color{blue}{x + \left(\left(-\frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
    3. +-commutative97.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-neg97.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-neg97.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-in97.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-neg97.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-neg97.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-197.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.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-neg96.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-196.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. *-commutative96.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*96.4%

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

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

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

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

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

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

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

    \[\leadsto x + \color{blue}{\frac{\frac{t}{y} - y}{z \cdot 3}} \]
  7. Add Preprocessing

Alternative 17: 95.6% accurate, 1.4× speedup?

\[\begin{array}{l} \\ x + 0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (+ x (* 0.3333333333333333 (/ (- (/ t y) y) z))))
double code(double x, double y, double z, double t) {
	return x + (0.3333333333333333 * (((t / y) - y) / z));
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x + (0.3333333333333333d0 * (((t / y) - y) / z))
end function
public static double code(double x, double y, double z, double t) {
	return x + (0.3333333333333333 * (((t / y) - y) / z));
}
def code(x, y, z, t):
	return x + (0.3333333333333333 * (((t / y) - y) / z))
function code(x, y, z, t)
	return Float64(x + Float64(0.3333333333333333 * Float64(Float64(Float64(t / y) - y) / z)))
end
function tmp = code(x, y, z, t)
	tmp = x + (0.3333333333333333 * (((t / y) - y) / z));
end
code[x_, y_, z_, t_] := N[(x + N[(0.3333333333333333 * N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + 0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}
\end{array}
Derivation
  1. Initial program 97.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-neg97.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+97.1%

      \[\leadsto \color{blue}{x + \left(\left(-\frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
    3. +-commutative97.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-neg97.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-neg97.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-in97.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-neg97.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-neg97.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-197.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.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-neg96.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-196.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. *-commutative96.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*96.4%

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

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

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

Alternative 18: 30.7% 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 97.1%

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

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

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

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

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

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

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

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

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

    \[\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 inf 32.4%

    \[\leadsto \color{blue}{x} \]
  6. 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 2024085 
(FPCore (x y z t)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, H"
  :precision binary64

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

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