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

Percentage Accurate: 95.5% → 99.0%
Time: 12.9s
Alternatives: 14
Speedup: 1.4×

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 14 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.5% 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: 99.0% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

    if -2.00000000000000007e62 < (*.f64 z #s(literal 3 binary64)) < 2.00000000000000018e-111

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

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

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

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

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

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

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

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

    if 2.00000000000000018e-111 < (*.f64 z #s(literal 3 binary64))

    1. Initial program 99.8%

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

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

Alternative 2: 99.0% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z #s(literal 3 binary64)) < -2.00000000000000007e62 or 2.00000000000000018e-111 < (*.f64 z #s(literal 3 binary64))

    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

    if -2.00000000000000007e62 < (*.f64 z #s(literal 3 binary64)) < 2.00000000000000018e-111

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

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

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

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

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

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

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

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

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

Alternative 3: 81.2% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;3 \cdot z \leq 5 \cdot 10^{+33}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\

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


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

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(-0.3333333333333333\right)} \cdot \frac{y}{z} \]
      2. cancel-sign-sub-inv80.6%

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

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

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

    if -4.99999999999999991e108 < (*.f64 z #s(literal 3 binary64)) < 4.99999999999999973e33

    1. Initial program 92.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-neg92.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+92.0%

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

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

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

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

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

      \[\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. Taylor expanded in x around 0 85.7%

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

    if 4.99999999999999973e33 < (*.f64 z #s(literal 3 binary64))

    1. Initial program 99.7%

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

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

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

Alternative 4: 97.2% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 2.9999999999999998e-190

    1. Initial program 92.1%

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

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

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

        \[\leadsto \left(\frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}} + x\right) + \left(-\frac{y}{z \cdot 3}\right) \]
      5. *-commutative92.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-neg292.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-in92.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-eval92.1%

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

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

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

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

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

    if 2.9999999999999998e-190 < t

    1. Initial program 98.9%

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

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

Alternative 5: 92.0% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq 1660000000000:\\
\;\;\;\;x + \frac{\frac{t}{z}}{y \cdot 3}\\

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(-0.3333333333333333\right)} \cdot \frac{y}{z} \]
      2. cancel-sign-sub-inv94.6%

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

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

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{z} \cdot y} \]
    9. Applied egg-rr94.5%

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{z}{0.3333333333333333}}} \]
      4. div-inv94.7%

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

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

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

    if -4.09999999999999983e26 < y < 1.66e12

    1. Initial program 92.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-neg92.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+92.0%

        \[\leadsto \color{blue}{x + \left(\left(-\frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      3. +-commutative92.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-neg92.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-neg92.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-in92.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-neg92.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-neg92.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-192.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-frac91.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-neg91.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-191.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. *-commutative91.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*91.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. *-commutative91.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. Simplified91.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.66e12 < y

    1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(-0.3333333333333333\right)} \cdot \frac{y}{z} \]
      2. cancel-sign-sub-inv92.8%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{1}{\frac{z}{0.3333333333333333 \cdot y}}} \]
      3. *-un-lft-identity92.8%

        \[\leadsto x - \frac{1}{\frac{\color{blue}{1 \cdot z}}{0.3333333333333333 \cdot y}} \]
      4. times-frac92.8%

        \[\leadsto x - \frac{1}{\color{blue}{\frac{1}{0.3333333333333333} \cdot \frac{z}{y}}} \]
      5. metadata-eval92.8%

        \[\leadsto x - \frac{1}{\color{blue}{3} \cdot \frac{z}{y}} \]
    11. Applied egg-rr92.8%

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

        \[\leadsto x - \color{blue}{\frac{\frac{1}{3}}{\frac{z}{y}}} \]
      2. metadata-eval92.9%

        \[\leadsto x - \frac{\color{blue}{0.3333333333333333}}{\frac{z}{y}} \]
    13. Simplified92.9%

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

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

Alternative 6: 91.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.9 \cdot 10^{+26}:\\
\;\;\;\;x - \frac{y}{3 \cdot z}\\

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(-0.3333333333333333\right)} \cdot \frac{y}{z} \]
      2. cancel-sign-sub-inv94.6%

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

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

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{z} \cdot y} \]
    9. Applied egg-rr94.5%

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{z}{0.3333333333333333}}} \]
      4. div-inv94.7%

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

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

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

    if -3.9e26 < y < 4.1999999999999996e22

    1. Initial program 92.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-neg92.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+92.0%

        \[\leadsto \color{blue}{x + \left(\left(-\frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      3. +-commutative92.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-neg92.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-neg92.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-in92.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-neg92.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-neg92.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-192.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-frac91.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-neg91.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-191.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. *-commutative91.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*91.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. *-commutative91.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. Simplified91.9%

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

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

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

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

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

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

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

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

    if 4.1999999999999996e22 < y

    1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(-0.3333333333333333\right)} \cdot \frac{y}{z} \]
      2. cancel-sign-sub-inv92.8%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{1}{\frac{z}{0.3333333333333333 \cdot y}}} \]
      3. *-un-lft-identity92.8%

        \[\leadsto x - \frac{1}{\frac{\color{blue}{1 \cdot z}}{0.3333333333333333 \cdot y}} \]
      4. times-frac92.8%

        \[\leadsto x - \frac{1}{\color{blue}{\frac{1}{0.3333333333333333} \cdot \frac{z}{y}}} \]
      5. metadata-eval92.8%

        \[\leadsto x - \frac{1}{\color{blue}{3} \cdot \frac{z}{y}} \]
    11. Applied egg-rr92.8%

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

        \[\leadsto x - \color{blue}{\frac{\frac{1}{3}}{\frac{z}{y}}} \]
      2. metadata-eval92.9%

        \[\leadsto x - \frac{\color{blue}{0.3333333333333333}}{\frac{z}{y}} \]
    13. Simplified92.9%

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

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

Alternative 7: 89.5% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(-0.3333333333333333\right)} \cdot \frac{y}{z} \]
      2. cancel-sign-sub-inv94.6%

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

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

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{z} \cdot y} \]
    9. Applied egg-rr94.5%

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{z}{0.3333333333333333}}} \]
      4. div-inv94.7%

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

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

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

    if -1.64999999999999997e26 < y < 7.7999999999999997e27

    1. Initial program 92.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-neg92.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+92.0%

        \[\leadsto \color{blue}{x + \left(\left(-\frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      3. +-commutative92.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-neg92.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-neg92.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-in92.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-neg92.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-neg92.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-192.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-frac91.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-neg91.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-191.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. *-commutative91.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*91.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. *-commutative91.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. Simplified91.9%

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

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

    if 7.7999999999999997e27 < y

    1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(-0.3333333333333333\right)} \cdot \frac{y}{z} \]
      2. cancel-sign-sub-inv92.8%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{1}{\frac{z}{0.3333333333333333 \cdot y}}} \]
      3. *-un-lft-identity92.8%

        \[\leadsto x - \frac{1}{\frac{\color{blue}{1 \cdot z}}{0.3333333333333333 \cdot y}} \]
      4. times-frac92.8%

        \[\leadsto x - \frac{1}{\color{blue}{\frac{1}{0.3333333333333333} \cdot \frac{z}{y}}} \]
      5. metadata-eval92.8%

        \[\leadsto x - \frac{1}{\color{blue}{3} \cdot \frac{z}{y}} \]
    11. Applied egg-rr92.8%

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

        \[\leadsto x - \color{blue}{\frac{\frac{1}{3}}{\frac{z}{y}}} \]
      2. metadata-eval92.9%

        \[\leadsto x - \frac{\color{blue}{0.3333333333333333}}{\frac{z}{y}} \]
    13. Simplified92.9%

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

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

Alternative 8: 48.3% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.9 \cdot 10^{+93} \lor \neg \left(y \leq 9.2 \cdot 10^{+97}\right):\\
\;\;\;\;\frac{y}{z} \cdot -0.3333333333333333\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.9000000000000002e93 or 9.20000000000000022e97 < y

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(-0.3333333333333333\right)} \cdot \frac{y}{z} \]
      2. cancel-sign-sub-inv96.5%

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

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

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

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

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

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

    if -3.9000000000000002e93 < y < 9.20000000000000022e97

    1. Initial program 93.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-neg93.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+93.1%

        \[\leadsto \color{blue}{x + \left(\left(-\frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      3. +-commutative93.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-neg93.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-neg93.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-in93.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-neg93.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-neg93.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-193.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-frac93.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-neg93.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-193.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. *-commutative93.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.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{1}{\frac{z}{0.3333333333333333 \cdot \color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}}} \]
      5. sqr-neg40.8%

        \[\leadsto x + \frac{1}{\frac{z}{0.3333333333333333 \cdot \sqrt{\color{blue}{y \cdot y}}}} \]
      6. sqrt-unprod18.4%

        \[\leadsto x + \frac{1}{\frac{z}{0.3333333333333333 \cdot \color{blue}{\left(\sqrt{y} \cdot \sqrt{y}\right)}}} \]
      7. add-sqr-sqrt35.9%

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{0.3333333333333333}}{z} \cdot y \]
    11. Simplified35.9%

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

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

Alternative 9: 48.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{+90} \lor \neg \left(y \leq 1.6 \cdot 10^{+98}\right):\\
\;\;\;\;\frac{y}{z} \cdot -0.3333333333333333\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.5000000000000002e90 or 1.6000000000000001e98 < y

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(-0.3333333333333333\right)} \cdot \frac{y}{z} \]
      2. cancel-sign-sub-inv96.5%

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

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

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

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

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

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

    if -8.5000000000000002e90 < y < 1.6000000000000001e98

    1. Initial program 93.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-neg93.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+93.1%

        \[\leadsto \color{blue}{x + \left(\left(-\frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      3. +-commutative93.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-neg93.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-neg93.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-in93.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-neg93.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-neg93.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-193.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-frac93.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-neg93.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-193.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. *-commutative93.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.0%

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

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

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

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

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

Alternative 10: 95.8% 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 95.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-neg95.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+95.0%

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

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

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

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

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

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

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

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

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

Alternative 11: 65.3% accurate, 2.1× speedup?

\[\begin{array}{l} \\ x - \frac{y}{3 \cdot z} \end{array} \]
(FPCore (x y z t) :precision binary64 (- x (/ y (* 3.0 z))))
double code(double x, double y, double z, double t) {
	return x - (y / (3.0 * z));
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x - (y / (3.0d0 * z))
end function
public static double code(double x, double y, double z, double t) {
	return x - (y / (3.0 * z));
}
def code(x, y, z, t):
	return x - (y / (3.0 * z))
function code(x, y, z, t)
	return Float64(x - Float64(y / Float64(3.0 * z)))
end
function tmp = code(x, y, z, t)
	tmp = x - (y / (3.0 * z));
end
code[x_, y_, z_, t_] := N[(x - N[(y / N[(3.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x - \frac{y}{3 \cdot z}
\end{array}
Derivation
  1. Initial program 95.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-neg95.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+95.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\left(-0.3333333333333333\right)} \cdot \frac{y}{z} \]
    2. cancel-sign-sub-inv62.2%

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

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

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

      \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{z} \cdot y} \]
  9. Applied egg-rr62.2%

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

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

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

      \[\leadsto x - \color{blue}{\frac{y}{\frac{z}{0.3333333333333333}}} \]
    4. div-inv62.2%

      \[\leadsto x - \frac{y}{\color{blue}{z \cdot \frac{1}{0.3333333333333333}}} \]
    5. metadata-eval62.2%

      \[\leadsto x - \frac{y}{z \cdot \color{blue}{3}} \]
  11. Applied egg-rr62.2%

    \[\leadsto x - \color{blue}{\frac{y}{z \cdot 3}} \]
  12. Final simplification62.2%

    \[\leadsto x - \frac{y}{3 \cdot z} \]
  13. Add Preprocessing

Alternative 12: 65.2% accurate, 2.1× speedup?

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

\\
x - \frac{0.3333333333333333}{\frac{z}{y}}
\end{array}
Derivation
  1. Initial program 95.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-neg95.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+95.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\left(-0.3333333333333333\right)} \cdot \frac{y}{z} \]
    2. cancel-sign-sub-inv62.2%

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

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

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

      \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{z} \cdot y} \]
  9. Applied egg-rr62.2%

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

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

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

      \[\leadsto x - \frac{1}{\frac{\color{blue}{1 \cdot z}}{0.3333333333333333 \cdot y}} \]
    4. times-frac62.2%

      \[\leadsto x - \frac{1}{\color{blue}{\frac{1}{0.3333333333333333} \cdot \frac{z}{y}}} \]
    5. metadata-eval62.2%

      \[\leadsto x - \frac{1}{\color{blue}{3} \cdot \frac{z}{y}} \]
  11. Applied egg-rr62.2%

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

      \[\leadsto x - \color{blue}{\frac{\frac{1}{3}}{\frac{z}{y}}} \]
    2. metadata-eval62.2%

      \[\leadsto x - \frac{\color{blue}{0.3333333333333333}}{\frac{z}{y}} \]
  13. Simplified62.2%

    \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{\frac{z}{y}}} \]
  14. Add Preprocessing

Alternative 13: 65.2% accurate, 2.1× speedup?

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

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

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

    \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
  4. Add Preprocessing

Alternative 14: 30.9% 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 95.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-neg95.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+95.0%

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Add Preprocessing

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

  :alt
  (! :herbie-platform default (+ (- x (/ y (* z 3))) (/ (/ t (* z 3)) y)))

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