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

Percentage Accurate: 95.5% → 97.9%
Time: 12.8s
Alternatives: 22
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 22 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: 97.9% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 98.2%

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

    if -5e8 < (*.f64 z #s(literal 3 binary64))

    1. Initial program 91.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 97.9% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 98.2%

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

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

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

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

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

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

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

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

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

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

    if -5e8 < (*.f64 z #s(literal 3 binary64))

    1. Initial program 91.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 93.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1050000000 \lor \neg \left(y \leq 900000000000\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.05e9 or 9e11 < y

    1. Initial program 98.1%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(-\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} + \frac{y}{z \cdot 3}\right)\right)} \]
      9. remove-double-neg98.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) \]
      10. sub-neg98.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) \]
      11. neg-mul-198.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) \]
      12. times-frac99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \frac{\color{blue}{-1 \cdot y}}{z \cdot 3} \]
    8. Step-by-step derivation
      1. neg-mul-194.0%

        \[\leadsto x + \frac{\color{blue}{-y}}{z \cdot 3} \]
    9. Simplified94.0%

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

    if -1.05e9 < y < 9e11

    1. Initial program 89.3%

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

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

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

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

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

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

        \[\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) \]
      7. distribute-frac-neg89.3%

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

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

        \[\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) \]
      10. sub-neg89.3%

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

        \[\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) \]
      12. times-frac93.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) \]
      13. distribute-frac-neg93.8%

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

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

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

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

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

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

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

Alternative 4: 90.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -850 \lor \neg \left(y \leq 410000000\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -850 or 4.1e8 < y

    1. Initial program 98.1%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(-\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} + \frac{y}{z \cdot 3}\right)\right)} \]
      9. remove-double-neg98.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) \]
      10. sub-neg98.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) \]
      11. neg-mul-198.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) \]
      12. times-frac99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \frac{\color{blue}{-1 \cdot y}}{z \cdot 3} \]
    8. Step-by-step derivation
      1. neg-mul-194.0%

        \[\leadsto x + \frac{\color{blue}{-y}}{z \cdot 3} \]
    9. Simplified94.0%

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

    if -850 < y < 4.1e8

    1. Initial program 89.3%

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

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

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

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

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

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

        \[\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) \]
      7. distribute-frac-neg89.3%

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

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

        \[\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) \]
      10. sub-neg89.3%

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

        \[\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) \]
      12. times-frac93.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) \]
      13. distribute-frac-neg93.8%

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

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

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

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

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

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

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

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

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

Alternative 5: 89.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -28 \lor \neg \left(y \leq 42000000\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -28 or 4.2e7 < y

    1. Initial program 98.1%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(-\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} + \frac{y}{z \cdot 3}\right)\right)} \]
      9. remove-double-neg98.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) \]
      10. sub-neg98.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) \]
      11. neg-mul-198.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) \]
      12. times-frac99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \frac{\color{blue}{-1 \cdot y}}{z \cdot 3} \]
    8. Step-by-step derivation
      1. neg-mul-194.0%

        \[\leadsto x + \frac{\color{blue}{-y}}{z \cdot 3} \]
    9. Simplified94.0%

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

    if -28 < y < 4.2e7

    1. Initial program 89.3%

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

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

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

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

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

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

        \[\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) \]
      7. distribute-frac-neg89.3%

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

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

        \[\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) \]
      10. sub-neg89.3%

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

        \[\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) \]
      12. times-frac93.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) \]
      13. distribute-frac-neg93.8%

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

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

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

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

Alternative 6: 90.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -240000000000 \lor \neg \left(y \leq 14500000000000\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.4e11 or 1.45e13 < y

    1. Initial program 98.1%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(-\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} + \frac{y}{z \cdot 3}\right)\right)} \]
      9. remove-double-neg98.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) \]
      10. sub-neg98.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) \]
      11. neg-mul-198.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) \]
      12. times-frac99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \frac{\color{blue}{-1 \cdot y}}{z \cdot 3} \]
    8. Step-by-step derivation
      1. neg-mul-194.0%

        \[\leadsto x + \frac{\color{blue}{-y}}{z \cdot 3} \]
    9. Simplified94.0%

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

    if -2.4e11 < y < 1.45e13

    1. Initial program 89.3%

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

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

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

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

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

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

        \[\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) \]
      7. distribute-frac-neg89.3%

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

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

        \[\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) \]
      10. sub-neg89.3%

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

        \[\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) \]
      12. times-frac93.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) \]
      13. distribute-frac-neg93.8%

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

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

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

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

Alternative 7: 78.7% accurate, 0.8× speedup?

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

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

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

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


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

    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. +-commutative93.1%

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

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

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

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

        \[\leadsto x + \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(-\frac{y}{z \cdot 3}\right)\right)} \]
      6. 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) \]
      7. 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) \]
      8. 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)} \]
      9. 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) \]
      10. 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) \]
      11. 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) \]
      12. times-frac93.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) \]
      13. distribute-frac-neg93.2%

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{\frac{-y}{z \cdot 3}}\right)\right) \]
      14. neg-mul-193.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) \]
      15. *-commutative93.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) \]
      16. associate-/l*93.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) \]
      17. *-commutative93.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. Simplified93.1%

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

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

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

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

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

    if -6.4999999999999995e169 < x < 8.19999999999999989e66

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(y, -0.3333333333333333, 0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{y}{t}}}\right) \cdot 1}{z} \]
      6. un-div-inv84.9%

        \[\leadsto \frac{\mathsf{fma}\left(y, -0.3333333333333333, \color{blue}{\frac{0.3333333333333333}{\frac{y}{t}}}\right) \cdot 1}{z} \]
    7. Applied egg-rr84.9%

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, \frac{0.3333333333333333}{\frac{y}{t}}\right) \cdot 1}}{z} \]
    8. Step-by-step derivation
      1. *-rgt-identity84.9%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, \frac{0.3333333333333333}{\frac{y}{t}}\right)}}{z} \]
      2. fma-undefine84.9%

        \[\leadsto \frac{\color{blue}{y \cdot -0.3333333333333333 + \frac{0.3333333333333333}{\frac{y}{t}}}}{z} \]
      3. +-commutative84.9%

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

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333}{y} \cdot t} + y \cdot -0.3333333333333333}{z} \]
      5. metadata-eval84.8%

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

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

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

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

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

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

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{-0.3333333333333333 \cdot y}}{z} \]
      12. metadata-eval84.8%

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

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{\left(-0.3333333333333333 \cdot y\right)}}{z} \]
      14. distribute-rgt-neg-in84.8%

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{0.3333333333333333 \cdot \left(-y\right)}}{z} \]
      15. distribute-lft-in84.8%

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y} + \left(-y\right)\right)}}{z} \]
      16. sub-neg84.8%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{z} \cdot -0.3333333333333333} + 0.3333333333333333 \cdot \frac{t}{y \cdot z} \]
      2. *-lft-identity80.8%

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{z} \cdot \left(-0.3333333333333333 \cdot y\right) + \color{blue}{\frac{1}{z} \cdot \left(0.3333333333333333 \cdot \frac{t}{y}\right)} \]
      10. distribute-lft-in84.8%

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

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

        \[\leadsto \frac{1}{z} \cdot \left(0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{\left(-0.3333333333333333\right)} \cdot y\right) \]
      13. distribute-lft-neg-in84.8%

        \[\leadsto \frac{1}{z} \cdot \left(0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{\left(-0.3333333333333333 \cdot y\right)}\right) \]
      14. distribute-rgt-neg-out84.8%

        \[\leadsto \frac{1}{z} \cdot \left(0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{0.3333333333333333 \cdot \left(-y\right)}\right) \]
      15. distribute-lft-out84.8%

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

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

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

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

        \[\leadsto \frac{\color{blue}{0.3333333333333333}}{z} \cdot \left(\frac{t}{y} - y\right) \]
    12. Simplified84.9%

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

    if 8.19999999999999989e66 < x

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \frac{\color{blue}{-1 \cdot y}}{z \cdot 3} \]
    8. Step-by-step derivation
      1. neg-mul-180.2%

        \[\leadsto x + \frac{\color{blue}{-y}}{z \cdot 3} \]
    9. Simplified80.2%

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

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

Alternative 8: 77.5% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{-152} \lor \neg \left(y \leq 2000000\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.39999999999999984e-152 or 2e6 < y

    1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \frac{\color{blue}{-1 \cdot y}}{z \cdot 3} \]
    8. Step-by-step derivation
      1. neg-mul-186.7%

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

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

    if -3.39999999999999984e-152 < y < 2e6

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{t}{y}}{3 \cdot z}} \]
      7. *-un-lft-identity66.2%

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

        \[\leadsto \color{blue}{\frac{\frac{\frac{t}{y}}{z}}{3}} \]
      9. div-inv66.1%

        \[\leadsto \color{blue}{\frac{\frac{t}{y}}{z} \cdot \frac{1}{3}} \]
      10. metadata-eval66.1%

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

        \[\leadsto \color{blue}{\frac{t}{z \cdot y}} \cdot 0.3333333333333333 \]
    10. Applied egg-rr62.8%

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

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

        \[\leadsto \color{blue}{\frac{\frac{t}{z} \cdot 0.3333333333333333}{y}} \]
    12. Applied egg-rr69.9%

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

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

Alternative 9: 77.4% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{-152} \lor \neg \left(y \leq 2000000\right):\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.0999999999999998e-152 or 2e6 < y

    1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.0999999999999998e-152 < y < 2e6

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{z} \cdot \frac{0.3333333333333333}{y}} \]
    10. Applied egg-rr69.8%

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

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

Alternative 10: 77.5% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;y \leq 2000000:\\
\;\;\;\;\frac{0.3333333333333333 \cdot \frac{t}{z}}{y}\\

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


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

    1. Initial program 96.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(-\left(\frac{\color{blue}{-1 \cdot t}}{\left(z \cdot 3\right) \cdot y} - \left(-\frac{y}{z \cdot 3}\right)\right)\right) \]
      12. times-frac99.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) \]
      13. distribute-frac-neg99.7%

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

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

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

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

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

    if -3.39999999999999984e-152 < y < 2e6

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{t}{y}}{3 \cdot z}} \]
      7. *-un-lft-identity66.2%

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

        \[\leadsto \color{blue}{\frac{\frac{\frac{t}{y}}{z}}{3}} \]
      9. div-inv66.1%

        \[\leadsto \color{blue}{\frac{\frac{t}{y}}{z} \cdot \frac{1}{3}} \]
      10. metadata-eval66.1%

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

        \[\leadsto \color{blue}{\frac{t}{z \cdot y}} \cdot 0.3333333333333333 \]
    10. Applied egg-rr62.8%

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

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

        \[\leadsto \color{blue}{\frac{\frac{t}{z} \cdot 0.3333333333333333}{y}} \]
    12. Applied egg-rr69.9%

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

    if 2e6 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 77.4% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;y \leq 12500000000:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\

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


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

    1. Initial program 96.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(-\left(\frac{\color{blue}{-1 \cdot t}}{\left(z \cdot 3\right) \cdot y} - \left(-\frac{y}{z \cdot 3}\right)\right)\right) \]
      12. times-frac99.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) \]
      13. distribute-frac-neg99.7%

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

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

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

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

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

    if -3.39999999999999984e-152 < y < 1.25e10

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{z} \cdot \frac{0.3333333333333333}{y}} \]
    10. Applied egg-rr69.8%

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

    if 1.25e10 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 77.5% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;y \leq 2000000:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\

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


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

    1. Initial program 96.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(-\left(\frac{\color{blue}{-1 \cdot t}}{\left(z \cdot 3\right) \cdot y} - \left(-\frac{y}{z \cdot 3}\right)\right)\right) \]
      12. times-frac99.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) \]
      13. distribute-frac-neg99.7%

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

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

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

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

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

    if -3.39999999999999984e-152 < y < 2e6

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{z} \cdot \frac{0.3333333333333333}{y}} \]
    10. Applied egg-rr69.8%

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

    if 2e6 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 63.9% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+16}:\\
\;\;\;\;-0.3333333333333333 \cdot \left(y \cdot \frac{1}{z}\right)\\

\mathbf{elif}\;y \leq 460000000:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\

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


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

    1. Initial program 96.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, 0.3333333333333333 \cdot \frac{t}{y}\right)} \cdot 1}{z} \]
      5. clear-num77.2%

        \[\leadsto \frac{\mathsf{fma}\left(y, -0.3333333333333333, 0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{y}{t}}}\right) \cdot 1}{z} \]
      6. un-div-inv77.2%

        \[\leadsto \frac{\mathsf{fma}\left(y, -0.3333333333333333, \color{blue}{\frac{0.3333333333333333}{\frac{y}{t}}}\right) \cdot 1}{z} \]
    7. Applied egg-rr77.2%

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, \frac{0.3333333333333333}{\frac{y}{t}}\right) \cdot 1}}{z} \]
    8. Step-by-step derivation
      1. *-rgt-identity77.2%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, \frac{0.3333333333333333}{\frac{y}{t}}\right)}}{z} \]
      2. fma-undefine77.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{-0.3333333333333333 \cdot y}}{z} \]
      12. metadata-eval77.2%

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

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

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{0.3333333333333333 \cdot \left(-y\right)}}{z} \]
      15. distribute-lft-in77.1%

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y} + \left(-y\right)\right)}}{z} \]
      16. sub-neg77.1%

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    11. Step-by-step derivation
      1. div-inv68.7%

        \[\leadsto -0.3333333333333333 \cdot \color{blue}{\left(y \cdot \frac{1}{z}\right)} \]
    12. Applied egg-rr68.7%

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

    if -1.3e16 < y < 4.6e8

    1. Initial program 89.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{t \cdot 0.3333333333333333}}{z \cdot y} \]
      3. times-frac65.1%

        \[\leadsto \color{blue}{\frac{t}{z} \cdot \frac{0.3333333333333333}{y}} \]
    10. Applied egg-rr65.1%

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

    if 4.6e8 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, 0.3333333333333333 \cdot \frac{t}{y}\right)} \cdot 1}{z} \]
      5. clear-num72.9%

        \[\leadsto \frac{\mathsf{fma}\left(y, -0.3333333333333333, 0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{y}{t}}}\right) \cdot 1}{z} \]
      6. un-div-inv72.9%

        \[\leadsto \frac{\mathsf{fma}\left(y, -0.3333333333333333, \color{blue}{\frac{0.3333333333333333}{\frac{y}{t}}}\right) \cdot 1}{z} \]
    7. Applied egg-rr72.9%

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, \frac{0.3333333333333333}{\frac{y}{t}}\right) \cdot 1}}{z} \]
    8. Step-by-step derivation
      1. *-rgt-identity72.9%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, \frac{0.3333333333333333}{\frac{y}{t}}\right)}}{z} \]
      2. fma-undefine72.9%

        \[\leadsto \frac{\color{blue}{y \cdot -0.3333333333333333 + \frac{0.3333333333333333}{\frac{y}{t}}}}{z} \]
      3. +-commutative72.9%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{-0.3333333333333333 \cdot y}}{z} \]
      12. metadata-eval72.9%

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

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{\left(-0.3333333333333333 \cdot y\right)}}{z} \]
      14. distribute-rgt-neg-in72.9%

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{0.3333333333333333 \cdot \left(-y\right)}}{z} \]
      15. distribute-lft-in72.9%

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y} + \left(-y\right)\right)}}{z} \]
      16. sub-neg72.9%

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

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

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

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

Alternative 14: 61.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -114:\\ \;\;\;\;-0.3333333333333333 \cdot \left(y \cdot \frac{1}{z}\right)\\ \mathbf{elif}\;y \leq 6000000:\\ \;\;\;\;\frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -114.0)
   (* -0.3333333333333333 (* y (/ 1.0 z)))
   (if (<= y 6000000.0)
     (* (/ t y) (/ 0.3333333333333333 z))
     (/ (* y -0.3333333333333333) z))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -114.0) {
		tmp = -0.3333333333333333 * (y * (1.0 / z));
	} else if (y <= 6000000.0) {
		tmp = (t / y) * (0.3333333333333333 / z);
	} else {
		tmp = (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 <= (-114.0d0)) then
        tmp = (-0.3333333333333333d0) * (y * (1.0d0 / z))
    else if (y <= 6000000.0d0) then
        tmp = (t / y) * (0.3333333333333333d0 / z)
    else
        tmp = (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 <= -114.0) {
		tmp = -0.3333333333333333 * (y * (1.0 / z));
	} else if (y <= 6000000.0) {
		tmp = (t / y) * (0.3333333333333333 / z);
	} else {
		tmp = (y * -0.3333333333333333) / z;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -114.0:
		tmp = -0.3333333333333333 * (y * (1.0 / z))
	elif y <= 6000000.0:
		tmp = (t / y) * (0.3333333333333333 / z)
	else:
		tmp = (y * -0.3333333333333333) / z
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -114.0)
		tmp = Float64(-0.3333333333333333 * Float64(y * Float64(1.0 / z)));
	elseif (y <= 6000000.0)
		tmp = Float64(Float64(t / y) * Float64(0.3333333333333333 / z));
	else
		tmp = Float64(Float64(y * -0.3333333333333333) / z);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -114.0)
		tmp = -0.3333333333333333 * (y * (1.0 / z));
	elseif (y <= 6000000.0)
		tmp = (t / y) * (0.3333333333333333 / z);
	else
		tmp = (y * -0.3333333333333333) / z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, -114.0], N[(-0.3333333333333333 * N[(y * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6000000.0], N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -114:\\
\;\;\;\;-0.3333333333333333 \cdot \left(y \cdot \frac{1}{z}\right)\\

\mathbf{elif}\;y \leq 6000000:\\
\;\;\;\;\frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\

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


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

    1. Initial program 96.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, 0.3333333333333333 \cdot \frac{t}{y}\right)} \cdot 1}{z} \]
      5. clear-num77.2%

        \[\leadsto \frac{\mathsf{fma}\left(y, -0.3333333333333333, 0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{y}{t}}}\right) \cdot 1}{z} \]
      6. un-div-inv77.2%

        \[\leadsto \frac{\mathsf{fma}\left(y, -0.3333333333333333, \color{blue}{\frac{0.3333333333333333}{\frac{y}{t}}}\right) \cdot 1}{z} \]
    7. Applied egg-rr77.2%

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, \frac{0.3333333333333333}{\frac{y}{t}}\right) \cdot 1}}{z} \]
    8. Step-by-step derivation
      1. *-rgt-identity77.2%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, \frac{0.3333333333333333}{\frac{y}{t}}\right)}}{z} \]
      2. fma-undefine77.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{-0.3333333333333333 \cdot y}}{z} \]
      12. metadata-eval77.2%

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

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

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{0.3333333333333333 \cdot \left(-y\right)}}{z} \]
      15. distribute-lft-in77.1%

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y} + \left(-y\right)\right)}}{z} \]
      16. sub-neg77.1%

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    11. Step-by-step derivation
      1. div-inv68.7%

        \[\leadsto -0.3333333333333333 \cdot \color{blue}{\left(y \cdot \frac{1}{z}\right)} \]
    12. Applied egg-rr68.7%

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

    if -114 < y < 6e6

    1. Initial program 89.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{z} \cdot \frac{t}{y}} \]
    10. Applied egg-rr62.7%

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

    if 6e6 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, 0.3333333333333333 \cdot \frac{t}{y}\right)} \cdot 1}{z} \]
      5. clear-num72.9%

        \[\leadsto \frac{\mathsf{fma}\left(y, -0.3333333333333333, 0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{y}{t}}}\right) \cdot 1}{z} \]
      6. un-div-inv72.9%

        \[\leadsto \frac{\mathsf{fma}\left(y, -0.3333333333333333, \color{blue}{\frac{0.3333333333333333}{\frac{y}{t}}}\right) \cdot 1}{z} \]
    7. Applied egg-rr72.9%

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, \frac{0.3333333333333333}{\frac{y}{t}}\right) \cdot 1}}{z} \]
    8. Step-by-step derivation
      1. *-rgt-identity72.9%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, \frac{0.3333333333333333}{\frac{y}{t}}\right)}}{z} \]
      2. fma-undefine72.9%

        \[\leadsto \frac{\color{blue}{y \cdot -0.3333333333333333 + \frac{0.3333333333333333}{\frac{y}{t}}}}{z} \]
      3. +-commutative72.9%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{-0.3333333333333333 \cdot y}}{z} \]
      12. metadata-eval72.9%

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

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{\left(-0.3333333333333333 \cdot y\right)}}{z} \]
      14. distribute-rgt-neg-in72.9%

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{0.3333333333333333 \cdot \left(-y\right)}}{z} \]
      15. distribute-lft-in72.9%

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y} + \left(-y\right)\right)}}{z} \]
      16. sub-neg72.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -114:\\ \;\;\;\;-0.3333333333333333 \cdot \left(y \cdot \frac{1}{z}\right)\\ \mathbf{elif}\;y \leq 6000000:\\ \;\;\;\;\frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 61.7% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -180:\\ \;\;\;\;-0.3333333333333333 \cdot \left(y \cdot \frac{1}{z}\right)\\ \mathbf{elif}\;y \leq 5400000:\\ \;\;\;\;t \cdot \frac{\frac{0.3333333333333333}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -180.0)
   (* -0.3333333333333333 (* y (/ 1.0 z)))
   (if (<= y 5400000.0)
     (* t (/ (/ 0.3333333333333333 z) y))
     (/ (* y -0.3333333333333333) z))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -180.0) {
		tmp = -0.3333333333333333 * (y * (1.0 / z));
	} else if (y <= 5400000.0) {
		tmp = t * ((0.3333333333333333 / z) / y);
	} else {
		tmp = (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 <= (-180.0d0)) then
        tmp = (-0.3333333333333333d0) * (y * (1.0d0 / z))
    else if (y <= 5400000.0d0) then
        tmp = t * ((0.3333333333333333d0 / z) / y)
    else
        tmp = (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 <= -180.0) {
		tmp = -0.3333333333333333 * (y * (1.0 / z));
	} else if (y <= 5400000.0) {
		tmp = t * ((0.3333333333333333 / z) / y);
	} else {
		tmp = (y * -0.3333333333333333) / z;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -180.0:
		tmp = -0.3333333333333333 * (y * (1.0 / z))
	elif y <= 5400000.0:
		tmp = t * ((0.3333333333333333 / z) / y)
	else:
		tmp = (y * -0.3333333333333333) / z
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -180.0)
		tmp = Float64(-0.3333333333333333 * Float64(y * Float64(1.0 / z)));
	elseif (y <= 5400000.0)
		tmp = Float64(t * Float64(Float64(0.3333333333333333 / z) / y));
	else
		tmp = Float64(Float64(y * -0.3333333333333333) / z);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -180.0)
		tmp = -0.3333333333333333 * (y * (1.0 / z));
	elseif (y <= 5400000.0)
		tmp = t * ((0.3333333333333333 / z) / y);
	else
		tmp = (y * -0.3333333333333333) / z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, -180.0], N[(-0.3333333333333333 * N[(y * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5400000.0], N[(t * N[(N[(0.3333333333333333 / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -180:\\
\;\;\;\;-0.3333333333333333 \cdot \left(y \cdot \frac{1}{z}\right)\\

\mathbf{elif}\;y \leq 5400000:\\
\;\;\;\;t \cdot \frac{\frac{0.3333333333333333}{z}}{y}\\

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


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

    1. Initial program 96.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, 0.3333333333333333 \cdot \frac{t}{y}\right)} \cdot 1}{z} \]
      5. clear-num77.2%

        \[\leadsto \frac{\mathsf{fma}\left(y, -0.3333333333333333, 0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{y}{t}}}\right) \cdot 1}{z} \]
      6. un-div-inv77.2%

        \[\leadsto \frac{\mathsf{fma}\left(y, -0.3333333333333333, \color{blue}{\frac{0.3333333333333333}{\frac{y}{t}}}\right) \cdot 1}{z} \]
    7. Applied egg-rr77.2%

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, \frac{0.3333333333333333}{\frac{y}{t}}\right) \cdot 1}}{z} \]
    8. Step-by-step derivation
      1. *-rgt-identity77.2%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, \frac{0.3333333333333333}{\frac{y}{t}}\right)}}{z} \]
      2. fma-undefine77.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{-0.3333333333333333 \cdot y}}{z} \]
      12. metadata-eval77.2%

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

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

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{0.3333333333333333 \cdot \left(-y\right)}}{z} \]
      15. distribute-lft-in77.1%

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y} + \left(-y\right)\right)}}{z} \]
      16. sub-neg77.1%

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    11. Step-by-step derivation
      1. div-inv68.7%

        \[\leadsto -0.3333333333333333 \cdot \color{blue}{\left(y \cdot \frac{1}{z}\right)} \]
    12. Applied egg-rr68.7%

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

    if -180 < y < 5.4e6

    1. Initial program 89.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(\color{blue}{y \cdot -0.3333333333333333} + 0.3333333333333333 \cdot \frac{t}{y}\right) \cdot 1}{z} \]
      4. fma-define66.6%

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

        \[\leadsto \frac{\mathsf{fma}\left(y, -0.3333333333333333, 0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{y}{t}}}\right) \cdot 1}{z} \]
      6. un-div-inv66.7%

        \[\leadsto \frac{\mathsf{fma}\left(y, -0.3333333333333333, \color{blue}{\frac{0.3333333333333333}{\frac{y}{t}}}\right) \cdot 1}{z} \]
    7. Applied egg-rr66.7%

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, \frac{0.3333333333333333}{\frac{y}{t}}\right) \cdot 1}}{z} \]
    8. Step-by-step derivation
      1. *-rgt-identity66.7%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, \frac{0.3333333333333333}{\frac{y}{t}}\right)}}{z} \]
      2. fma-undefine66.7%

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

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

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333}{y} \cdot t} + y \cdot -0.3333333333333333}{z} \]
      5. metadata-eval66.6%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \frac{t}{y}} + y \cdot -0.3333333333333333}{z} \]
      11. *-commutative66.6%

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{-0.3333333333333333 \cdot y}}{z} \]
      12. metadata-eval66.6%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{z} \cdot -0.3333333333333333} + 0.3333333333333333 \cdot \frac{t}{y \cdot z} \]
      2. *-lft-identity64.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{z} \cdot \color{blue}{\left(0.3333333333333333 \cdot \frac{t}{y} + -0.3333333333333333 \cdot y\right)} \]
      12. metadata-eval66.6%

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

        \[\leadsto \frac{1}{z} \cdot \left(0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{\left(-0.3333333333333333 \cdot y\right)}\right) \]
      14. distribute-rgt-neg-out66.6%

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

        \[\leadsto \frac{1}{z} \cdot \color{blue}{\left(0.3333333333333333 \cdot \left(\frac{t}{y} + \left(-y\right)\right)\right)} \]
      16. sub-neg66.6%

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

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

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

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

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

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

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

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

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

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

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

    if 5.4e6 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, 0.3333333333333333 \cdot \frac{t}{y}\right)} \cdot 1}{z} \]
      5. clear-num72.9%

        \[\leadsto \frac{\mathsf{fma}\left(y, -0.3333333333333333, 0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{y}{t}}}\right) \cdot 1}{z} \]
      6. un-div-inv72.9%

        \[\leadsto \frac{\mathsf{fma}\left(y, -0.3333333333333333, \color{blue}{\frac{0.3333333333333333}{\frac{y}{t}}}\right) \cdot 1}{z} \]
    7. Applied egg-rr72.9%

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, \frac{0.3333333333333333}{\frac{y}{t}}\right) \cdot 1}}{z} \]
    8. Step-by-step derivation
      1. *-rgt-identity72.9%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, \frac{0.3333333333333333}{\frac{y}{t}}\right)}}{z} \]
      2. fma-undefine72.9%

        \[\leadsto \frac{\color{blue}{y \cdot -0.3333333333333333 + \frac{0.3333333333333333}{\frac{y}{t}}}}{z} \]
      3. +-commutative72.9%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{-0.3333333333333333 \cdot y}}{z} \]
      12. metadata-eval72.9%

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

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{\left(-0.3333333333333333 \cdot y\right)}}{z} \]
      14. distribute-rgt-neg-in72.9%

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{0.3333333333333333 \cdot \left(-y\right)}}{z} \]
      15. distribute-lft-in72.9%

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y} + \left(-y\right)\right)}}{z} \]
      16. sub-neg72.9%

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

      \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}}{z} \]
    10. Taylor expanded in t around 0 70.3%

      \[\leadsto \frac{\color{blue}{-0.3333333333333333 \cdot y}}{z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification63.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -180:\\ \;\;\;\;-0.3333333333333333 \cdot \left(y \cdot \frac{1}{z}\right)\\ \mathbf{elif}\;y \leq 5400000:\\ \;\;\;\;t \cdot \frac{\frac{0.3333333333333333}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 48.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.5 \cdot 10^{+81}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 7.2 \cdot 10^{+61}:\\ \;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= x -1.5e+81) x (if (<= x 7.2e+61) (/ (* y -0.3333333333333333) z) x)))
double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -1.5e+81) {
		tmp = x;
	} else if (x <= 7.2e+61) {
		tmp = (y * -0.3333333333333333) / z;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (x <= (-1.5d+81)) then
        tmp = x
    else if (x <= 7.2d+61) then
        tmp = (y * (-0.3333333333333333d0)) / z
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -1.5e+81) {
		tmp = x;
	} else if (x <= 7.2e+61) {
		tmp = (y * -0.3333333333333333) / z;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if x <= -1.5e+81:
		tmp = x
	elif x <= 7.2e+61:
		tmp = (y * -0.3333333333333333) / z
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (x <= -1.5e+81)
		tmp = x;
	elseif (x <= 7.2e+61)
		tmp = Float64(Float64(y * -0.3333333333333333) / z);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (x <= -1.5e+81)
		tmp = x;
	elseif (x <= 7.2e+61)
		tmp = (y * -0.3333333333333333) / z;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.5e+81], x, If[LessEqual[x, 7.2e+61], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.5 \cdot 10^{+81}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 7.2 \cdot 10^{+61}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.49999999999999999e81 or 7.20000000000000021e61 < x

    1. Initial program 93.9%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Step-by-step derivation
      1. +-commutative93.9%

        \[\leadsto \color{blue}{\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(x - \frac{y}{z \cdot 3}\right)} \]
      2. associate-+r-93.9%

        \[\leadsto \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + x\right) - \frac{y}{z \cdot 3}} \]
      3. +-commutative93.9%

        \[\leadsto \color{blue}{\left(x + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} - \frac{y}{z \cdot 3} \]
      4. associate--l+93.9%

        \[\leadsto \color{blue}{x + \left(\frac{t}{\left(z \cdot 3\right) \cdot y} - \frac{y}{z \cdot 3}\right)} \]
      5. sub-neg93.9%

        \[\leadsto x + \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(-\frac{y}{z \cdot 3}\right)\right)} \]
      6. remove-double-neg93.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) \]
      7. distribute-frac-neg93.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) \]
      8. distribute-neg-in93.9%

        \[\leadsto x + \color{blue}{\left(-\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} + \frac{y}{z \cdot 3}\right)\right)} \]
      9. remove-double-neg93.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) \]
      10. sub-neg93.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) \]
      11. neg-mul-193.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) \]
      12. times-frac96.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) \]
      13. distribute-frac-neg96.0%

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{\frac{-y}{z \cdot 3}}\right)\right) \]
      14. neg-mul-196.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) \]
      15. *-commutative96.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) \]
      16. associate-/l*96.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) \]
      17. *-commutative96.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. Simplified95.9%

      \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 57.7%

      \[\leadsto \color{blue}{x} \]

    if -1.49999999999999999e81 < x < 7.20000000000000021e61

    1. Initial program 92.8%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Step-by-step derivation
      1. +-commutative92.8%

        \[\leadsto \color{blue}{\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(x - \frac{y}{z \cdot 3}\right)} \]
      2. associate-+r-92.8%

        \[\leadsto \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + x\right) - \frac{y}{z \cdot 3}} \]
      3. sub-neg92.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*92.8%

        \[\leadsto \left(\frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}} + x\right) + \left(-\frac{y}{z \cdot 3}\right) \]
      5. *-commutative92.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-neg292.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-in92.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-eval92.8%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot \color{blue}{-3}} \]
    3. Simplified92.8%

      \[\leadsto \color{blue}{\left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot -3}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 88.0%

      \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot y + 0.3333333333333333 \cdot \frac{t}{y}}{z}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity88.0%

        \[\leadsto \frac{\color{blue}{1 \cdot \left(-0.3333333333333333 \cdot y + 0.3333333333333333 \cdot \frac{t}{y}\right)}}{z} \]
      2. *-commutative88.0%

        \[\leadsto \frac{\color{blue}{\left(-0.3333333333333333 \cdot y + 0.3333333333333333 \cdot \frac{t}{y}\right) \cdot 1}}{z} \]
      3. *-commutative88.0%

        \[\leadsto \frac{\left(\color{blue}{y \cdot -0.3333333333333333} + 0.3333333333333333 \cdot \frac{t}{y}\right) \cdot 1}{z} \]
      4. fma-define88.0%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, 0.3333333333333333 \cdot \frac{t}{y}\right)} \cdot 1}{z} \]
      5. clear-num87.9%

        \[\leadsto \frac{\mathsf{fma}\left(y, -0.3333333333333333, 0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{y}{t}}}\right) \cdot 1}{z} \]
      6. un-div-inv88.0%

        \[\leadsto \frac{\mathsf{fma}\left(y, -0.3333333333333333, \color{blue}{\frac{0.3333333333333333}{\frac{y}{t}}}\right) \cdot 1}{z} \]
    7. Applied egg-rr88.0%

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, \frac{0.3333333333333333}{\frac{y}{t}}\right) \cdot 1}}{z} \]
    8. Step-by-step derivation
      1. *-rgt-identity88.0%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, \frac{0.3333333333333333}{\frac{y}{t}}\right)}}{z} \]
      2. fma-undefine88.0%

        \[\leadsto \frac{\color{blue}{y \cdot -0.3333333333333333 + \frac{0.3333333333333333}{\frac{y}{t}}}}{z} \]
      3. +-commutative88.0%

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333}{\frac{y}{t}} + y \cdot -0.3333333333333333}}{z} \]
      4. associate-/r/88.0%

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333}{y} \cdot t} + y \cdot -0.3333333333333333}{z} \]
      5. metadata-eval88.0%

        \[\leadsto \frac{\frac{\color{blue}{0.3333333333333333 \cdot 1}}{y} \cdot t + y \cdot -0.3333333333333333}{z} \]
      6. associate-*r/88.0%

        \[\leadsto \frac{\color{blue}{\left(0.3333333333333333 \cdot \frac{1}{y}\right)} \cdot t + y \cdot -0.3333333333333333}{z} \]
      7. associate-*r/88.0%

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333 \cdot 1}{y}} \cdot t + y \cdot -0.3333333333333333}{z} \]
      8. metadata-eval88.0%

        \[\leadsto \frac{\frac{\color{blue}{0.3333333333333333}}{y} \cdot t + y \cdot -0.3333333333333333}{z} \]
      9. associate-*l/88.0%

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333 \cdot t}{y}} + y \cdot -0.3333333333333333}{z} \]
      10. associate-*r/88.0%

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \frac{t}{y}} + y \cdot -0.3333333333333333}{z} \]
      11. *-commutative88.0%

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{-0.3333333333333333 \cdot y}}{z} \]
      12. metadata-eval88.0%

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{\left(-0.3333333333333333\right)} \cdot y}{z} \]
      13. distribute-lft-neg-in88.0%

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{\left(-0.3333333333333333 \cdot y\right)}}{z} \]
      14. distribute-rgt-neg-in88.0%

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{0.3333333333333333 \cdot \left(-y\right)}}{z} \]
      15. distribute-lft-in88.0%

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y} + \left(-y\right)\right)}}{z} \]
      16. sub-neg88.0%

        \[\leadsto \frac{0.3333333333333333 \cdot \color{blue}{\left(\frac{t}{y} - y\right)}}{z} \]
    9. Simplified88.0%

      \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}}{z} \]
    10. Taylor expanded in t around 0 44.2%

      \[\leadsto \frac{\color{blue}{-0.3333333333333333 \cdot y}}{z} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification49.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.5 \cdot 10^{+81}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 7.2 \cdot 10^{+61}:\\ \;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 48.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -4.8 \cdot 10^{+81}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 3.1 \cdot 10^{+59}:\\ \;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= x -4.8e+81) x (if (<= x 3.1e+59) (* y (/ -0.3333333333333333 z)) x)))
double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -4.8e+81) {
		tmp = x;
	} else if (x <= 3.1e+59) {
		tmp = y * (-0.3333333333333333 / z);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (x <= (-4.8d+81)) then
        tmp = x
    else if (x <= 3.1d+59) then
        tmp = y * ((-0.3333333333333333d0) / z)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -4.8e+81) {
		tmp = x;
	} else if (x <= 3.1e+59) {
		tmp = y * (-0.3333333333333333 / z);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if x <= -4.8e+81:
		tmp = x
	elif x <= 3.1e+59:
		tmp = y * (-0.3333333333333333 / z)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (x <= -4.8e+81)
		tmp = x;
	elseif (x <= 3.1e+59)
		tmp = Float64(y * Float64(-0.3333333333333333 / z));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (x <= -4.8e+81)
		tmp = x;
	elseif (x <= 3.1e+59)
		tmp = y * (-0.3333333333333333 / z);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[x, -4.8e+81], x, If[LessEqual[x, 3.1e+59], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.8 \cdot 10^{+81}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 3.1 \cdot 10^{+59}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.79999999999999979e81 or 3.10000000000000015e59 < x

    1. Initial program 93.9%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Step-by-step derivation
      1. +-commutative93.9%

        \[\leadsto \color{blue}{\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(x - \frac{y}{z \cdot 3}\right)} \]
      2. associate-+r-93.9%

        \[\leadsto \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + x\right) - \frac{y}{z \cdot 3}} \]
      3. +-commutative93.9%

        \[\leadsto \color{blue}{\left(x + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} - \frac{y}{z \cdot 3} \]
      4. associate--l+93.9%

        \[\leadsto \color{blue}{x + \left(\frac{t}{\left(z \cdot 3\right) \cdot y} - \frac{y}{z \cdot 3}\right)} \]
      5. sub-neg93.9%

        \[\leadsto x + \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(-\frac{y}{z \cdot 3}\right)\right)} \]
      6. remove-double-neg93.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) \]
      7. distribute-frac-neg93.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) \]
      8. distribute-neg-in93.9%

        \[\leadsto x + \color{blue}{\left(-\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} + \frac{y}{z \cdot 3}\right)\right)} \]
      9. remove-double-neg93.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) \]
      10. sub-neg93.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) \]
      11. neg-mul-193.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) \]
      12. times-frac96.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) \]
      13. distribute-frac-neg96.0%

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{\frac{-y}{z \cdot 3}}\right)\right) \]
      14. neg-mul-196.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) \]
      15. *-commutative96.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) \]
      16. associate-/l*96.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) \]
      17. *-commutative96.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. Simplified95.9%

      \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 57.7%

      \[\leadsto \color{blue}{x} \]

    if -4.79999999999999979e81 < x < 3.10000000000000015e59

    1. Initial program 92.8%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Step-by-step derivation
      1. +-commutative92.8%

        \[\leadsto \color{blue}{\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(x - \frac{y}{z \cdot 3}\right)} \]
      2. associate-+r-92.8%

        \[\leadsto \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + x\right) - \frac{y}{z \cdot 3}} \]
      3. sub-neg92.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*92.8%

        \[\leadsto \left(\frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}} + x\right) + \left(-\frac{y}{z \cdot 3}\right) \]
      5. *-commutative92.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-neg292.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-in92.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-eval92.8%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot \color{blue}{-3}} \]
    3. Simplified92.8%

      \[\leadsto \color{blue}{\left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot -3}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 88.0%

      \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot y + 0.3333333333333333 \cdot \frac{t}{y}}{z}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity88.0%

        \[\leadsto \frac{\color{blue}{1 \cdot \left(-0.3333333333333333 \cdot y + 0.3333333333333333 \cdot \frac{t}{y}\right)}}{z} \]
      2. *-commutative88.0%

        \[\leadsto \frac{\color{blue}{\left(-0.3333333333333333 \cdot y + 0.3333333333333333 \cdot \frac{t}{y}\right) \cdot 1}}{z} \]
      3. *-commutative88.0%

        \[\leadsto \frac{\left(\color{blue}{y \cdot -0.3333333333333333} + 0.3333333333333333 \cdot \frac{t}{y}\right) \cdot 1}{z} \]
      4. fma-define88.0%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, 0.3333333333333333 \cdot \frac{t}{y}\right)} \cdot 1}{z} \]
      5. clear-num87.9%

        \[\leadsto \frac{\mathsf{fma}\left(y, -0.3333333333333333, 0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{y}{t}}}\right) \cdot 1}{z} \]
      6. un-div-inv88.0%

        \[\leadsto \frac{\mathsf{fma}\left(y, -0.3333333333333333, \color{blue}{\frac{0.3333333333333333}{\frac{y}{t}}}\right) \cdot 1}{z} \]
    7. Applied egg-rr88.0%

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, \frac{0.3333333333333333}{\frac{y}{t}}\right) \cdot 1}}{z} \]
    8. Step-by-step derivation
      1. *-rgt-identity88.0%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, \frac{0.3333333333333333}{\frac{y}{t}}\right)}}{z} \]
      2. fma-undefine88.0%

        \[\leadsto \frac{\color{blue}{y \cdot -0.3333333333333333 + \frac{0.3333333333333333}{\frac{y}{t}}}}{z} \]
      3. +-commutative88.0%

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333}{\frac{y}{t}} + y \cdot -0.3333333333333333}}{z} \]
      4. associate-/r/88.0%

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333}{y} \cdot t} + y \cdot -0.3333333333333333}{z} \]
      5. metadata-eval88.0%

        \[\leadsto \frac{\frac{\color{blue}{0.3333333333333333 \cdot 1}}{y} \cdot t + y \cdot -0.3333333333333333}{z} \]
      6. associate-*r/88.0%

        \[\leadsto \frac{\color{blue}{\left(0.3333333333333333 \cdot \frac{1}{y}\right)} \cdot t + y \cdot -0.3333333333333333}{z} \]
      7. associate-*r/88.0%

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333 \cdot 1}{y}} \cdot t + y \cdot -0.3333333333333333}{z} \]
      8. metadata-eval88.0%

        \[\leadsto \frac{\frac{\color{blue}{0.3333333333333333}}{y} \cdot t + y \cdot -0.3333333333333333}{z} \]
      9. associate-*l/88.0%

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333 \cdot t}{y}} + y \cdot -0.3333333333333333}{z} \]
      10. associate-*r/88.0%

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \frac{t}{y}} + y \cdot -0.3333333333333333}{z} \]
      11. *-commutative88.0%

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{-0.3333333333333333 \cdot y}}{z} \]
      12. metadata-eval88.0%

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{\left(-0.3333333333333333\right)} \cdot y}{z} \]
      13. distribute-lft-neg-in88.0%

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{\left(-0.3333333333333333 \cdot y\right)}}{z} \]
      14. distribute-rgt-neg-in88.0%

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{0.3333333333333333 \cdot \left(-y\right)}}{z} \]
      15. distribute-lft-in88.0%

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y} + \left(-y\right)\right)}}{z} \]
      16. sub-neg88.0%

        \[\leadsto \frac{0.3333333333333333 \cdot \color{blue}{\left(\frac{t}{y} - y\right)}}{z} \]
    9. Simplified88.0%

      \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}}{z} \]
    10. Taylor expanded in t around 0 84.0%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z} + 0.3333333333333333 \cdot \frac{t}{y \cdot z}} \]
    11. Step-by-step derivation
      1. *-commutative84.0%

        \[\leadsto \color{blue}{\frac{y}{z} \cdot -0.3333333333333333} + 0.3333333333333333 \cdot \frac{t}{y \cdot z} \]
      2. *-lft-identity84.0%

        \[\leadsto \frac{\color{blue}{1 \cdot y}}{z} \cdot -0.3333333333333333 + 0.3333333333333333 \cdot \frac{t}{y \cdot z} \]
      3. associate-*l/84.0%

        \[\leadsto \color{blue}{\left(\frac{1}{z} \cdot y\right)} \cdot -0.3333333333333333 + 0.3333333333333333 \cdot \frac{t}{y \cdot z} \]
      4. associate-*r*84.0%

        \[\leadsto \color{blue}{\frac{1}{z} \cdot \left(y \cdot -0.3333333333333333\right)} + 0.3333333333333333 \cdot \frac{t}{y \cdot z} \]
      5. *-commutative84.0%

        \[\leadsto \frac{1}{z} \cdot \color{blue}{\left(-0.3333333333333333 \cdot y\right)} + 0.3333333333333333 \cdot \frac{t}{y \cdot z} \]
      6. associate-/r*88.0%

        \[\leadsto \frac{1}{z} \cdot \left(-0.3333333333333333 \cdot y\right) + 0.3333333333333333 \cdot \color{blue}{\frac{\frac{t}{y}}{z}} \]
      7. associate-*r/87.9%

        \[\leadsto \frac{1}{z} \cdot \left(-0.3333333333333333 \cdot y\right) + \color{blue}{\frac{0.3333333333333333 \cdot \frac{t}{y}}{z}} \]
      8. *-lft-identity87.9%

        \[\leadsto \frac{1}{z} \cdot \left(-0.3333333333333333 \cdot y\right) + \frac{\color{blue}{1 \cdot \left(0.3333333333333333 \cdot \frac{t}{y}\right)}}{z} \]
      9. associate-*l/87.9%

        \[\leadsto \frac{1}{z} \cdot \left(-0.3333333333333333 \cdot y\right) + \color{blue}{\frac{1}{z} \cdot \left(0.3333333333333333 \cdot \frac{t}{y}\right)} \]
      10. distribute-lft-in88.0%

        \[\leadsto \color{blue}{\frac{1}{z} \cdot \left(-0.3333333333333333 \cdot y + 0.3333333333333333 \cdot \frac{t}{y}\right)} \]
      11. +-commutative88.0%

        \[\leadsto \frac{1}{z} \cdot \color{blue}{\left(0.3333333333333333 \cdot \frac{t}{y} + -0.3333333333333333 \cdot y\right)} \]
      12. metadata-eval88.0%

        \[\leadsto \frac{1}{z} \cdot \left(0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{\left(-0.3333333333333333\right)} \cdot y\right) \]
      13. distribute-lft-neg-in88.0%

        \[\leadsto \frac{1}{z} \cdot \left(0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{\left(-0.3333333333333333 \cdot y\right)}\right) \]
      14. distribute-rgt-neg-out88.0%

        \[\leadsto \frac{1}{z} \cdot \left(0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{0.3333333333333333 \cdot \left(-y\right)}\right) \]
      15. distribute-lft-out88.0%

        \[\leadsto \frac{1}{z} \cdot \color{blue}{\left(0.3333333333333333 \cdot \left(\frac{t}{y} + \left(-y\right)\right)\right)} \]
      16. sub-neg88.0%

        \[\leadsto \frac{1}{z} \cdot \left(0.3333333333333333 \cdot \color{blue}{\left(\frac{t}{y} - y\right)}\right) \]
      17. associate-*r*88.0%

        \[\leadsto \color{blue}{\left(\frac{1}{z} \cdot 0.3333333333333333\right) \cdot \left(\frac{t}{y} - y\right)} \]
      18. associate-*l/88.0%

        \[\leadsto \color{blue}{\frac{1 \cdot 0.3333333333333333}{z}} \cdot \left(\frac{t}{y} - y\right) \]
      19. metadata-eval88.0%

        \[\leadsto \frac{\color{blue}{0.3333333333333333}}{z} \cdot \left(\frac{t}{y} - y\right) \]
    12. Simplified88.0%

      \[\leadsto \color{blue}{\frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    13. Taylor expanded in t around 0 44.1%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    14. Step-by-step derivation
      1. metadata-eval52.5%

        \[\leadsto x + \color{blue}{\left(-0.3333333333333333\right)} \cdot \frac{y}{z} \]
      2. distribute-lft-neg-in52.5%

        \[\leadsto x + \color{blue}{\left(-0.3333333333333333 \cdot \frac{y}{z}\right)} \]
      3. associate-*r/52.5%

        \[\leadsto x + \left(-\color{blue}{\frac{0.3333333333333333 \cdot y}{z}}\right) \]
      4. associate-*l/52.5%

        \[\leadsto x + \left(-\color{blue}{\frac{0.3333333333333333}{z} \cdot y}\right) \]
      5. *-commutative52.5%

        \[\leadsto x + \left(-\color{blue}{y \cdot \frac{0.3333333333333333}{z}}\right) \]
      6. distribute-rgt-neg-in52.5%

        \[\leadsto x + \color{blue}{y \cdot \left(-\frac{0.3333333333333333}{z}\right)} \]
      7. distribute-neg-frac52.5%

        \[\leadsto x + y \cdot \color{blue}{\frac{-0.3333333333333333}{z}} \]
      8. metadata-eval52.5%

        \[\leadsto x + y \cdot \frac{\color{blue}{-0.3333333333333333}}{z} \]
    15. Simplified44.1%

      \[\leadsto \color{blue}{y \cdot \frac{-0.3333333333333333}{z}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 18: 48.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -4.8 \cdot 10^{+81}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 2.6 \cdot 10^{+59}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= x -4.8e+81) x (if (<= x 2.6e+59) (* -0.3333333333333333 (/ y z)) x)))
double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -4.8e+81) {
		tmp = x;
	} else if (x <= 2.6e+59) {
		tmp = -0.3333333333333333 * (y / z);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (x <= (-4.8d+81)) then
        tmp = x
    else if (x <= 2.6d+59) then
        tmp = (-0.3333333333333333d0) * (y / z)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -4.8e+81) {
		tmp = x;
	} else if (x <= 2.6e+59) {
		tmp = -0.3333333333333333 * (y / z);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if x <= -4.8e+81:
		tmp = x
	elif x <= 2.6e+59:
		tmp = -0.3333333333333333 * (y / z)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (x <= -4.8e+81)
		tmp = x;
	elseif (x <= 2.6e+59)
		tmp = Float64(-0.3333333333333333 * Float64(y / z));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (x <= -4.8e+81)
		tmp = x;
	elseif (x <= 2.6e+59)
		tmp = -0.3333333333333333 * (y / z);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[x, -4.8e+81], x, If[LessEqual[x, 2.6e+59], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.8 \cdot 10^{+81}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 2.6 \cdot 10^{+59}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.79999999999999979e81 or 2.59999999999999999e59 < x

    1. Initial program 93.9%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Step-by-step derivation
      1. +-commutative93.9%

        \[\leadsto \color{blue}{\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(x - \frac{y}{z \cdot 3}\right)} \]
      2. associate-+r-93.9%

        \[\leadsto \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + x\right) - \frac{y}{z \cdot 3}} \]
      3. +-commutative93.9%

        \[\leadsto \color{blue}{\left(x + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} - \frac{y}{z \cdot 3} \]
      4. associate--l+93.9%

        \[\leadsto \color{blue}{x + \left(\frac{t}{\left(z \cdot 3\right) \cdot y} - \frac{y}{z \cdot 3}\right)} \]
      5. sub-neg93.9%

        \[\leadsto x + \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(-\frac{y}{z \cdot 3}\right)\right)} \]
      6. remove-double-neg93.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) \]
      7. distribute-frac-neg93.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) \]
      8. distribute-neg-in93.9%

        \[\leadsto x + \color{blue}{\left(-\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} + \frac{y}{z \cdot 3}\right)\right)} \]
      9. remove-double-neg93.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) \]
      10. sub-neg93.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) \]
      11. neg-mul-193.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) \]
      12. times-frac96.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) \]
      13. distribute-frac-neg96.0%

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{\frac{-y}{z \cdot 3}}\right)\right) \]
      14. neg-mul-196.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) \]
      15. *-commutative96.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) \]
      16. associate-/l*96.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) \]
      17. *-commutative96.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. Simplified95.9%

      \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 57.7%

      \[\leadsto \color{blue}{x} \]

    if -4.79999999999999979e81 < x < 2.59999999999999999e59

    1. Initial program 92.8%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Step-by-step derivation
      1. +-commutative92.8%

        \[\leadsto \color{blue}{\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(x - \frac{y}{z \cdot 3}\right)} \]
      2. associate-+r-92.8%

        \[\leadsto \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + x\right) - \frac{y}{z \cdot 3}} \]
      3. sub-neg92.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*92.8%

        \[\leadsto \left(\frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}} + x\right) + \left(-\frac{y}{z \cdot 3}\right) \]
      5. *-commutative92.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-neg292.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-in92.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-eval92.8%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot \color{blue}{-3}} \]
    3. Simplified92.8%

      \[\leadsto \color{blue}{\left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot -3}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 88.0%

      \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot y + 0.3333333333333333 \cdot \frac{t}{y}}{z}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity88.0%

        \[\leadsto \frac{\color{blue}{1 \cdot \left(-0.3333333333333333 \cdot y + 0.3333333333333333 \cdot \frac{t}{y}\right)}}{z} \]
      2. *-commutative88.0%

        \[\leadsto \frac{\color{blue}{\left(-0.3333333333333333 \cdot y + 0.3333333333333333 \cdot \frac{t}{y}\right) \cdot 1}}{z} \]
      3. *-commutative88.0%

        \[\leadsto \frac{\left(\color{blue}{y \cdot -0.3333333333333333} + 0.3333333333333333 \cdot \frac{t}{y}\right) \cdot 1}{z} \]
      4. fma-define88.0%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, 0.3333333333333333 \cdot \frac{t}{y}\right)} \cdot 1}{z} \]
      5. clear-num87.9%

        \[\leadsto \frac{\mathsf{fma}\left(y, -0.3333333333333333, 0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{y}{t}}}\right) \cdot 1}{z} \]
      6. un-div-inv88.0%

        \[\leadsto \frac{\mathsf{fma}\left(y, -0.3333333333333333, \color{blue}{\frac{0.3333333333333333}{\frac{y}{t}}}\right) \cdot 1}{z} \]
    7. Applied egg-rr88.0%

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, \frac{0.3333333333333333}{\frac{y}{t}}\right) \cdot 1}}{z} \]
    8. Step-by-step derivation
      1. *-rgt-identity88.0%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, -0.3333333333333333, \frac{0.3333333333333333}{\frac{y}{t}}\right)}}{z} \]
      2. fma-undefine88.0%

        \[\leadsto \frac{\color{blue}{y \cdot -0.3333333333333333 + \frac{0.3333333333333333}{\frac{y}{t}}}}{z} \]
      3. +-commutative88.0%

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333}{\frac{y}{t}} + y \cdot -0.3333333333333333}}{z} \]
      4. associate-/r/88.0%

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333}{y} \cdot t} + y \cdot -0.3333333333333333}{z} \]
      5. metadata-eval88.0%

        \[\leadsto \frac{\frac{\color{blue}{0.3333333333333333 \cdot 1}}{y} \cdot t + y \cdot -0.3333333333333333}{z} \]
      6. associate-*r/88.0%

        \[\leadsto \frac{\color{blue}{\left(0.3333333333333333 \cdot \frac{1}{y}\right)} \cdot t + y \cdot -0.3333333333333333}{z} \]
      7. associate-*r/88.0%

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333 \cdot 1}{y}} \cdot t + y \cdot -0.3333333333333333}{z} \]
      8. metadata-eval88.0%

        \[\leadsto \frac{\frac{\color{blue}{0.3333333333333333}}{y} \cdot t + y \cdot -0.3333333333333333}{z} \]
      9. associate-*l/88.0%

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333 \cdot t}{y}} + y \cdot -0.3333333333333333}{z} \]
      10. associate-*r/88.0%

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \frac{t}{y}} + y \cdot -0.3333333333333333}{z} \]
      11. *-commutative88.0%

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{-0.3333333333333333 \cdot y}}{z} \]
      12. metadata-eval88.0%

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{\left(-0.3333333333333333\right)} \cdot y}{z} \]
      13. distribute-lft-neg-in88.0%

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{\left(-0.3333333333333333 \cdot y\right)}}{z} \]
      14. distribute-rgt-neg-in88.0%

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y} + \color{blue}{0.3333333333333333 \cdot \left(-y\right)}}{z} \]
      15. distribute-lft-in88.0%

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y} + \left(-y\right)\right)}}{z} \]
      16. sub-neg88.0%

        \[\leadsto \frac{0.3333333333333333 \cdot \color{blue}{\left(\frac{t}{y} - y\right)}}{z} \]
    9. Simplified88.0%

      \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}}{z} \]
    10. Taylor expanded in t around 0 44.1%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 19: 96.0% accurate, 1.4× speedup?

\[\begin{array}{l} \\ x + \frac{\frac{t}{y} - y}{z \cdot 3} \end{array} \]
(FPCore (x y z t) :precision binary64 (+ x (/ (- (/ t y) y) (* z 3.0))))
double code(double x, double y, double z, double t) {
	return x + (((t / y) - y) / (z * 3.0));
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x + (((t / y) - y) / (z * 3.0d0))
end function
public static double code(double x, double y, double z, double t) {
	return x + (((t / y) - y) / (z * 3.0));
}
def code(x, y, z, t):
	return x + (((t / y) - y) / (z * 3.0))
function code(x, y, z, t)
	return Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0)))
end
function tmp = code(x, y, z, t)
	tmp = x + (((t / y) - y) / (z * 3.0));
end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{\frac{t}{y} - y}{z \cdot 3}
\end{array}
Derivation
  1. Initial program 93.2%

    \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
  2. Step-by-step derivation
    1. +-commutative93.2%

      \[\leadsto \color{blue}{\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(x - \frac{y}{z \cdot 3}\right)} \]
    2. associate-+r-93.2%

      \[\leadsto \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + x\right) - \frac{y}{z \cdot 3}} \]
    3. +-commutative93.2%

      \[\leadsto \color{blue}{\left(x + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} - \frac{y}{z \cdot 3} \]
    4. associate--l+93.2%

      \[\leadsto \color{blue}{x + \left(\frac{t}{\left(z \cdot 3\right) \cdot y} - \frac{y}{z \cdot 3}\right)} \]
    5. sub-neg93.2%

      \[\leadsto x + \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(-\frac{y}{z \cdot 3}\right)\right)} \]
    6. remove-double-neg93.2%

      \[\leadsto x + \left(\color{blue}{\left(-\left(-\frac{t}{\left(z \cdot 3\right) \cdot y}\right)\right)} + \left(-\frac{y}{z \cdot 3}\right)\right) \]
    7. distribute-frac-neg93.2%

      \[\leadsto x + \left(\left(-\color{blue}{\frac{-t}{\left(z \cdot 3\right) \cdot y}}\right) + \left(-\frac{y}{z \cdot 3}\right)\right) \]
    8. distribute-neg-in93.2%

      \[\leadsto x + \color{blue}{\left(-\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} + \frac{y}{z \cdot 3}\right)\right)} \]
    9. remove-double-neg93.2%

      \[\leadsto x + \left(-\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} + \color{blue}{\left(-\left(-\frac{y}{z \cdot 3}\right)\right)}\right)\right) \]
    10. sub-neg93.2%

      \[\leadsto x + \left(-\color{blue}{\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} - \left(-\frac{y}{z \cdot 3}\right)\right)}\right) \]
    11. neg-mul-193.2%

      \[\leadsto x + \left(-\left(\frac{\color{blue}{-1 \cdot t}}{\left(z \cdot 3\right) \cdot y} - \left(-\frac{y}{z \cdot 3}\right)\right)\right) \]
    12. times-frac96.5%

      \[\leadsto x + \left(-\left(\color{blue}{\frac{-1}{z \cdot 3} \cdot \frac{t}{y}} - \left(-\frac{y}{z \cdot 3}\right)\right)\right) \]
    13. distribute-frac-neg96.5%

      \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{\frac{-y}{z \cdot 3}}\right)\right) \]
    14. neg-mul-196.5%

      \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \frac{\color{blue}{-1 \cdot y}}{z \cdot 3}\right)\right) \]
    15. *-commutative96.5%

      \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \frac{\color{blue}{y \cdot -1}}{z \cdot 3}\right)\right) \]
    16. associate-/l*96.4%

      \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{y \cdot \frac{-1}{z \cdot 3}}\right)\right) \]
    17. *-commutative96.4%

      \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{\frac{-1}{z \cdot 3} \cdot y}\right)\right) \]
  3. Simplified96.4%

    \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. metadata-eval96.4%

      \[\leadsto x + \frac{\color{blue}{\frac{1}{3}}}{z} \cdot \left(\frac{t}{y} - y\right) \]
    2. associate-/r*96.4%

      \[\leadsto x + \color{blue}{\frac{1}{3 \cdot z}} \cdot \left(\frac{t}{y} - y\right) \]
    3. *-commutative96.4%

      \[\leadsto x + \frac{1}{\color{blue}{z \cdot 3}} \cdot \left(\frac{t}{y} - y\right) \]
    4. associate-*l/96.5%

      \[\leadsto x + \color{blue}{\frac{1 \cdot \left(\frac{t}{y} - y\right)}{z \cdot 3}} \]
    5. *-un-lft-identity96.5%

      \[\leadsto x + \frac{\color{blue}{\frac{t}{y} - y}}{z \cdot 3} \]
  6. Applied egg-rr96.5%

    \[\leadsto x + \color{blue}{\frac{\frac{t}{y} - y}{z \cdot 3}} \]
  7. Add Preprocessing

Alternative 20: 96.0% accurate, 1.4× speedup?

\[\begin{array}{l} \\ x + \left(\frac{t}{y} - y\right) \cdot \frac{0.3333333333333333}{z} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (+ x (* (- (/ t y) y) (/ 0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
	return x + (((t / y) - y) * (0.3333333333333333 / z));
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x + (((t / y) - y) * (0.3333333333333333d0 / z))
end function
public static double code(double x, double y, double z, double t) {
	return x + (((t / y) - y) * (0.3333333333333333 / z));
}
def code(x, y, z, t):
	return x + (((t / y) - y) * (0.3333333333333333 / z))
function code(x, y, z, t)
	return Float64(x + Float64(Float64(Float64(t / y) - y) * Float64(0.3333333333333333 / z)))
end
function tmp = code(x, y, z, t)
	tmp = x + (((t / y) - y) * (0.3333333333333333 / z));
end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \left(\frac{t}{y} - y\right) \cdot \frac{0.3333333333333333}{z}
\end{array}
Derivation
  1. Initial program 93.2%

    \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
  2. Step-by-step derivation
    1. +-commutative93.2%

      \[\leadsto \color{blue}{\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(x - \frac{y}{z \cdot 3}\right)} \]
    2. associate-+r-93.2%

      \[\leadsto \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + x\right) - \frac{y}{z \cdot 3}} \]
    3. +-commutative93.2%

      \[\leadsto \color{blue}{\left(x + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} - \frac{y}{z \cdot 3} \]
    4. associate--l+93.2%

      \[\leadsto \color{blue}{x + \left(\frac{t}{\left(z \cdot 3\right) \cdot y} - \frac{y}{z \cdot 3}\right)} \]
    5. sub-neg93.2%

      \[\leadsto x + \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(-\frac{y}{z \cdot 3}\right)\right)} \]
    6. remove-double-neg93.2%

      \[\leadsto x + \left(\color{blue}{\left(-\left(-\frac{t}{\left(z \cdot 3\right) \cdot y}\right)\right)} + \left(-\frac{y}{z \cdot 3}\right)\right) \]
    7. distribute-frac-neg93.2%

      \[\leadsto x + \left(\left(-\color{blue}{\frac{-t}{\left(z \cdot 3\right) \cdot y}}\right) + \left(-\frac{y}{z \cdot 3}\right)\right) \]
    8. distribute-neg-in93.2%

      \[\leadsto x + \color{blue}{\left(-\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} + \frac{y}{z \cdot 3}\right)\right)} \]
    9. remove-double-neg93.2%

      \[\leadsto x + \left(-\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} + \color{blue}{\left(-\left(-\frac{y}{z \cdot 3}\right)\right)}\right)\right) \]
    10. sub-neg93.2%

      \[\leadsto x + \left(-\color{blue}{\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} - \left(-\frac{y}{z \cdot 3}\right)\right)}\right) \]
    11. neg-mul-193.2%

      \[\leadsto x + \left(-\left(\frac{\color{blue}{-1 \cdot t}}{\left(z \cdot 3\right) \cdot y} - \left(-\frac{y}{z \cdot 3}\right)\right)\right) \]
    12. times-frac96.5%

      \[\leadsto x + \left(-\left(\color{blue}{\frac{-1}{z \cdot 3} \cdot \frac{t}{y}} - \left(-\frac{y}{z \cdot 3}\right)\right)\right) \]
    13. distribute-frac-neg96.5%

      \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{\frac{-y}{z \cdot 3}}\right)\right) \]
    14. neg-mul-196.5%

      \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \frac{\color{blue}{-1 \cdot y}}{z \cdot 3}\right)\right) \]
    15. *-commutative96.5%

      \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \frac{\color{blue}{y \cdot -1}}{z \cdot 3}\right)\right) \]
    16. associate-/l*96.4%

      \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{y \cdot \frac{-1}{z \cdot 3}}\right)\right) \]
    17. *-commutative96.4%

      \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{\frac{-1}{z \cdot 3} \cdot y}\right)\right) \]
  3. Simplified96.4%

    \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
  4. Add Preprocessing
  5. Final simplification96.4%

    \[\leadsto x + \left(\frac{t}{y} - y\right) \cdot \frac{0.3333333333333333}{z} \]
  6. Add Preprocessing

Alternative 21: 96.0% 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 93.2%

    \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
  2. Step-by-step derivation
    1. +-commutative93.2%

      \[\leadsto \color{blue}{\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(x - \frac{y}{z \cdot 3}\right)} \]
    2. associate-+r-93.2%

      \[\leadsto \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + x\right) - \frac{y}{z \cdot 3}} \]
    3. +-commutative93.2%

      \[\leadsto \color{blue}{\left(x + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} - \frac{y}{z \cdot 3} \]
    4. associate--l+93.2%

      \[\leadsto \color{blue}{x + \left(\frac{t}{\left(z \cdot 3\right) \cdot y} - \frac{y}{z \cdot 3}\right)} \]
    5. sub-neg93.2%

      \[\leadsto x + \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(-\frac{y}{z \cdot 3}\right)\right)} \]
    6. remove-double-neg93.2%

      \[\leadsto x + \left(\color{blue}{\left(-\left(-\frac{t}{\left(z \cdot 3\right) \cdot y}\right)\right)} + \left(-\frac{y}{z \cdot 3}\right)\right) \]
    7. distribute-frac-neg93.2%

      \[\leadsto x + \left(\left(-\color{blue}{\frac{-t}{\left(z \cdot 3\right) \cdot y}}\right) + \left(-\frac{y}{z \cdot 3}\right)\right) \]
    8. distribute-neg-in93.2%

      \[\leadsto x + \color{blue}{\left(-\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} + \frac{y}{z \cdot 3}\right)\right)} \]
    9. remove-double-neg93.2%

      \[\leadsto x + \left(-\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} + \color{blue}{\left(-\left(-\frac{y}{z \cdot 3}\right)\right)}\right)\right) \]
    10. sub-neg93.2%

      \[\leadsto x + \left(-\color{blue}{\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} - \left(-\frac{y}{z \cdot 3}\right)\right)}\right) \]
    11. neg-mul-193.2%

      \[\leadsto x + \left(-\left(\frac{\color{blue}{-1 \cdot t}}{\left(z \cdot 3\right) \cdot y} - \left(-\frac{y}{z \cdot 3}\right)\right)\right) \]
    12. times-frac96.5%

      \[\leadsto x + \left(-\left(\color{blue}{\frac{-1}{z \cdot 3} \cdot \frac{t}{y}} - \left(-\frac{y}{z \cdot 3}\right)\right)\right) \]
    13. distribute-frac-neg96.5%

      \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{\frac{-y}{z \cdot 3}}\right)\right) \]
    14. neg-mul-196.5%

      \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \frac{\color{blue}{-1 \cdot y}}{z \cdot 3}\right)\right) \]
    15. *-commutative96.5%

      \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \frac{\color{blue}{y \cdot -1}}{z \cdot 3}\right)\right) \]
    16. associate-/l*96.4%

      \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{y \cdot \frac{-1}{z \cdot 3}}\right)\right) \]
    17. *-commutative96.4%

      \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{\frac{-1}{z \cdot 3} \cdot y}\right)\right) \]
  3. Simplified96.4%

    \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in z around 0 96.4%

    \[\leadsto x + \color{blue}{0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}} \]
  6. Add Preprocessing

Alternative 22: 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 93.2%

    \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
  2. Step-by-step derivation
    1. +-commutative93.2%

      \[\leadsto \color{blue}{\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(x - \frac{y}{z \cdot 3}\right)} \]
    2. associate-+r-93.2%

      \[\leadsto \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + x\right) - \frac{y}{z \cdot 3}} \]
    3. +-commutative93.2%

      \[\leadsto \color{blue}{\left(x + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} - \frac{y}{z \cdot 3} \]
    4. associate--l+93.2%

      \[\leadsto \color{blue}{x + \left(\frac{t}{\left(z \cdot 3\right) \cdot y} - \frac{y}{z \cdot 3}\right)} \]
    5. sub-neg93.2%

      \[\leadsto x + \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(-\frac{y}{z \cdot 3}\right)\right)} \]
    6. remove-double-neg93.2%

      \[\leadsto x + \left(\color{blue}{\left(-\left(-\frac{t}{\left(z \cdot 3\right) \cdot y}\right)\right)} + \left(-\frac{y}{z \cdot 3}\right)\right) \]
    7. distribute-frac-neg93.2%

      \[\leadsto x + \left(\left(-\color{blue}{\frac{-t}{\left(z \cdot 3\right) \cdot y}}\right) + \left(-\frac{y}{z \cdot 3}\right)\right) \]
    8. distribute-neg-in93.2%

      \[\leadsto x + \color{blue}{\left(-\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} + \frac{y}{z \cdot 3}\right)\right)} \]
    9. remove-double-neg93.2%

      \[\leadsto x + \left(-\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} + \color{blue}{\left(-\left(-\frac{y}{z \cdot 3}\right)\right)}\right)\right) \]
    10. sub-neg93.2%

      \[\leadsto x + \left(-\color{blue}{\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} - \left(-\frac{y}{z \cdot 3}\right)\right)}\right) \]
    11. neg-mul-193.2%

      \[\leadsto x + \left(-\left(\frac{\color{blue}{-1 \cdot t}}{\left(z \cdot 3\right) \cdot y} - \left(-\frac{y}{z \cdot 3}\right)\right)\right) \]
    12. times-frac96.5%

      \[\leadsto x + \left(-\left(\color{blue}{\frac{-1}{z \cdot 3} \cdot \frac{t}{y}} - \left(-\frac{y}{z \cdot 3}\right)\right)\right) \]
    13. distribute-frac-neg96.5%

      \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{\frac{-y}{z \cdot 3}}\right)\right) \]
    14. neg-mul-196.5%

      \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \frac{\color{blue}{-1 \cdot y}}{z \cdot 3}\right)\right) \]
    15. *-commutative96.5%

      \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \frac{\color{blue}{y \cdot -1}}{z \cdot 3}\right)\right) \]
    16. associate-/l*96.4%

      \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{y \cdot \frac{-1}{z \cdot 3}}\right)\right) \]
    17. *-commutative96.4%

      \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{\frac{-1}{z \cdot 3} \cdot y}\right)\right) \]
  3. Simplified96.4%

    \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in x around inf 28.0%

    \[\leadsto \color{blue}{x} \]
  6. Add Preprocessing

Developer Target 1: 96.0% 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 2024146 
(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))))