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

Percentage Accurate: 96.0% → 97.9%
Time: 11.4s
Alternatives: 23
Speedup: 0.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.7e-86 or 2.64999999999999994e-198 < y

    1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.7e-86 < y < 2.64999999999999994e-198

    1. Initial program 84.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 96.6% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 2 \cdot 10^{-86}:\\ \;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{z \cdot \left(y \cdot 3\right)}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= t 2e-86)
   (+ x (/ (- (/ t y) y) (* z 3.0)))
   (+ x (fma -0.3333333333333333 (/ y z) (/ t (* z (* y 3.0)))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= 2e-86) {
		tmp = x + (((t / y) - y) / (z * 3.0));
	} else {
		tmp = x + fma(-0.3333333333333333, (y / z), (t / (z * (y * 3.0))));
	}
	return tmp;
}
function code(x, y, z, t)
	tmp = 0.0
	if (t <= 2e-86)
		tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0)));
	else
		tmp = Float64(x + fma(-0.3333333333333333, Float64(y / z), Float64(t / Float64(z * Float64(y * 3.0)))));
	end
	return tmp
end
code[x_, y_, z_, t_] := If[LessEqual[t, 2e-86], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision] + N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


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

    1. Initial program 92.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000017e-86 < t

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 91.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.25 \cdot 10^{+61}:\\ \;\;\;\;x + \frac{y}{3} \cdot \frac{-1}{z}\\ \mathbf{elif}\;y \leq -3500000:\\ \;\;\;\;x + \frac{\frac{\frac{t}{y}}{3}}{z}\\ \mathbf{elif}\;y \leq -1.35 \cdot 10^{-47} \lor \neg \left(y \leq 1.9 \cdot 10^{-24}\right):\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -1.25e+61)
   (+ x (* (/ y 3.0) (/ -1.0 z)))
   (if (<= y -3500000.0)
     (+ x (/ (/ (/ t y) 3.0) z))
     (if (or (<= y -1.35e-47) (not (<= y 1.9e-24)))
       (- 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 <= -1.25e+61) {
		tmp = x + ((y / 3.0) * (-1.0 / z));
	} else if (y <= -3500000.0) {
		tmp = x + (((t / y) / 3.0) / z);
	} else if ((y <= -1.35e-47) || !(y <= 1.9e-24)) {
		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 <= (-1.25d+61)) then
        tmp = x + ((y / 3.0d0) * ((-1.0d0) / z))
    else if (y <= (-3500000.0d0)) then
        tmp = x + (((t / y) / 3.0d0) / z)
    else if ((y <= (-1.35d-47)) .or. (.not. (y <= 1.9d-24))) 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 <= -1.25e+61) {
		tmp = x + ((y / 3.0) * (-1.0 / z));
	} else if (y <= -3500000.0) {
		tmp = x + (((t / y) / 3.0) / z);
	} else if ((y <= -1.35e-47) || !(y <= 1.9e-24)) {
		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 <= -1.25e+61:
		tmp = x + ((y / 3.0) * (-1.0 / z))
	elif y <= -3500000.0:
		tmp = x + (((t / y) / 3.0) / z)
	elif (y <= -1.35e-47) or not (y <= 1.9e-24):
		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 <= -1.25e+61)
		tmp = Float64(x + Float64(Float64(y / 3.0) * Float64(-1.0 / z)));
	elseif (y <= -3500000.0)
		tmp = Float64(x + Float64(Float64(Float64(t / y) / 3.0) / z));
	elseif ((y <= -1.35e-47) || !(y <= 1.9e-24))
		tmp = Float64(x - Float64(y / Float64(z * 3.0)));
	else
		tmp = Float64(x + Float64(0.3333333333333333 * Float64(Float64(t / z) / y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -1.25e+61)
		tmp = x + ((y / 3.0) * (-1.0 / z));
	elseif (y <= -3500000.0)
		tmp = x + (((t / y) / 3.0) / z);
	elseif ((y <= -1.35e-47) || ~((y <= 1.9e-24)))
		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[LessEqual[y, -1.25e+61], N[(x + N[(N[(y / 3.0), $MachinePrecision] * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3500000.0], N[(x + N[(N[(N[(t / y), $MachinePrecision] / 3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.35e-47], N[Not[LessEqual[y, 1.9e-24]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -3500000:\\
\;\;\;\;x + \frac{\frac{\frac{t}{y}}{3}}{z}\\

\mathbf{elif}\;y \leq -1.35 \cdot 10^{-47} \lor \neg \left(y \leq 1.9 \cdot 10^{-24}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\

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


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

    1. Initial program 98.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{1}{3}} \cdot \frac{y}{z} \]
      3. times-frac96.7%

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

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

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

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

    if -1.25000000000000004e61 < y < -3.5e6

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.5e6 < y < -1.3499999999999999e-47 or 1.90000000000000013e-24 < 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 t around 0 90.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{z \cdot 3}} \]
    12. Applied egg-rr91.6%

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

    if -1.3499999999999999e-47 < y < 1.90000000000000013e-24

    1. Initial program 86.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.25 \cdot 10^{+61}:\\ \;\;\;\;x + \frac{y}{3} \cdot \frac{-1}{z}\\ \mathbf{elif}\;y \leq -3500000:\\ \;\;\;\;x + \frac{\frac{\frac{t}{y}}{3}}{z}\\ \mathbf{elif}\;y \leq -1.35 \cdot 10^{-47} \lor \neg \left(y \leq 1.9 \cdot 10^{-24}\right):\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 91.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4.4 \cdot 10^{+60}:\\ \;\;\;\;x - \frac{\frac{y}{z}}{3}\\ \mathbf{elif}\;y \leq -13500:\\ \;\;\;\;x + \frac{\frac{\frac{t}{y}}{3}}{z}\\ \mathbf{elif}\;y \leq -1.35 \cdot 10^{-47} \lor \neg \left(y \leq 2.2 \cdot 10^{-25}\right):\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -4.4e+60)
   (- x (/ (/ y z) 3.0))
   (if (<= y -13500.0)
     (+ x (/ (/ (/ t y) 3.0) z))
     (if (or (<= y -1.35e-47) (not (<= y 2.2e-25)))
       (- 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 <= -4.4e+60) {
		tmp = x - ((y / z) / 3.0);
	} else if (y <= -13500.0) {
		tmp = x + (((t / y) / 3.0) / z);
	} else if ((y <= -1.35e-47) || !(y <= 2.2e-25)) {
		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 <= (-4.4d+60)) then
        tmp = x - ((y / z) / 3.0d0)
    else if (y <= (-13500.0d0)) then
        tmp = x + (((t / y) / 3.0d0) / z)
    else if ((y <= (-1.35d-47)) .or. (.not. (y <= 2.2d-25))) 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 <= -4.4e+60) {
		tmp = x - ((y / z) / 3.0);
	} else if (y <= -13500.0) {
		tmp = x + (((t / y) / 3.0) / z);
	} else if ((y <= -1.35e-47) || !(y <= 2.2e-25)) {
		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 <= -4.4e+60:
		tmp = x - ((y / z) / 3.0)
	elif y <= -13500.0:
		tmp = x + (((t / y) / 3.0) / z)
	elif (y <= -1.35e-47) or not (y <= 2.2e-25):
		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 <= -4.4e+60)
		tmp = Float64(x - Float64(Float64(y / z) / 3.0));
	elseif (y <= -13500.0)
		tmp = Float64(x + Float64(Float64(Float64(t / y) / 3.0) / z));
	elseif ((y <= -1.35e-47) || !(y <= 2.2e-25))
		tmp = Float64(x - Float64(y / Float64(z * 3.0)));
	else
		tmp = Float64(x + Float64(0.3333333333333333 * Float64(Float64(t / z) / y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -4.4e+60)
		tmp = x - ((y / z) / 3.0);
	elseif (y <= -13500.0)
		tmp = x + (((t / y) / 3.0) / z);
	elseif ((y <= -1.35e-47) || ~((y <= 2.2e-25)))
		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[LessEqual[y, -4.4e+60], N[(x - N[(N[(y / z), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -13500.0], N[(x + N[(N[(N[(t / y), $MachinePrecision] / 3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.35e-47], N[Not[LessEqual[y, 2.2e-25]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -13500:\\
\;\;\;\;x + \frac{\frac{\frac{t}{y}}{3}}{z}\\

\mathbf{elif}\;y \leq -1.35 \cdot 10^{-47} \lor \neg \left(y \leq 2.2 \cdot 10^{-25}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\

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


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

    1. Initial program 98.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{\frac{y}{z}}{3}} \]
    12. Applied egg-rr96.8%

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

    if -4.39999999999999992e60 < y < -13500

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -13500 < y < -1.3499999999999999e-47 or 2.2000000000000002e-25 < 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 t around 0 90.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{z \cdot 3}} \]
    12. Applied egg-rr91.6%

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

    if -1.3499999999999999e-47 < y < 2.2000000000000002e-25

    1. Initial program 86.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.4 \cdot 10^{+60}:\\ \;\;\;\;x - \frac{\frac{y}{z}}{3}\\ \mathbf{elif}\;y \leq -13500:\\ \;\;\;\;x + \frac{\frac{\frac{t}{y}}{3}}{z}\\ \mathbf{elif}\;y \leq -1.35 \cdot 10^{-47} \lor \neg \left(y \leq 2.2 \cdot 10^{-25}\right):\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 91.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -7.5 \cdot 10^{+61}:\\ \;\;\;\;x - \frac{\frac{y}{z}}{3}\\ \mathbf{elif}\;y \leq -11500000:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{-49} \lor \neg \left(y \leq 1.9 \cdot 10^{-24}\right):\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -7.5e+61)
   (- x (/ (/ y z) 3.0))
   (if (<= y -11500000.0)
     (+ x (* 0.3333333333333333 (/ t (* y z))))
     (if (or (<= y -5.2e-49) (not (<= y 1.9e-24)))
       (- 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 <= -7.5e+61) {
		tmp = x - ((y / z) / 3.0);
	} else if (y <= -11500000.0) {
		tmp = x + (0.3333333333333333 * (t / (y * z)));
	} else if ((y <= -5.2e-49) || !(y <= 1.9e-24)) {
		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 <= (-7.5d+61)) then
        tmp = x - ((y / z) / 3.0d0)
    else if (y <= (-11500000.0d0)) then
        tmp = x + (0.3333333333333333d0 * (t / (y * z)))
    else if ((y <= (-5.2d-49)) .or. (.not. (y <= 1.9d-24))) 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 <= -7.5e+61) {
		tmp = x - ((y / z) / 3.0);
	} else if (y <= -11500000.0) {
		tmp = x + (0.3333333333333333 * (t / (y * z)));
	} else if ((y <= -5.2e-49) || !(y <= 1.9e-24)) {
		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 <= -7.5e+61:
		tmp = x - ((y / z) / 3.0)
	elif y <= -11500000.0:
		tmp = x + (0.3333333333333333 * (t / (y * z)))
	elif (y <= -5.2e-49) or not (y <= 1.9e-24):
		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 <= -7.5e+61)
		tmp = Float64(x - Float64(Float64(y / z) / 3.0));
	elseif (y <= -11500000.0)
		tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(y * z))));
	elseif ((y <= -5.2e-49) || !(y <= 1.9e-24))
		tmp = Float64(x - Float64(y / Float64(z * 3.0)));
	else
		tmp = Float64(x + Float64(0.3333333333333333 * Float64(Float64(t / z) / y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -7.5e+61)
		tmp = x - ((y / z) / 3.0);
	elseif (y <= -11500000.0)
		tmp = x + (0.3333333333333333 * (t / (y * z)));
	elseif ((y <= -5.2e-49) || ~((y <= 1.9e-24)))
		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[LessEqual[y, -7.5e+61], N[(x - N[(N[(y / z), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -11500000.0], N[(x + N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -5.2e-49], N[Not[LessEqual[y, 1.9e-24]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -11500000:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\

\mathbf{elif}\;y \leq -5.2 \cdot 10^{-49} \lor \neg \left(y \leq 1.9 \cdot 10^{-24}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\

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


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

    1. Initial program 98.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{\frac{y}{z}}{3}} \]
    12. Applied egg-rr96.8%

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

    if -7.5e61 < y < -1.15e7

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.15e7 < y < -5.1999999999999999e-49 or 1.90000000000000013e-24 < 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 t around 0 90.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{z \cdot 3}} \]
    12. Applied egg-rr91.6%

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

    if -5.1999999999999999e-49 < y < 1.90000000000000013e-24

    1. Initial program 86.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.5 \cdot 10^{+61}:\\ \;\;\;\;x - \frac{\frac{y}{z}}{3}\\ \mathbf{elif}\;y \leq -11500000:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{-49} \lor \neg \left(y \leq 1.9 \cdot 10^{-24}\right):\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 89.0% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;y \leq -520000 \lor \neg \left(y \leq -1.35 \cdot 10^{-47}\right) \land y \leq 1.55 \cdot 10^{-24}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\

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


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

    1. Initial program 98.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{\frac{y}{z}}{3}} \]
    12. Applied egg-rr96.8%

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

    if -4.9000000000000003e60 < y < -5.2e5 or -1.3499999999999999e-47 < y < 1.55e-24

    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. sub-neg87.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.2e5 < y < -1.3499999999999999e-47 or 1.55e-24 < 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 t around 0 90.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{z \cdot 3}} \]
    12. Applied egg-rr91.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.9 \cdot 10^{+60}:\\ \;\;\;\;x - \frac{\frac{y}{z}}{3}\\ \mathbf{elif}\;y \leq -520000 \lor \neg \left(y \leq -1.35 \cdot 10^{-47}\right) \land y \leq 1.55 \cdot 10^{-24}:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 75.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+34} \lor \neg \left(y \leq -280000000\right) \land \left(y \leq -1.55 \cdot 10^{-87} \lor \neg \left(y \leq 2.2 \cdot 10^{-47}\right)\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.19999999999999995e34 or -2.8e8 < y < -1.54999999999999999e-87 or 2.20000000000000019e-47 < y

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{y \cdot \frac{0.3333333333333333}{z}} \]
    10. Simplified91.5%

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

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

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

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

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

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

    if -5.19999999999999995e34 < y < -2.8e8 or -1.54999999999999999e-87 < y < 2.20000000000000019e-47

    1. Initial program 87.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.2 \cdot 10^{+34} \lor \neg \left(y \leq -280000000\right) \land \left(y \leq -1.55 \cdot 10^{-87} \lor \neg \left(y \leq 2.2 \cdot 10^{-47}\right)\right):\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 75.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+34} \lor \neg \left(y \leq -220000000 \lor \neg \left(y \leq -4.2 \cdot 10^{-85}\right) \land y \leq 2.7 \cdot 10^{-46}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.19999999999999995e34 or -2.2e8 < y < -4.2e-85 or 2.7e-46 < y

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.19999999999999995e34 < y < -2.2e8 or -4.2e-85 < y < 2.7e-46

    1. Initial program 87.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.2 \cdot 10^{+34} \lor \neg \left(y \leq -220000000 \lor \neg \left(y \leq -4.2 \cdot 10^{-85}\right) \land y \leq 2.7 \cdot 10^{-46}\right):\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 79.0% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;y \leq -8 \cdot 10^{-86} \lor \neg \left(y \leq 3.4 \cdot 10^{-47}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\

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


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

    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
    5. Taylor expanded in t around 0 95.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - y \cdot \frac{1}{z \cdot \color{blue}{3}} \]
      4. div-inv95.5%

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

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

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

    if -8.4999999999999999e37 < y < -8.5e7

    1. Initial program 99.6%

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

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

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

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

        \[\leadsto \left(\color{blue}{\frac{\frac{t}{y}}{z}} - \frac{y}{z}\right) \cdot 0.3333333333333333 \]
      4. sub-div86.5%

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

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

    if -8.5e7 < y < -8.00000000000000068e-86 or 3.4000000000000002e-47 < y

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{z \cdot 3}} \]
    12. Applied egg-rr89.3%

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

    if -8.00000000000000068e-86 < y < 3.4000000000000002e-47

    1. Initial program 86.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t \cdot \frac{0.3333333333333333}{z}}{y}} \]
    11. Applied egg-rr75.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{+37}:\\ \;\;\;\;x - \frac{\frac{y}{z}}{3}\\ \mathbf{elif}\;y \leq -85000000:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\ \mathbf{elif}\;y \leq -8 \cdot 10^{-86} \lor \neg \left(y \leq 3.4 \cdot 10^{-47}\right):\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 78.4% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;y \leq -1.8 \cdot 10^{-87} \lor \neg \left(y \leq 1.2 \cdot 10^{-46}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\

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


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

    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
    5. Taylor expanded in t around 0 95.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - y \cdot \frac{1}{z \cdot \color{blue}{3}} \]
      4. div-inv95.5%

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

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

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

    if -5.19999999999999995e34 < y < -3e8

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3e8 < y < -1.79999999999999996e-87 or 1.20000000000000007e-46 < y

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{z \cdot 3}} \]
    12. Applied egg-rr89.3%

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

    if -1.79999999999999996e-87 < y < 1.20000000000000007e-46

    1. Initial program 86.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t \cdot \frac{0.3333333333333333}{z}}{y}} \]
    11. Applied egg-rr75.2%

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

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

Alternative 11: 76.0% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;y \leq -2.1 \cdot 10^{-87} \lor \neg \left(y \leq 1.42 \cdot 10^{-46}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\

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


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

    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
    5. Taylor expanded in t around 0 95.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - y \cdot \frac{1}{z \cdot \color{blue}{3}} \]
      4. div-inv95.5%

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

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

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

    if -5.19999999999999995e34 < y < -3e8

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3e8 < y < -2.10000000000000007e-87 or 1.42e-46 < y

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{z \cdot 3}} \]
    12. Applied egg-rr89.3%

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

    if -2.10000000000000007e-87 < y < 1.42e-46

    1. Initial program 86.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.2 \cdot 10^{+34}:\\ \;\;\;\;x - \frac{\frac{y}{z}}{3}\\ \mathbf{elif}\;y \leq -300000000:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\ \mathbf{elif}\;y \leq -2.1 \cdot 10^{-87} \lor \neg \left(y \leq 1.42 \cdot 10^{-46}\right):\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.3333333333333333}{z \cdot \frac{y}{t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 75.7% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq -300000000 \lor \neg \left(y \leq -3.7 \cdot 10^{-86}\right) \land y \leq 1.1 \cdot 10^{-46}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\

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


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

    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
    5. Taylor expanded in t around 0 95.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - y \cdot \frac{1}{z \cdot \color{blue}{3}} \]
      4. div-inv95.5%

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

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

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

    if -5.19999999999999995e34 < y < -3e8 or -3.6999999999999998e-86 < y < 1.1e-46

    1. Initial program 87.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3e8 < y < -3.6999999999999998e-86 or 1.1e-46 < y

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{z} \cdot 0.3333333333333333} \]
      2. associate-*l/89.2%

        \[\leadsto x - \color{blue}{\frac{y \cdot 0.3333333333333333}{z}} \]
      3. associate-*r/89.1%

        \[\leadsto x - \color{blue}{y \cdot \frac{0.3333333333333333}{z}} \]
    10. Simplified89.1%

      \[\leadsto x - \color{blue}{y \cdot \frac{0.3333333333333333}{z}} \]
    11. Step-by-step derivation
      1. clear-num89.1%

        \[\leadsto x - y \cdot \color{blue}{\frac{1}{\frac{z}{0.3333333333333333}}} \]
      2. div-inv89.2%

        \[\leadsto x - y \cdot \frac{1}{\color{blue}{z \cdot \frac{1}{0.3333333333333333}}} \]
      3. metadata-eval89.2%

        \[\leadsto x - y \cdot \frac{1}{z \cdot \color{blue}{3}} \]
      4. div-inv89.3%

        \[\leadsto x - \color{blue}{\frac{y}{z \cdot 3}} \]
    12. Applied egg-rr89.3%

      \[\leadsto x - \color{blue}{\frac{y}{z \cdot 3}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification82.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.2 \cdot 10^{+34}:\\ \;\;\;\;x - \frac{\frac{y}{z}}{3}\\ \mathbf{elif}\;y \leq -300000000 \lor \neg \left(y \leq -3.7 \cdot 10^{-86}\right) \land y \leq 1.1 \cdot 10^{-46}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 60.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4.2 \cdot 10^{+60}:\\ \;\;\;\;\frac{\frac{y}{-3}}{z}\\ \mathbf{elif}\;y \leq -20000000 \lor \neg \left(y \leq -1.35 \cdot 10^{-47}\right) \land y \leq 5.3 \cdot 10^{-21}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z \cdot -3}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -4.2e+60)
   (/ (/ y -3.0) z)
   (if (or (<= y -20000000.0) (and (not (<= y -1.35e-47)) (<= y 5.3e-21)))
     (* 0.3333333333333333 (/ (/ t y) z))
     (/ y (* z -3.0)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -4.2e+60) {
		tmp = (y / -3.0) / z;
	} else if ((y <= -20000000.0) || (!(y <= -1.35e-47) && (y <= 5.3e-21))) {
		tmp = 0.3333333333333333 * ((t / y) / z);
	} else {
		tmp = y / (z * -3.0);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (y <= (-4.2d+60)) then
        tmp = (y / (-3.0d0)) / z
    else if ((y <= (-20000000.0d0)) .or. (.not. (y <= (-1.35d-47))) .and. (y <= 5.3d-21)) then
        tmp = 0.3333333333333333d0 * ((t / y) / z)
    else
        tmp = y / (z * (-3.0d0))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -4.2e+60) {
		tmp = (y / -3.0) / z;
	} else if ((y <= -20000000.0) || (!(y <= -1.35e-47) && (y <= 5.3e-21))) {
		tmp = 0.3333333333333333 * ((t / y) / z);
	} else {
		tmp = y / (z * -3.0);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -4.2e+60:
		tmp = (y / -3.0) / z
	elif (y <= -20000000.0) or (not (y <= -1.35e-47) and (y <= 5.3e-21)):
		tmp = 0.3333333333333333 * ((t / y) / z)
	else:
		tmp = y / (z * -3.0)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -4.2e+60)
		tmp = Float64(Float64(y / -3.0) / z);
	elseif ((y <= -20000000.0) || (!(y <= -1.35e-47) && (y <= 5.3e-21)))
		tmp = Float64(0.3333333333333333 * Float64(Float64(t / y) / z));
	else
		tmp = Float64(y / Float64(z * -3.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -4.2e+60)
		tmp = (y / -3.0) / z;
	elseif ((y <= -20000000.0) || (~((y <= -1.35e-47)) && (y <= 5.3e-21)))
		tmp = 0.3333333333333333 * ((t / y) / z);
	else
		tmp = y / (z * -3.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.2e+60], N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision], If[Or[LessEqual[y, -20000000.0], And[N[Not[LessEqual[y, -1.35e-47]], $MachinePrecision], LessEqual[y, 5.3e-21]]], N[(0.3333333333333333 * N[(N[(t / y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+60}:\\
\;\;\;\;\frac{\frac{y}{-3}}{z}\\

\mathbf{elif}\;y \leq -20000000 \lor \neg \left(y \leq -1.35 \cdot 10^{-47}\right) \land y \leq 5.3 \cdot 10^{-21}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\

\mathbf{else}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.2000000000000002e60

    1. Initial program 98.0%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 73.9%

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{t}{y \cdot z} - 0.3333333333333333 \cdot \frac{y}{z}} \]
    4. Taylor expanded in t around 0 72.5%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    5. Step-by-step derivation
      1. metadata-eval72.5%

        \[\leadsto \color{blue}{\frac{-1}{3}} \cdot \frac{y}{z} \]
      2. times-frac72.5%

        \[\leadsto \color{blue}{\frac{-1 \cdot y}{3 \cdot z}} \]
      3. neg-mul-172.5%

        \[\leadsto \frac{\color{blue}{-y}}{3 \cdot z} \]
      4. associate-/l/72.5%

        \[\leadsto \color{blue}{\frac{\frac{-y}{z}}{3}} \]
      5. distribute-frac-neg72.5%

        \[\leadsto \frac{\color{blue}{-\frac{y}{z}}}{3} \]
      6. distribute-frac-neg72.5%

        \[\leadsto \color{blue}{-\frac{\frac{y}{z}}{3}} \]
      7. distribute-neg-frac272.5%

        \[\leadsto \color{blue}{\frac{\frac{y}{z}}{-3}} \]
      8. metadata-eval72.5%

        \[\leadsto \frac{\frac{y}{z}}{\color{blue}{-3}} \]
      9. associate-/l/72.5%

        \[\leadsto \color{blue}{\frac{y}{-3 \cdot z}} \]
      10. associate-/r*72.5%

        \[\leadsto \color{blue}{\frac{\frac{y}{-3}}{z}} \]
    6. Simplified72.5%

      \[\leadsto \color{blue}{\frac{\frac{y}{-3}}{z}} \]

    if -4.2000000000000002e60 < y < -2e7 or -1.3499999999999999e-47 < y < 5.2999999999999999e-21

    1. Initial program 87.9%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Step-by-step derivation
      1. +-commutative87.9%

        \[\leadsto \color{blue}{\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(x - \frac{y}{z \cdot 3}\right)} \]
      2. associate-+r-87.9%

        \[\leadsto \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + x\right) - \frac{y}{z \cdot 3}} \]
      3. sub-neg87.9%

        \[\leadsto \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + x\right) + \left(-\frac{y}{z \cdot 3}\right)} \]
      4. associate-*l*87.9%

        \[\leadsto \left(\frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}} + x\right) + \left(-\frac{y}{z \cdot 3}\right) \]
      5. *-commutative87.9%

        \[\leadsto \left(\frac{t}{z \cdot \color{blue}{\left(y \cdot 3\right)}} + x\right) + \left(-\frac{y}{z \cdot 3}\right) \]
      6. distribute-frac-neg287.9%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{y}{-z \cdot 3}} \]
      7. distribute-rgt-neg-in87.9%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{\color{blue}{z \cdot \left(-3\right)}} \]
      8. metadata-eval87.9%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot \color{blue}{-3}} \]
    3. Simplified87.9%

      \[\leadsto \color{blue}{\left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot -3}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-un-lft-identity87.9%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{\color{blue}{1 \cdot y}}{z \cdot -3} \]
      2. times-frac87.9%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{1}{z} \cdot \frac{y}{-3}} \]
    6. Applied egg-rr87.9%

      \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{1}{z} \cdot \frac{y}{-3}} \]
    7. Step-by-step derivation
      1. associate-*l/87.9%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{1 \cdot \frac{y}{-3}}{z}} \]
      2. *-lft-identity87.9%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{\color{blue}{\frac{y}{-3}}}{z} \]
    8. Simplified87.9%

      \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{\frac{y}{-3}}{z}} \]
    9. Taylor expanded in t around inf 61.3%

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{t}{y \cdot z}} \]
    10. Step-by-step derivation
      1. associate-/r*62.4%

        \[\leadsto 0.3333333333333333 \cdot \color{blue}{\frac{\frac{t}{y}}{z}} \]
    11. Simplified62.4%

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}} \]

    if -2e7 < y < -1.3499999999999999e-47 or 5.2999999999999999e-21 < y

    1. Initial program 99.8%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 70.9%

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{t}{y \cdot z} - 0.3333333333333333 \cdot \frac{y}{z}} \]
    4. Taylor expanded in t around 0 62.5%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    5. Step-by-step derivation
      1. metadata-eval62.5%

        \[\leadsto \color{blue}{\frac{-1}{3}} \cdot \frac{y}{z} \]
      2. times-frac63.6%

        \[\leadsto \color{blue}{\frac{-1 \cdot y}{3 \cdot z}} \]
      3. *-commutative63.6%

        \[\leadsto \frac{-1 \cdot y}{\color{blue}{z \cdot 3}} \]
      4. neg-mul-163.6%

        \[\leadsto \frac{\color{blue}{-y}}{z \cdot 3} \]
      5. distribute-frac-neg63.6%

        \[\leadsto \color{blue}{-\frac{y}{z \cdot 3}} \]
      6. distribute-frac-neg263.6%

        \[\leadsto \color{blue}{\frac{y}{-z \cdot 3}} \]
      7. distribute-rgt-neg-in63.6%

        \[\leadsto \frac{y}{\color{blue}{z \cdot \left(-3\right)}} \]
      8. metadata-eval63.6%

        \[\leadsto \frac{y}{z \cdot \color{blue}{-3}} \]
    6. Simplified63.6%

      \[\leadsto \color{blue}{\frac{y}{z \cdot -3}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification65.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.2 \cdot 10^{+60}:\\ \;\;\;\;\frac{\frac{y}{-3}}{z}\\ \mathbf{elif}\;y \leq -20000000 \lor \neg \left(y \leq -1.35 \cdot 10^{-47}\right) \land y \leq 5.3 \cdot 10^{-21}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z \cdot -3}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 61.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.25 \cdot 10^{+61}:\\ \;\;\;\;\frac{\frac{y}{-3}}{z}\\ \mathbf{elif}\;y \leq -27000000 \lor \neg \left(y \leq -1.9 \cdot 10^{-50}\right) \land y \leq 2.35 \cdot 10^{-21}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z \cdot -3}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -1.25e+61)
   (/ (/ y -3.0) z)
   (if (or (<= y -27000000.0) (and (not (<= y -1.9e-50)) (<= y 2.35e-21)))
     (* 0.3333333333333333 (/ t (* y z)))
     (/ y (* z -3.0)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -1.25e+61) {
		tmp = (y / -3.0) / z;
	} else if ((y <= -27000000.0) || (!(y <= -1.9e-50) && (y <= 2.35e-21))) {
		tmp = 0.3333333333333333 * (t / (y * z));
	} else {
		tmp = y / (z * -3.0);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (y <= (-1.25d+61)) then
        tmp = (y / (-3.0d0)) / z
    else if ((y <= (-27000000.0d0)) .or. (.not. (y <= (-1.9d-50))) .and. (y <= 2.35d-21)) then
        tmp = 0.3333333333333333d0 * (t / (y * z))
    else
        tmp = y / (z * (-3.0d0))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -1.25e+61) {
		tmp = (y / -3.0) / z;
	} else if ((y <= -27000000.0) || (!(y <= -1.9e-50) && (y <= 2.35e-21))) {
		tmp = 0.3333333333333333 * (t / (y * z));
	} else {
		tmp = y / (z * -3.0);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -1.25e+61:
		tmp = (y / -3.0) / z
	elif (y <= -27000000.0) or (not (y <= -1.9e-50) and (y <= 2.35e-21)):
		tmp = 0.3333333333333333 * (t / (y * z))
	else:
		tmp = y / (z * -3.0)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -1.25e+61)
		tmp = Float64(Float64(y / -3.0) / z);
	elseif ((y <= -27000000.0) || (!(y <= -1.9e-50) && (y <= 2.35e-21)))
		tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z)));
	else
		tmp = Float64(y / Float64(z * -3.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -1.25e+61)
		tmp = (y / -3.0) / z;
	elseif ((y <= -27000000.0) || (~((y <= -1.9e-50)) && (y <= 2.35e-21)))
		tmp = 0.3333333333333333 * (t / (y * z));
	else
		tmp = y / (z * -3.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.25e+61], N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision], If[Or[LessEqual[y, -27000000.0], And[N[Not[LessEqual[y, -1.9e-50]], $MachinePrecision], LessEqual[y, 2.35e-21]]], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{+61}:\\
\;\;\;\;\frac{\frac{y}{-3}}{z}\\

\mathbf{elif}\;y \leq -27000000 \lor \neg \left(y \leq -1.9 \cdot 10^{-50}\right) \land y \leq 2.35 \cdot 10^{-21}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\

\mathbf{else}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.25000000000000004e61

    1. Initial program 98.0%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 73.9%

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{t}{y \cdot z} - 0.3333333333333333 \cdot \frac{y}{z}} \]
    4. Taylor expanded in t around 0 72.5%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    5. Step-by-step derivation
      1. metadata-eval72.5%

        \[\leadsto \color{blue}{\frac{-1}{3}} \cdot \frac{y}{z} \]
      2. times-frac72.5%

        \[\leadsto \color{blue}{\frac{-1 \cdot y}{3 \cdot z}} \]
      3. neg-mul-172.5%

        \[\leadsto \frac{\color{blue}{-y}}{3 \cdot z} \]
      4. associate-/l/72.5%

        \[\leadsto \color{blue}{\frac{\frac{-y}{z}}{3}} \]
      5. distribute-frac-neg72.5%

        \[\leadsto \frac{\color{blue}{-\frac{y}{z}}}{3} \]
      6. distribute-frac-neg72.5%

        \[\leadsto \color{blue}{-\frac{\frac{y}{z}}{3}} \]
      7. distribute-neg-frac272.5%

        \[\leadsto \color{blue}{\frac{\frac{y}{z}}{-3}} \]
      8. metadata-eval72.5%

        \[\leadsto \frac{\frac{y}{z}}{\color{blue}{-3}} \]
      9. associate-/l/72.5%

        \[\leadsto \color{blue}{\frac{y}{-3 \cdot z}} \]
      10. associate-/r*72.5%

        \[\leadsto \color{blue}{\frac{\frac{y}{-3}}{z}} \]
    6. Simplified72.5%

      \[\leadsto \color{blue}{\frac{\frac{y}{-3}}{z}} \]

    if -1.25000000000000004e61 < y < -2.7e7 or -1.9e-50 < y < 2.35000000000000015e-21

    1. Initial program 87.9%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Step-by-step derivation
      1. +-commutative87.9%

        \[\leadsto \color{blue}{\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(x - \frac{y}{z \cdot 3}\right)} \]
      2. associate-+r-87.9%

        \[\leadsto \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + x\right) - \frac{y}{z \cdot 3}} \]
      3. sub-neg87.9%

        \[\leadsto \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + x\right) + \left(-\frac{y}{z \cdot 3}\right)} \]
      4. associate-*l*87.9%

        \[\leadsto \left(\frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}} + x\right) + \left(-\frac{y}{z \cdot 3}\right) \]
      5. *-commutative87.9%

        \[\leadsto \left(\frac{t}{z \cdot \color{blue}{\left(y \cdot 3\right)}} + x\right) + \left(-\frac{y}{z \cdot 3}\right) \]
      6. distribute-frac-neg287.9%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{y}{-z \cdot 3}} \]
      7. distribute-rgt-neg-in87.9%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{\color{blue}{z \cdot \left(-3\right)}} \]
      8. metadata-eval87.9%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot \color{blue}{-3}} \]
    3. Simplified87.9%

      \[\leadsto \color{blue}{\left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot -3}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-un-lft-identity87.9%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{\color{blue}{1 \cdot y}}{z \cdot -3} \]
      2. times-frac87.9%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{1}{z} \cdot \frac{y}{-3}} \]
    6. Applied egg-rr87.9%

      \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{1}{z} \cdot \frac{y}{-3}} \]
    7. Step-by-step derivation
      1. associate-*l/87.9%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{1 \cdot \frac{y}{-3}}{z}} \]
      2. *-lft-identity87.9%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{\color{blue}{\frac{y}{-3}}}{z} \]
    8. Simplified87.9%

      \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{\frac{y}{-3}}{z}} \]
    9. Taylor expanded in t around inf 61.3%

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{t}{y \cdot z}} \]

    if -2.7e7 < y < -1.9e-50 or 2.35000000000000015e-21 < y

    1. Initial program 99.8%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 70.9%

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{t}{y \cdot z} - 0.3333333333333333 \cdot \frac{y}{z}} \]
    4. Taylor expanded in t around 0 62.5%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    5. Step-by-step derivation
      1. metadata-eval62.5%

        \[\leadsto \color{blue}{\frac{-1}{3}} \cdot \frac{y}{z} \]
      2. times-frac63.6%

        \[\leadsto \color{blue}{\frac{-1 \cdot y}{3 \cdot z}} \]
      3. *-commutative63.6%

        \[\leadsto \frac{-1 \cdot y}{\color{blue}{z \cdot 3}} \]
      4. neg-mul-163.6%

        \[\leadsto \frac{\color{blue}{-y}}{z \cdot 3} \]
      5. distribute-frac-neg63.6%

        \[\leadsto \color{blue}{-\frac{y}{z \cdot 3}} \]
      6. distribute-frac-neg263.6%

        \[\leadsto \color{blue}{\frac{y}{-z \cdot 3}} \]
      7. distribute-rgt-neg-in63.6%

        \[\leadsto \frac{y}{\color{blue}{z \cdot \left(-3\right)}} \]
      8. metadata-eval63.6%

        \[\leadsto \frac{y}{z \cdot \color{blue}{-3}} \]
    6. Simplified63.6%

      \[\leadsto \color{blue}{\frac{y}{z \cdot -3}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification64.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.25 \cdot 10^{+61}:\\ \;\;\;\;\frac{\frac{y}{-3}}{z}\\ \mathbf{elif}\;y \leq -27000000 \lor \neg \left(y \leq -1.9 \cdot 10^{-50}\right) \land y \leq 2.35 \cdot 10^{-21}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z \cdot -3}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 75.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\ t_2 := x - \frac{y}{z} \cdot 0.3333333333333333\\ \mathbf{if}\;y \leq -5.2 \cdot 10^{+34}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -300000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -4.7 \cdot 10^{-85}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{-47}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* 0.3333333333333333 (/ (/ t y) z)))
        (t_2 (- x (* (/ y z) 0.3333333333333333))))
   (if (<= y -5.2e+34)
     t_2
     (if (<= y -300000000.0)
       t_1
       (if (<= y -4.7e-85)
         t_2
         (if (<= y 3.5e-47) t_1 (+ x (* y (/ -0.3333333333333333 z)))))))))
double code(double x, double y, double z, double t) {
	double t_1 = 0.3333333333333333 * ((t / y) / z);
	double t_2 = x - ((y / z) * 0.3333333333333333);
	double tmp;
	if (y <= -5.2e+34) {
		tmp = t_2;
	} else if (y <= -300000000.0) {
		tmp = t_1;
	} else if (y <= -4.7e-85) {
		tmp = t_2;
	} else if (y <= 3.5e-47) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = 0.3333333333333333d0 * ((t / y) / z)
    t_2 = x - ((y / z) * 0.3333333333333333d0)
    if (y <= (-5.2d+34)) then
        tmp = t_2
    else if (y <= (-300000000.0d0)) then
        tmp = t_1
    else if (y <= (-4.7d-85)) then
        tmp = t_2
    else if (y <= 3.5d-47) then
        tmp = t_1
    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 t_1 = 0.3333333333333333 * ((t / y) / z);
	double t_2 = x - ((y / z) * 0.3333333333333333);
	double tmp;
	if (y <= -5.2e+34) {
		tmp = t_2;
	} else if (y <= -300000000.0) {
		tmp = t_1;
	} else if (y <= -4.7e-85) {
		tmp = t_2;
	} else if (y <= 3.5e-47) {
		tmp = t_1;
	} else {
		tmp = x + (y * (-0.3333333333333333 / z));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = 0.3333333333333333 * ((t / y) / z)
	t_2 = x - ((y / z) * 0.3333333333333333)
	tmp = 0
	if y <= -5.2e+34:
		tmp = t_2
	elif y <= -300000000.0:
		tmp = t_1
	elif y <= -4.7e-85:
		tmp = t_2
	elif y <= 3.5e-47:
		tmp = t_1
	else:
		tmp = x + (y * (-0.3333333333333333 / z))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(0.3333333333333333 * Float64(Float64(t / y) / z))
	t_2 = Float64(x - Float64(Float64(y / z) * 0.3333333333333333))
	tmp = 0.0
	if (y <= -5.2e+34)
		tmp = t_2;
	elseif (y <= -300000000.0)
		tmp = t_1;
	elseif (y <= -4.7e-85)
		tmp = t_2;
	elseif (y <= 3.5e-47)
		tmp = t_1;
	else
		tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = 0.3333333333333333 * ((t / y) / z);
	t_2 = x - ((y / z) * 0.3333333333333333);
	tmp = 0.0;
	if (y <= -5.2e+34)
		tmp = t_2;
	elseif (y <= -300000000.0)
		tmp = t_1;
	elseif (y <= -4.7e-85)
		tmp = t_2;
	elseif (y <= 3.5e-47)
		tmp = t_1;
	else
		tmp = x + (y * (-0.3333333333333333 / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(0.3333333333333333 * N[(N[(t / y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.2e+34], t$95$2, If[LessEqual[y, -300000000.0], t$95$1, If[LessEqual[y, -4.7e-85], t$95$2, If[LessEqual[y, 3.5e-47], t$95$1, N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := 0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\
t_2 := x - \frac{y}{z} \cdot 0.3333333333333333\\
\mathbf{if}\;y \leq -5.2 \cdot 10^{+34}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq -300000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -4.7 \cdot 10^{-85}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq 3.5 \cdot 10^{-47}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.19999999999999995e34 or -3e8 < y < -4.70000000000000009e-85

    1. Initial program 97.2%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 93.7%

      \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]

    if -5.19999999999999995e34 < y < -3e8 or -4.70000000000000009e-85 < y < 3.4999999999999998e-47

    1. Initial program 87.3%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Step-by-step derivation
      1. +-commutative87.3%

        \[\leadsto \color{blue}{\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(x - \frac{y}{z \cdot 3}\right)} \]
      2. associate-+r-87.3%

        \[\leadsto \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + x\right) - \frac{y}{z \cdot 3}} \]
      3. sub-neg87.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*87.3%

        \[\leadsto \left(\frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}} + x\right) + \left(-\frac{y}{z \cdot 3}\right) \]
      5. *-commutative87.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-neg287.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-in87.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-eval87.3%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot \color{blue}{-3}} \]
    3. Simplified87.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. Step-by-step derivation
      1. *-un-lft-identity87.3%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{\color{blue}{1 \cdot y}}{z \cdot -3} \]
      2. times-frac87.3%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{1}{z} \cdot \frac{y}{-3}} \]
    6. Applied egg-rr87.3%

      \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{1}{z} \cdot \frac{y}{-3}} \]
    7. Step-by-step derivation
      1. associate-*l/87.3%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{1 \cdot \frac{y}{-3}}{z}} \]
      2. *-lft-identity87.3%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{\color{blue}{\frac{y}{-3}}}{z} \]
    8. Simplified87.3%

      \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{\frac{y}{-3}}{z}} \]
    9. Taylor expanded in t around inf 65.6%

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{t}{y \cdot z}} \]
    10. Step-by-step derivation
      1. associate-/r*67.7%

        \[\leadsto 0.3333333333333333 \cdot \color{blue}{\frac{\frac{t}{y}}{z}} \]
    11. Simplified67.7%

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}} \]

    if 3.4999999999999998e-47 < y

    1. Initial program 99.8%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Step-by-step derivation
      1. sub-neg99.8%

        \[\leadsto \color{blue}{\left(x + \left(-\frac{y}{z \cdot 3}\right)\right)} + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      2. associate-+l+99.8%

        \[\leadsto \color{blue}{x + \left(\left(-\frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      3. +-commutative99.8%

        \[\leadsto x + \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(-\frac{y}{z \cdot 3}\right)\right)} \]
      4. remove-double-neg99.8%

        \[\leadsto x + \left(\color{blue}{\left(-\left(-\frac{t}{\left(z \cdot 3\right) \cdot y}\right)\right)} + \left(-\frac{y}{z \cdot 3}\right)\right) \]
      5. distribute-frac-neg99.8%

        \[\leadsto x + \left(\left(-\color{blue}{\frac{-t}{\left(z \cdot 3\right) \cdot y}}\right) + \left(-\frac{y}{z \cdot 3}\right)\right) \]
      6. distribute-neg-in99.8%

        \[\leadsto x + \color{blue}{\left(-\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} + \frac{y}{z \cdot 3}\right)\right)} \]
      7. remove-double-neg99.8%

        \[\leadsto x + \left(-\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} + \color{blue}{\left(-\left(-\frac{y}{z \cdot 3}\right)\right)}\right)\right) \]
      8. sub-neg99.8%

        \[\leadsto x + \left(-\color{blue}{\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} - \left(-\frac{y}{z \cdot 3}\right)\right)}\right) \]
      9. neg-mul-199.8%

        \[\leadsto x + \left(-\left(\frac{\color{blue}{-1 \cdot t}}{\left(z \cdot 3\right) \cdot y} - \left(-\frac{y}{z \cdot 3}\right)\right)\right) \]
      10. times-frac99.8%

        \[\leadsto x + \left(-\left(\color{blue}{\frac{-1}{z \cdot 3} \cdot \frac{t}{y}} - \left(-\frac{y}{z \cdot 3}\right)\right)\right) \]
      11. distribute-frac-neg99.8%

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{\frac{-y}{z \cdot 3}}\right)\right) \]
      12. neg-mul-199.8%

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \frac{\color{blue}{-1 \cdot y}}{z \cdot 3}\right)\right) \]
      13. *-commutative99.8%

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \frac{\color{blue}{y \cdot -1}}{z \cdot 3}\right)\right) \]
      14. associate-/l*99.7%

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{y \cdot \frac{-1}{z \cdot 3}}\right)\right) \]
      15. *-commutative99.7%

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{\frac{-1}{z \cdot 3} \cdot y}\right)\right) \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 88.7%

      \[\leadsto x + \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    6. Step-by-step derivation
      1. metadata-eval88.7%

        \[\leadsto x + \color{blue}{\left(-0.3333333333333333\right)} \cdot \frac{y}{z} \]
      2. distribute-lft-neg-in88.7%

        \[\leadsto x + \color{blue}{\left(-0.3333333333333333 \cdot \frac{y}{z}\right)} \]
      3. *-commutative88.7%

        \[\leadsto x + \left(-\color{blue}{\frac{y}{z} \cdot 0.3333333333333333}\right) \]
      4. associate-*l/89.7%

        \[\leadsto x + \left(-\color{blue}{\frac{y \cdot 0.3333333333333333}{z}}\right) \]
      5. associate-*r/89.7%

        \[\leadsto x + \left(-\color{blue}{y \cdot \frac{0.3333333333333333}{z}}\right) \]
      6. distribute-rgt-neg-out89.7%

        \[\leadsto x + \color{blue}{y \cdot \left(-\frac{0.3333333333333333}{z}\right)} \]
      7. distribute-neg-frac89.7%

        \[\leadsto x + y \cdot \color{blue}{\frac{-0.3333333333333333}{z}} \]
      8. metadata-eval89.7%

        \[\leadsto x + y \cdot \frac{\color{blue}{-0.3333333333333333}}{z} \]
    7. Simplified89.7%

      \[\leadsto x + \color{blue}{y \cdot \frac{-0.3333333333333333}{z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification82.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.2 \cdot 10^{+34}:\\ \;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\ \mathbf{elif}\;y \leq -300000000:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\ \mathbf{elif}\;y \leq -4.7 \cdot 10^{-85}:\\ \;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{-47}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 97.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.3 \cdot 10^{-87} \lor \neg \left(y \leq 4.5 \cdot 10^{-203}\right):\\ \;\;\;\;x + \left(\frac{t}{y} - y\right) \cdot \frac{0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= y -3.3e-87) (not (<= y 4.5e-203)))
   (+ x (* (- (/ t y) y) (/ 0.3333333333333333 z)))
   (+ x (* 0.3333333333333333 (/ (/ t z) y)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((y <= -3.3e-87) || !(y <= 4.5e-203)) {
		tmp = x + (((t / y) - y) * (0.3333333333333333 / z));
	} 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 <= (-3.3d-87)) .or. (.not. (y <= 4.5d-203))) then
        tmp = x + (((t / y) - y) * (0.3333333333333333d0 / z))
    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 <= -3.3e-87) || !(y <= 4.5e-203)) {
		tmp = x + (((t / y) - y) * (0.3333333333333333 / z));
	} else {
		tmp = x + (0.3333333333333333 * ((t / z) / y));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (y <= -3.3e-87) or not (y <= 4.5e-203):
		tmp = x + (((t / y) - y) * (0.3333333333333333 / z))
	else:
		tmp = x + (0.3333333333333333 * ((t / z) / y))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((y <= -3.3e-87) || !(y <= 4.5e-203))
		tmp = Float64(x + Float64(Float64(Float64(t / y) - y) * Float64(0.3333333333333333 / z)));
	else
		tmp = Float64(x + Float64(0.3333333333333333 * Float64(Float64(t / z) / y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((y <= -3.3e-87) || ~((y <= 4.5e-203)))
		tmp = x + (((t / y) - y) * (0.3333333333333333 / z));
	else
		tmp = x + (0.3333333333333333 * ((t / z) / y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.3e-87], N[Not[LessEqual[y, 4.5e-203]], $MachinePrecision]], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{-87} \lor \neg \left(y \leq 4.5 \cdot 10^{-203}\right):\\
\;\;\;\;x + \left(\frac{t}{y} - y\right) \cdot \frac{0.3333333333333333}{z}\\

\mathbf{else}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.3e-87 or 4.5000000000000002e-203 < y

    1. Initial program 97.2%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Step-by-step derivation
      1. sub-neg97.2%

        \[\leadsto \color{blue}{\left(x + \left(-\frac{y}{z \cdot 3}\right)\right)} + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      2. associate-+l+97.2%

        \[\leadsto \color{blue}{x + \left(\left(-\frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      3. +-commutative97.2%

        \[\leadsto x + \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(-\frac{y}{z \cdot 3}\right)\right)} \]
      4. remove-double-neg97.2%

        \[\leadsto x + \left(\color{blue}{\left(-\left(-\frac{t}{\left(z \cdot 3\right) \cdot y}\right)\right)} + \left(-\frac{y}{z \cdot 3}\right)\right) \]
      5. distribute-frac-neg97.2%

        \[\leadsto x + \left(\left(-\color{blue}{\frac{-t}{\left(z \cdot 3\right) \cdot y}}\right) + \left(-\frac{y}{z \cdot 3}\right)\right) \]
      6. distribute-neg-in97.2%

        \[\leadsto x + \color{blue}{\left(-\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} + \frac{y}{z \cdot 3}\right)\right)} \]
      7. remove-double-neg97.2%

        \[\leadsto x + \left(-\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} + \color{blue}{\left(-\left(-\frac{y}{z \cdot 3}\right)\right)}\right)\right) \]
      8. sub-neg97.2%

        \[\leadsto x + \left(-\color{blue}{\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} - \left(-\frac{y}{z \cdot 3}\right)\right)}\right) \]
      9. neg-mul-197.2%

        \[\leadsto x + \left(-\left(\frac{\color{blue}{-1 \cdot t}}{\left(z \cdot 3\right) \cdot y} - \left(-\frac{y}{z \cdot 3}\right)\right)\right) \]
      10. times-frac98.3%

        \[\leadsto x + \left(-\left(\color{blue}{\frac{-1}{z \cdot 3} \cdot \frac{t}{y}} - \left(-\frac{y}{z \cdot 3}\right)\right)\right) \]
      11. distribute-frac-neg98.3%

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{\frac{-y}{z \cdot 3}}\right)\right) \]
      12. neg-mul-198.3%

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \frac{\color{blue}{-1 \cdot y}}{z \cdot 3}\right)\right) \]
      13. *-commutative98.3%

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \frac{\color{blue}{y \cdot -1}}{z \cdot 3}\right)\right) \]
      14. associate-/l*98.2%

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{y \cdot \frac{-1}{z \cdot 3}}\right)\right) \]
      15. *-commutative98.2%

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{\frac{-1}{z \cdot 3} \cdot y}\right)\right) \]
    3. Simplified98.7%

      \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    4. Add Preprocessing

    if -3.3e-87 < y < 4.5000000000000002e-203

    1. Initial program 85.5%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Step-by-step derivation
      1. sub-neg85.5%

        \[\leadsto \color{blue}{\left(x + \left(-\frac{y}{z \cdot 3}\right)\right)} + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      2. associate-+l+85.5%

        \[\leadsto \color{blue}{x + \left(\left(-\frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      3. +-commutative85.5%

        \[\leadsto x + \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(-\frac{y}{z \cdot 3}\right)\right)} \]
      4. remove-double-neg85.5%

        \[\leadsto x + \left(\color{blue}{\left(-\left(-\frac{t}{\left(z \cdot 3\right) \cdot y}\right)\right)} + \left(-\frac{y}{z \cdot 3}\right)\right) \]
      5. distribute-frac-neg85.5%

        \[\leadsto x + \left(\left(-\color{blue}{\frac{-t}{\left(z \cdot 3\right) \cdot y}}\right) + \left(-\frac{y}{z \cdot 3}\right)\right) \]
      6. distribute-neg-in85.5%

        \[\leadsto x + \color{blue}{\left(-\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} + \frac{y}{z \cdot 3}\right)\right)} \]
      7. remove-double-neg85.5%

        \[\leadsto x + \left(-\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} + \color{blue}{\left(-\left(-\frac{y}{z \cdot 3}\right)\right)}\right)\right) \]
      8. sub-neg85.5%

        \[\leadsto x + \left(-\color{blue}{\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} - \left(-\frac{y}{z \cdot 3}\right)\right)}\right) \]
      9. neg-mul-185.5%

        \[\leadsto x + \left(-\left(\frac{\color{blue}{-1 \cdot t}}{\left(z \cdot 3\right) \cdot y} - \left(-\frac{y}{z \cdot 3}\right)\right)\right) \]
      10. times-frac84.3%

        \[\leadsto x + \left(-\left(\color{blue}{\frac{-1}{z \cdot 3} \cdot \frac{t}{y}} - \left(-\frac{y}{z \cdot 3}\right)\right)\right) \]
      11. distribute-frac-neg84.3%

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{\frac{-y}{z \cdot 3}}\right)\right) \]
      12. neg-mul-184.3%

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \frac{\color{blue}{-1 \cdot y}}{z \cdot 3}\right)\right) \]
      13. *-commutative84.3%

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \frac{\color{blue}{y \cdot -1}}{z \cdot 3}\right)\right) \]
      14. associate-/l*84.3%

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{y \cdot \frac{-1}{z \cdot 3}}\right)\right) \]
      15. *-commutative84.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. Simplified84.3%

      \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 85.5%

      \[\leadsto x + \color{blue}{0.3333333333333333 \cdot \frac{t}{y \cdot z}} \]
    6. Step-by-step derivation
      1. *-commutative85.5%

        \[\leadsto x + \color{blue}{\frac{t}{y \cdot z} \cdot 0.3333333333333333} \]
      2. metadata-eval85.5%

        \[\leadsto x + \frac{t}{y \cdot z} \cdot \color{blue}{\frac{1}{3}} \]
      3. times-frac85.6%

        \[\leadsto x + \color{blue}{\frac{t \cdot 1}{\left(y \cdot z\right) \cdot 3}} \]
      4. *-commutative85.6%

        \[\leadsto x + \frac{t \cdot 1}{\color{blue}{\left(z \cdot y\right)} \cdot 3} \]
      5. associate-*r*85.5%

        \[\leadsto x + \frac{t \cdot 1}{\color{blue}{z \cdot \left(y \cdot 3\right)}} \]
      6. *-rgt-identity85.5%

        \[\leadsto x + \frac{\color{blue}{t}}{z \cdot \left(y \cdot 3\right)} \]
      7. associate-/r*99.7%

        \[\leadsto x + \color{blue}{\frac{\frac{t}{z}}{y \cdot 3}} \]
      8. *-lft-identity99.7%

        \[\leadsto x + \frac{\color{blue}{1 \cdot \frac{t}{z}}}{y \cdot 3} \]
      9. *-commutative99.7%

        \[\leadsto x + \frac{1 \cdot \frac{t}{z}}{\color{blue}{3 \cdot y}} \]
      10. times-frac99.6%

        \[\leadsto x + \color{blue}{\frac{1}{3} \cdot \frac{\frac{t}{z}}{y}} \]
      11. metadata-eval99.6%

        \[\leadsto x + \color{blue}{0.3333333333333333} \cdot \frac{\frac{t}{z}}{y} \]
    7. Simplified99.6%

      \[\leadsto x + \color{blue}{0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.3 \cdot 10^{-87} \lor \neg \left(y \leq 4.5 \cdot 10^{-203}\right):\\ \;\;\;\;x + \left(\frac{t}{y} - y\right) \cdot \frac{0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 96.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 1.2 \cdot 10^{-86}:\\ \;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\left(x + \frac{t}{z \cdot \left(y \cdot 3\right)}\right) + \frac{\frac{y}{-3}}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= t 1.2e-86)
   (+ x (/ (- (/ t y) y) (* z 3.0)))
   (+ (+ x (/ t (* z (* y 3.0)))) (/ (/ y -3.0) z))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= 1.2e-86) {
		tmp = x + (((t / y) - y) / (z * 3.0));
	} else {
		tmp = (x + (t / (z * (y * 3.0)))) + ((y / -3.0) / z);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= 1.2d-86) then
        tmp = x + (((t / y) - y) / (z * 3.0d0))
    else
        tmp = (x + (t / (z * (y * 3.0d0)))) + ((y / (-3.0d0)) / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= 1.2e-86) {
		tmp = x + (((t / y) - y) / (z * 3.0));
	} else {
		tmp = (x + (t / (z * (y * 3.0)))) + ((y / -3.0) / z);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if t <= 1.2e-86:
		tmp = x + (((t / y) - y) / (z * 3.0))
	else:
		tmp = (x + (t / (z * (y * 3.0)))) + ((y / -3.0) / z)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (t <= 1.2e-86)
		tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0)));
	else
		tmp = Float64(Float64(x + Float64(t / Float64(z * Float64(y * 3.0)))) + Float64(Float64(y / -3.0) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (t <= 1.2e-86)
		tmp = x + (((t / y) - y) / (z * 3.0));
	else
		tmp = (x + (t / (z * (y * 3.0)))) + ((y / -3.0) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[t, 1.2e-86], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.2 \cdot 10^{-86}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\

\mathbf{else}:\\
\;\;\;\;\left(x + \frac{t}{z \cdot \left(y \cdot 3\right)}\right) + \frac{\frac{y}{-3}}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.20000000000000007e-86

    1. Initial program 92.0%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Step-by-step derivation
      1. sub-neg92.0%

        \[\leadsto \color{blue}{\left(x + \left(-\frac{y}{z \cdot 3}\right)\right)} + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      2. associate-+l+92.0%

        \[\leadsto \color{blue}{x + \left(\left(-\frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      3. +-commutative92.0%

        \[\leadsto x + \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(-\frac{y}{z \cdot 3}\right)\right)} \]
      4. remove-double-neg92.0%

        \[\leadsto x + \left(\color{blue}{\left(-\left(-\frac{t}{\left(z \cdot 3\right) \cdot y}\right)\right)} + \left(-\frac{y}{z \cdot 3}\right)\right) \]
      5. distribute-frac-neg92.0%

        \[\leadsto x + \left(\left(-\color{blue}{\frac{-t}{\left(z \cdot 3\right) \cdot y}}\right) + \left(-\frac{y}{z \cdot 3}\right)\right) \]
      6. distribute-neg-in92.0%

        \[\leadsto x + \color{blue}{\left(-\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} + \frac{y}{z \cdot 3}\right)\right)} \]
      7. remove-double-neg92.0%

        \[\leadsto x + \left(-\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} + \color{blue}{\left(-\left(-\frac{y}{z \cdot 3}\right)\right)}\right)\right) \]
      8. sub-neg92.0%

        \[\leadsto x + \left(-\color{blue}{\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} - \left(-\frac{y}{z \cdot 3}\right)\right)}\right) \]
      9. neg-mul-192.0%

        \[\leadsto x + \left(-\left(\frac{\color{blue}{-1 \cdot t}}{\left(z \cdot 3\right) \cdot y} - \left(-\frac{y}{z \cdot 3}\right)\right)\right) \]
      10. times-frac98.1%

        \[\leadsto x + \left(-\left(\color{blue}{\frac{-1}{z \cdot 3} \cdot \frac{t}{y}} - \left(-\frac{y}{z \cdot 3}\right)\right)\right) \]
      11. distribute-frac-neg98.1%

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{\frac{-y}{z \cdot 3}}\right)\right) \]
      12. neg-mul-198.1%

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \frac{\color{blue}{-1 \cdot y}}{z \cdot 3}\right)\right) \]
      13. *-commutative98.1%

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \frac{\color{blue}{y \cdot -1}}{z \cdot 3}\right)\right) \]
      14. associate-/l*98.0%

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{y \cdot \frac{-1}{z \cdot 3}}\right)\right) \]
      15. *-commutative98.0%

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{\frac{-1}{z \cdot 3} \cdot y}\right)\right) \]
    3. Simplified98.0%

      \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative98.0%

        \[\leadsto x + \color{blue}{\left(\frac{t}{y} - y\right) \cdot \frac{0.3333333333333333}{z}} \]
      2. clear-num97.9%

        \[\leadsto x + \left(\frac{t}{y} - y\right) \cdot \color{blue}{\frac{1}{\frac{z}{0.3333333333333333}}} \]
      3. div-inv98.0%

        \[\leadsto x + \left(\frac{t}{y} - y\right) \cdot \frac{1}{\color{blue}{z \cdot \frac{1}{0.3333333333333333}}} \]
      4. metadata-eval98.0%

        \[\leadsto x + \left(\frac{t}{y} - y\right) \cdot \frac{1}{z \cdot \color{blue}{3}} \]
      5. un-div-inv98.1%

        \[\leadsto x + \color{blue}{\frac{\frac{t}{y} - y}{z \cdot 3}} \]
    6. Applied egg-rr98.1%

      \[\leadsto x + \color{blue}{\frac{\frac{t}{y} - y}{z \cdot 3}} \]

    if 1.20000000000000007e-86 < t

    1. Initial program 98.6%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Step-by-step derivation
      1. +-commutative98.6%

        \[\leadsto \color{blue}{\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(x - \frac{y}{z \cdot 3}\right)} \]
      2. associate-+r-98.6%

        \[\leadsto \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + x\right) - \frac{y}{z \cdot 3}} \]
      3. sub-neg98.6%

        \[\leadsto \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + x\right) + \left(-\frac{y}{z \cdot 3}\right)} \]
      4. associate-*l*98.6%

        \[\leadsto \left(\frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}} + x\right) + \left(-\frac{y}{z \cdot 3}\right) \]
      5. *-commutative98.6%

        \[\leadsto \left(\frac{t}{z \cdot \color{blue}{\left(y \cdot 3\right)}} + x\right) + \left(-\frac{y}{z \cdot 3}\right) \]
      6. distribute-frac-neg298.6%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{y}{-z \cdot 3}} \]
      7. distribute-rgt-neg-in98.6%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{\color{blue}{z \cdot \left(-3\right)}} \]
      8. metadata-eval98.6%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot \color{blue}{-3}} \]
    3. Simplified98.6%

      \[\leadsto \color{blue}{\left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot -3}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-un-lft-identity98.6%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{\color{blue}{1 \cdot y}}{z \cdot -3} \]
      2. times-frac98.6%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{1}{z} \cdot \frac{y}{-3}} \]
    6. Applied egg-rr98.6%

      \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{1}{z} \cdot \frac{y}{-3}} \]
    7. Step-by-step derivation
      1. associate-*l/98.6%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{1 \cdot \frac{y}{-3}}{z}} \]
      2. *-lft-identity98.6%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{\color{blue}{\frac{y}{-3}}}{z} \]
    8. Simplified98.6%

      \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{\frac{y}{-3}}{z}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.2 \cdot 10^{-86}:\\ \;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\left(x + \frac{t}{z \cdot \left(y \cdot 3\right)}\right) + \frac{\frac{y}{-3}}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 96.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 5 \cdot 10^{-30}:\\ \;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\left(x + \frac{t}{z \cdot \left(y \cdot 3\right)}\right) + \frac{y}{z \cdot -3}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= t 5e-30)
   (+ x (/ (- (/ t y) y) (* z 3.0)))
   (+ (+ x (/ t (* z (* y 3.0)))) (/ y (* z -3.0)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= 5e-30) {
		tmp = x + (((t / y) - y) / (z * 3.0));
	} else {
		tmp = (x + (t / (z * (y * 3.0)))) + (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 (t <= 5d-30) then
        tmp = x + (((t / y) - y) / (z * 3.0d0))
    else
        tmp = (x + (t / (z * (y * 3.0d0)))) + (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 (t <= 5e-30) {
		tmp = x + (((t / y) - y) / (z * 3.0));
	} else {
		tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if t <= 5e-30:
		tmp = x + (((t / y) - y) / (z * 3.0))
	else:
		tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (t <= 5e-30)
		tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0)));
	else
		tmp = Float64(Float64(x + Float64(t / Float64(z * Float64(y * 3.0)))) + Float64(y / Float64(z * -3.0)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (t <= 5e-30)
		tmp = x + (((t / y) - y) / (z * 3.0));
	else
		tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[t, 5e-30], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq 5 \cdot 10^{-30}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\

\mathbf{else}:\\
\;\;\;\;\left(x + \frac{t}{z \cdot \left(y \cdot 3\right)}\right) + \frac{y}{z \cdot -3}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 4.99999999999999972e-30

    1. Initial program 92.5%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Step-by-step derivation
      1. sub-neg92.5%

        \[\leadsto \color{blue}{\left(x + \left(-\frac{y}{z \cdot 3}\right)\right)} + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      2. associate-+l+92.5%

        \[\leadsto \color{blue}{x + \left(\left(-\frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      3. +-commutative92.5%

        \[\leadsto x + \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(-\frac{y}{z \cdot 3}\right)\right)} \]
      4. remove-double-neg92.5%

        \[\leadsto x + \left(\color{blue}{\left(-\left(-\frac{t}{\left(z \cdot 3\right) \cdot y}\right)\right)} + \left(-\frac{y}{z \cdot 3}\right)\right) \]
      5. distribute-frac-neg92.5%

        \[\leadsto x + \left(\left(-\color{blue}{\frac{-t}{\left(z \cdot 3\right) \cdot y}}\right) + \left(-\frac{y}{z \cdot 3}\right)\right) \]
      6. distribute-neg-in92.5%

        \[\leadsto x + \color{blue}{\left(-\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} + \frac{y}{z \cdot 3}\right)\right)} \]
      7. remove-double-neg92.5%

        \[\leadsto x + \left(-\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} + \color{blue}{\left(-\left(-\frac{y}{z \cdot 3}\right)\right)}\right)\right) \]
      8. sub-neg92.5%

        \[\leadsto x + \left(-\color{blue}{\left(\frac{-t}{\left(z \cdot 3\right) \cdot y} - \left(-\frac{y}{z \cdot 3}\right)\right)}\right) \]
      9. neg-mul-192.5%

        \[\leadsto x + \left(-\left(\frac{\color{blue}{-1 \cdot t}}{\left(z \cdot 3\right) \cdot y} - \left(-\frac{y}{z \cdot 3}\right)\right)\right) \]
      10. times-frac98.2%

        \[\leadsto x + \left(-\left(\color{blue}{\frac{-1}{z \cdot 3} \cdot \frac{t}{y}} - \left(-\frac{y}{z \cdot 3}\right)\right)\right) \]
      11. distribute-frac-neg98.2%

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{\frac{-y}{z \cdot 3}}\right)\right) \]
      12. neg-mul-198.2%

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \frac{\color{blue}{-1 \cdot y}}{z \cdot 3}\right)\right) \]
      13. *-commutative98.2%

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \frac{\color{blue}{y \cdot -1}}{z \cdot 3}\right)\right) \]
      14. associate-/l*98.1%

        \[\leadsto x + \left(-\left(\frac{-1}{z \cdot 3} \cdot \frac{t}{y} - \color{blue}{y \cdot \frac{-1}{z \cdot 3}}\right)\right) \]
      15. *-commutative98.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. Simplified98.1%

      \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative98.1%

        \[\leadsto x + \color{blue}{\left(\frac{t}{y} - y\right) \cdot \frac{0.3333333333333333}{z}} \]
      2. clear-num98.1%

        \[\leadsto x + \left(\frac{t}{y} - y\right) \cdot \color{blue}{\frac{1}{\frac{z}{0.3333333333333333}}} \]
      3. div-inv98.1%

        \[\leadsto x + \left(\frac{t}{y} - y\right) \cdot \frac{1}{\color{blue}{z \cdot \frac{1}{0.3333333333333333}}} \]
      4. metadata-eval98.1%

        \[\leadsto x + \left(\frac{t}{y} - y\right) \cdot \frac{1}{z \cdot \color{blue}{3}} \]
      5. un-div-inv98.2%

        \[\leadsto x + \color{blue}{\frac{\frac{t}{y} - y}{z \cdot 3}} \]
    6. Applied egg-rr98.2%

      \[\leadsto x + \color{blue}{\frac{\frac{t}{y} - y}{z \cdot 3}} \]

    if 4.99999999999999972e-30 < t

    1. Initial program 98.4%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Step-by-step derivation
      1. +-commutative98.4%

        \[\leadsto \color{blue}{\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(x - \frac{y}{z \cdot 3}\right)} \]
      2. associate-+r-98.4%

        \[\leadsto \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + x\right) - \frac{y}{z \cdot 3}} \]
      3. sub-neg98.4%

        \[\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.5%

        \[\leadsto \left(\frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}} + x\right) + \left(-\frac{y}{z \cdot 3}\right) \]
      5. *-commutative98.5%

        \[\leadsto \left(\frac{t}{z \cdot \color{blue}{\left(y \cdot 3\right)}} + x\right) + \left(-\frac{y}{z \cdot 3}\right) \]
      6. distribute-frac-neg298.5%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{y}{-z \cdot 3}} \]
      7. distribute-rgt-neg-in98.5%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{\color{blue}{z \cdot \left(-3\right)}} \]
      8. metadata-eval98.5%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot \color{blue}{-3}} \]
    3. Simplified98.5%

      \[\leadsto \color{blue}{\left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot -3}} \]
    4. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification98.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 5 \cdot 10^{-30}:\\ \;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\left(x + \frac{t}{z \cdot \left(y \cdot 3\right)}\right) + \frac{y}{z \cdot -3}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 46.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.75 \cdot 10^{+72}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.02 \cdot 10^{+183}:\\ \;\;\;\;\frac{\frac{y}{-3}}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= x -1.75e+72) x (if (<= x 1.02e+183) (/ (/ y -3.0) z) x)))
double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -1.75e+72) {
		tmp = x;
	} else if (x <= 1.02e+183) {
		tmp = (y / -3.0) / z;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (x <= (-1.75d+72)) then
        tmp = x
    else if (x <= 1.02d+183) then
        tmp = (y / (-3.0d0)) / z
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -1.75e+72) {
		tmp = x;
	} else if (x <= 1.02e+183) {
		tmp = (y / -3.0) / z;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if x <= -1.75e+72:
		tmp = x
	elif x <= 1.02e+183:
		tmp = (y / -3.0) / z
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (x <= -1.75e+72)
		tmp = x;
	elseif (x <= 1.02e+183)
		tmp = Float64(Float64(y / -3.0) / z);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (x <= -1.75e+72)
		tmp = x;
	elseif (x <= 1.02e+183)
		tmp = (y / -3.0) / z;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.75e+72], x, If[LessEqual[x, 1.02e+183], N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.75 \cdot 10^{+72}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 1.02 \cdot 10^{+183}:\\
\;\;\;\;\frac{\frac{y}{-3}}{z}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.75000000000000005e72 or 1.02000000000000002e183 < x

    1. Initial program 94.7%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Step-by-step derivation
      1. +-commutative94.7%

        \[\leadsto \color{blue}{\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(x - \frac{y}{z \cdot 3}\right)} \]
      2. associate-+r-94.7%

        \[\leadsto \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + x\right) - \frac{y}{z \cdot 3}} \]
      3. sub-neg94.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*94.7%

        \[\leadsto \left(\frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}} + x\right) + \left(-\frac{y}{z \cdot 3}\right) \]
      5. *-commutative94.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-neg294.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-in94.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-eval94.7%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot \color{blue}{-3}} \]
    3. Simplified94.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 inf 61.9%

      \[\leadsto \color{blue}{x} \]

    if -1.75000000000000005e72 < x < 1.02000000000000002e183

    1. Initial program 93.9%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 81.3%

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{t}{y \cdot z} - 0.3333333333333333 \cdot \frac{y}{z}} \]
    4. Taylor expanded in t around 0 47.3%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    5. Step-by-step derivation
      1. metadata-eval47.3%

        \[\leadsto \color{blue}{\frac{-1}{3}} \cdot \frac{y}{z} \]
      2. times-frac47.8%

        \[\leadsto \color{blue}{\frac{-1 \cdot y}{3 \cdot z}} \]
      3. neg-mul-147.8%

        \[\leadsto \frac{\color{blue}{-y}}{3 \cdot z} \]
      4. associate-/l/47.3%

        \[\leadsto \color{blue}{\frac{\frac{-y}{z}}{3}} \]
      5. distribute-frac-neg47.3%

        \[\leadsto \frac{\color{blue}{-\frac{y}{z}}}{3} \]
      6. distribute-frac-neg47.3%

        \[\leadsto \color{blue}{-\frac{\frac{y}{z}}{3}} \]
      7. distribute-neg-frac247.3%

        \[\leadsto \color{blue}{\frac{\frac{y}{z}}{-3}} \]
      8. metadata-eval47.3%

        \[\leadsto \frac{\frac{y}{z}}{\color{blue}{-3}} \]
      9. associate-/l/47.8%

        \[\leadsto \color{blue}{\frac{y}{-3 \cdot z}} \]
      10. associate-/r*47.8%

        \[\leadsto \color{blue}{\frac{\frac{y}{-3}}{z}} \]
    6. Simplified47.8%

      \[\leadsto \color{blue}{\frac{\frac{y}{-3}}{z}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 20: 46.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.15 \cdot 10^{+68}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.02 \cdot 10^{+183}:\\ \;\;\;\;\frac{y}{z \cdot -3}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= x -1.15e+68) x (if (<= x 1.02e+183) (/ y (* z -3.0)) x)))
double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -1.15e+68) {
		tmp = x;
	} else if (x <= 1.02e+183) {
		tmp = y / (z * -3.0);
	} 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.15d+68)) then
        tmp = x
    else if (x <= 1.02d+183) then
        tmp = y / (z * (-3.0d0))
    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.15e+68) {
		tmp = x;
	} else if (x <= 1.02e+183) {
		tmp = y / (z * -3.0);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if x <= -1.15e+68:
		tmp = x
	elif x <= 1.02e+183:
		tmp = y / (z * -3.0)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (x <= -1.15e+68)
		tmp = x;
	elseif (x <= 1.02e+183)
		tmp = Float64(y / Float64(z * -3.0));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (x <= -1.15e+68)
		tmp = x;
	elseif (x <= 1.02e+183)
		tmp = y / (z * -3.0);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.15e+68], x, If[LessEqual[x, 1.02e+183], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.15 \cdot 10^{+68}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 1.02 \cdot 10^{+183}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.15e68 or 1.02000000000000002e183 < x

    1. Initial program 94.7%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Step-by-step derivation
      1. +-commutative94.7%

        \[\leadsto \color{blue}{\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(x - \frac{y}{z \cdot 3}\right)} \]
      2. associate-+r-94.7%

        \[\leadsto \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + x\right) - \frac{y}{z \cdot 3}} \]
      3. sub-neg94.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*94.7%

        \[\leadsto \left(\frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}} + x\right) + \left(-\frac{y}{z \cdot 3}\right) \]
      5. *-commutative94.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-neg294.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-in94.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-eval94.7%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot \color{blue}{-3}} \]
    3. Simplified94.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 inf 61.9%

      \[\leadsto \color{blue}{x} \]

    if -1.15e68 < x < 1.02000000000000002e183

    1. Initial program 93.9%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 81.3%

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{t}{y \cdot z} - 0.3333333333333333 \cdot \frac{y}{z}} \]
    4. Taylor expanded in t around 0 47.3%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    5. Step-by-step derivation
      1. metadata-eval47.3%

        \[\leadsto \color{blue}{\frac{-1}{3}} \cdot \frac{y}{z} \]
      2. times-frac47.8%

        \[\leadsto \color{blue}{\frac{-1 \cdot y}{3 \cdot z}} \]
      3. *-commutative47.8%

        \[\leadsto \frac{-1 \cdot y}{\color{blue}{z \cdot 3}} \]
      4. neg-mul-147.8%

        \[\leadsto \frac{\color{blue}{-y}}{z \cdot 3} \]
      5. distribute-frac-neg47.8%

        \[\leadsto \color{blue}{-\frac{y}{z \cdot 3}} \]
      6. distribute-frac-neg247.8%

        \[\leadsto \color{blue}{\frac{y}{-z \cdot 3}} \]
      7. distribute-rgt-neg-in47.8%

        \[\leadsto \frac{y}{\color{blue}{z \cdot \left(-3\right)}} \]
      8. metadata-eval47.8%

        \[\leadsto \frac{y}{z \cdot \color{blue}{-3}} \]
    6. Simplified47.8%

      \[\leadsto \color{blue}{\frac{y}{z \cdot -3}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 21: 46.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -6.2 \cdot 10^{+70}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.02 \cdot 10^{+183}:\\ \;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= x -6.2e+70)
   x
   (if (<= x 1.02e+183) (* y (/ -0.3333333333333333 z)) x)))
double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -6.2e+70) {
		tmp = x;
	} else if (x <= 1.02e+183) {
		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 <= (-6.2d+70)) then
        tmp = x
    else if (x <= 1.02d+183) 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 <= -6.2e+70) {
		tmp = x;
	} else if (x <= 1.02e+183) {
		tmp = y * (-0.3333333333333333 / z);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if x <= -6.2e+70:
		tmp = x
	elif x <= 1.02e+183:
		tmp = y * (-0.3333333333333333 / z)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (x <= -6.2e+70)
		tmp = x;
	elseif (x <= 1.02e+183)
		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 <= -6.2e+70)
		tmp = x;
	elseif (x <= 1.02e+183)
		tmp = y * (-0.3333333333333333 / z);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[x, -6.2e+70], x, If[LessEqual[x, 1.02e+183], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{+70}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 1.02 \cdot 10^{+183}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.2000000000000006e70 or 1.02000000000000002e183 < x

    1. Initial program 94.7%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Step-by-step derivation
      1. +-commutative94.7%

        \[\leadsto \color{blue}{\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(x - \frac{y}{z \cdot 3}\right)} \]
      2. associate-+r-94.7%

        \[\leadsto \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + x\right) - \frac{y}{z \cdot 3}} \]
      3. sub-neg94.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*94.7%

        \[\leadsto \left(\frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}} + x\right) + \left(-\frac{y}{z \cdot 3}\right) \]
      5. *-commutative94.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-neg294.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-in94.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-eval94.7%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot \color{blue}{-3}} \]
    3. Simplified94.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 inf 61.9%

      \[\leadsto \color{blue}{x} \]

    if -6.2000000000000006e70 < x < 1.02000000000000002e183

    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. sub-neg93.9%

        \[\leadsto \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + x\right) + \left(-\frac{y}{z \cdot 3}\right)} \]
      4. associate-*l*93.9%

        \[\leadsto \left(\frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}} + x\right) + \left(-\frac{y}{z \cdot 3}\right) \]
      5. *-commutative93.9%

        \[\leadsto \left(\frac{t}{z \cdot \color{blue}{\left(y \cdot 3\right)}} + x\right) + \left(-\frac{y}{z \cdot 3}\right) \]
      6. distribute-frac-neg293.9%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{y}{-z \cdot 3}} \]
      7. distribute-rgt-neg-in93.9%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{\color{blue}{z \cdot \left(-3\right)}} \]
      8. metadata-eval93.9%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot \color{blue}{-3}} \]
    3. Simplified93.9%

      \[\leadsto \color{blue}{\left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot -3}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-un-lft-identity93.9%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{\color{blue}{1 \cdot y}}{z \cdot -3} \]
      2. times-frac93.9%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{1}{z} \cdot \frac{y}{-3}} \]
    6. Applied egg-rr93.9%

      \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{1}{z} \cdot \frac{y}{-3}} \]
    7. Step-by-step derivation
      1. associate-*l/93.9%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{1 \cdot \frac{y}{-3}}{z}} \]
      2. *-lft-identity93.9%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{\color{blue}{\frac{y}{-3}}}{z} \]
    8. Simplified93.9%

      \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{\frac{y}{-3}}{z}} \]
    9. Taylor expanded in y around inf 47.3%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    10. Step-by-step derivation
      1. associate-*r/47.7%

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot y}{z}} \]
      2. *-commutative47.7%

        \[\leadsto \frac{\color{blue}{y \cdot -0.3333333333333333}}{z} \]
      3. associate-*r/47.7%

        \[\leadsto \color{blue}{y \cdot \frac{-0.3333333333333333}{z}} \]
    11. Simplified47.7%

      \[\leadsto \color{blue}{y \cdot \frac{-0.3333333333333333}{z}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 22: 46.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -9 \cdot 10^{+69}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.02 \cdot 10^{+183}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= x -9e+69) x (if (<= x 1.02e+183) (* -0.3333333333333333 (/ y z)) x)))
double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -9e+69) {
		tmp = x;
	} else if (x <= 1.02e+183) {
		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 <= (-9d+69)) then
        tmp = x
    else if (x <= 1.02d+183) 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 <= -9e+69) {
		tmp = x;
	} else if (x <= 1.02e+183) {
		tmp = -0.3333333333333333 * (y / z);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if x <= -9e+69:
		tmp = x
	elif x <= 1.02e+183:
		tmp = -0.3333333333333333 * (y / z)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (x <= -9e+69)
		tmp = x;
	elseif (x <= 1.02e+183)
		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 <= -9e+69)
		tmp = x;
	elseif (x <= 1.02e+183)
		tmp = -0.3333333333333333 * (y / z);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[x, -9e+69], x, If[LessEqual[x, 1.02e+183], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -9 \cdot 10^{+69}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 1.02 \cdot 10^{+183}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -8.9999999999999999e69 or 1.02000000000000002e183 < x

    1. Initial program 94.7%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Step-by-step derivation
      1. +-commutative94.7%

        \[\leadsto \color{blue}{\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(x - \frac{y}{z \cdot 3}\right)} \]
      2. associate-+r-94.7%

        \[\leadsto \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + x\right) - \frac{y}{z \cdot 3}} \]
      3. sub-neg94.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*94.7%

        \[\leadsto \left(\frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}} + x\right) + \left(-\frac{y}{z \cdot 3}\right) \]
      5. *-commutative94.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-neg294.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-in94.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-eval94.7%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot \color{blue}{-3}} \]
    3. Simplified94.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 inf 61.9%

      \[\leadsto \color{blue}{x} \]

    if -8.9999999999999999e69 < x < 1.02000000000000002e183

    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. sub-neg93.9%

        \[\leadsto \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + x\right) + \left(-\frac{y}{z \cdot 3}\right)} \]
      4. associate-*l*93.9%

        \[\leadsto \left(\frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}} + x\right) + \left(-\frac{y}{z \cdot 3}\right) \]
      5. *-commutative93.9%

        \[\leadsto \left(\frac{t}{z \cdot \color{blue}{\left(y \cdot 3\right)}} + x\right) + \left(-\frac{y}{z \cdot 3}\right) \]
      6. distribute-frac-neg293.9%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{y}{-z \cdot 3}} \]
      7. distribute-rgt-neg-in93.9%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{\color{blue}{z \cdot \left(-3\right)}} \]
      8. metadata-eval93.9%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot \color{blue}{-3}} \]
    3. Simplified93.9%

      \[\leadsto \color{blue}{\left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot -3}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-un-lft-identity93.9%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{\color{blue}{1 \cdot y}}{z \cdot -3} \]
      2. times-frac93.9%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{1}{z} \cdot \frac{y}{-3}} \]
    6. Applied egg-rr93.9%

      \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{1}{z} \cdot \frac{y}{-3}} \]
    7. Step-by-step derivation
      1. associate-*l/93.9%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{1 \cdot \frac{y}{-3}}{z}} \]
      2. *-lft-identity93.9%

        \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{\color{blue}{\frac{y}{-3}}}{z} \]
    8. Simplified93.9%

      \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{\frac{y}{-3}}{z}} \]
    9. Taylor expanded in y around inf 47.3%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 23: 30.0% 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 94.1%

    \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
  2. Step-by-step derivation
    1. +-commutative94.1%

      \[\leadsto \color{blue}{\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(x - \frac{y}{z \cdot 3}\right)} \]
    2. associate-+r-94.1%

      \[\leadsto \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + x\right) - \frac{y}{z \cdot 3}} \]
    3. sub-neg94.1%

      \[\leadsto \color{blue}{\left(\frac{t}{\left(z \cdot 3\right) \cdot y} + x\right) + \left(-\frac{y}{z \cdot 3}\right)} \]
    4. associate-*l*94.1%

      \[\leadsto \left(\frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}} + x\right) + \left(-\frac{y}{z \cdot 3}\right) \]
    5. *-commutative94.1%

      \[\leadsto \left(\frac{t}{z \cdot \color{blue}{\left(y \cdot 3\right)}} + x\right) + \left(-\frac{y}{z \cdot 3}\right) \]
    6. distribute-frac-neg294.1%

      \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \color{blue}{\frac{y}{-z \cdot 3}} \]
    7. distribute-rgt-neg-in94.1%

      \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{\color{blue}{z \cdot \left(-3\right)}} \]
    8. metadata-eval94.1%

      \[\leadsto \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot \color{blue}{-3}} \]
  3. Simplified94.1%

    \[\leadsto \color{blue}{\left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot -3}} \]
  4. Add Preprocessing
  5. Taylor expanded in z around inf 27.5%

    \[\leadsto \color{blue}{x} \]
  6. Add Preprocessing

Developer target: 96.3% 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 2024098 
(FPCore (x y z t)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, H"
  :precision binary64

  :alt
  (+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))

  (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))