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

Percentage Accurate: 95.5% → 97.6%
Time: 10.9s
Alternatives: 16
Speedup: 1.4×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 95.5% accurate, 1.0× speedup?

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

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

Alternative 1: 97.6% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 99.9%

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

    if -9.99999999999999946e48 < (*.f64 z #s(literal 3 binary64))

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 61.8% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq -3.7 \cdot 10^{-57}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;y \leq 3.4 \cdot 10^{+70}:\\
\;\;\;\;\frac{x \cdot y}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.94999999999999995e76

    1. Initial program 97.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-neg97.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+97.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}} \]
    11. Taylor expanded in y around inf 81.4%

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

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

        \[\leadsto \frac{y}{z} \cdot \color{blue}{\left(-0.3333333333333333\right)} \]
      3. distribute-rgt-neg-in81.4%

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{0.3333333333333333}{z}} \]
      6. metadata-eval81.5%

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

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

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

        \[\leadsto y \cdot \left(-\color{blue}{\frac{0.3333333333333333 \cdot 1}{z}}\right) \]
      10. metadata-eval81.5%

        \[\leadsto y \cdot \left(-\frac{\color{blue}{0.3333333333333333}}{z}\right) \]
      11. distribute-neg-frac81.5%

        \[\leadsto y \cdot \color{blue}{\frac{-0.3333333333333333}{z}} \]
      12. metadata-eval81.5%

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

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

    if -1.94999999999999995e76 < y < -3.7e-57

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

      \[\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
    5. Taylor expanded in x around inf 56.9%

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

    if -3.7e-57 < y < 16000

    1. Initial program 88.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 16000 < y < 3.4000000000000001e70

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

      \[\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
    5. Taylor expanded in y around 0 77.2%

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

      \[\leadsto \frac{\color{blue}{x \cdot y}}{y} \]
    7. Step-by-step derivation
      1. *-commutative65.4%

        \[\leadsto \frac{\color{blue}{y \cdot x}}{y} \]
    8. Simplified65.4%

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

    if 3.4000000000000001e70 < y

    1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y - \frac{t}{y}}{\frac{z}{-0.3333333333333333}}} \]
      4. div-inv99.9%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}} \]
    11. Taylor expanded in y around inf 75.7%

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

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

Alternative 3: 88.7% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq 1.8 \cdot 10^{+14}:\\
\;\;\;\;x + \frac{\frac{t}{y}}{z \cdot 3}\\

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


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

    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. sub-neg98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.50000000000000029e-24 < y < 1.8e14

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{-t}{y} \cdot \frac{1}{z \cdot \color{blue}{-3}} \]
      5. un-div-inv90.6%

        \[\leadsto x + \color{blue}{\frac{\frac{-t}{y}}{z \cdot -3}} \]
      6. add-sqr-sqrt41.4%

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

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

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

        \[\leadsto x + \frac{\frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{y}}{z \cdot -3} \]
      10. add-sqr-sqrt32.3%

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

        \[\leadsto x + \color{blue}{\frac{-\frac{t}{y}}{-z \cdot -3}} \]
      12. distribute-frac-neg32.3%

        \[\leadsto x + \frac{\color{blue}{\frac{-t}{y}}}{-z \cdot -3} \]
      13. add-sqr-sqrt16.1%

        \[\leadsto x + \frac{\frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{y}}{-z \cdot -3} \]
      14. sqrt-unprod58.9%

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

        \[\leadsto x + \frac{\frac{\sqrt{\color{blue}{t \cdot t}}}{y}}{-z \cdot -3} \]
      16. sqrt-unprod49.1%

        \[\leadsto x + \frac{\frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{y}}{-z \cdot -3} \]
      17. add-sqr-sqrt90.6%

        \[\leadsto x + \frac{\frac{\color{blue}{t}}{y}}{-z \cdot -3} \]
      18. distribute-rgt-neg-in90.6%

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

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

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

    if 1.8e14 < y

    1. Initial program 96.8%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Step-by-step derivation
      1. sub-neg96.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+96.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y - \frac{t}{y}}{\frac{z}{-0.3333333333333333}}} \]
      4. div-inv99.9%

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

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

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

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

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

Alternative 4: 89.3% accurate, 0.8× speedup?

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

\mathbf{elif}\;y \leq 2.1 \cdot 10^{+14}:\\
\;\;\;\;x + \frac{t}{3 \cdot \left(z \cdot y\right)}\\

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


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

    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. sub-neg98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.1999999999999999e-22 < y < 2.1e14

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.1e14 < y

    1. Initial program 96.8%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Step-by-step derivation
      1. sub-neg96.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+96.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y - \frac{t}{y}}{\frac{z}{-0.3333333333333333}}} \]
      4. div-inv99.9%

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

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

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

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

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

Alternative 5: 89.3% accurate, 0.8× speedup?

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

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

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


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

    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. sub-neg98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.4999999999999994e-22 < y < 2.22e14

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.22e14 < y

    1. Initial program 96.8%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Step-by-step derivation
      1. sub-neg96.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+96.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y - \frac{t}{y}}{\frac{z}{-0.3333333333333333}}} \]
      4. div-inv99.9%

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

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

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

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

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

Alternative 6: 81.5% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq 7 \cdot 10^{+87}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.7999999999999998e93

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.7999999999999998e93 < z < 6.99999999999999972e87

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.99999999999999972e87 < z

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 76.2% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.19999999999999976e-60 or 12200 < y

    1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.19999999999999976e-60 < y < 12200

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 78.4% accurate, 0.9× speedup?

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

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

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

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


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

    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. remove-double-neg98.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.55e-59 < y < 12200

    1. Initial program 88.3%

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

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

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

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

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

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

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

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

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

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

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

      \[\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
    5. Taylor expanded in y around 0 93.6%

      \[\leadsto \color{blue}{\frac{0.3333333333333333 \cdot \frac{t}{z} + x \cdot y}{y}} \]
    6. Taylor expanded in t around inf 65.5%

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

        \[\leadsto \frac{\color{blue}{\frac{t}{z} \cdot 0.3333333333333333}}{y} \]
      2. *-rgt-identity65.5%

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

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

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

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

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

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

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

    if 12200 < y

    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y - \frac{t}{y}}{\frac{z}{-0.3333333333333333}}} \]
      4. div-inv99.9%

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

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

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

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

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

Alternative 9: 78.4% accurate, 0.9× speedup?

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

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

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

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


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

    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. remove-double-neg98.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.1200000000000001e-59 < y < 12200

    1. Initial program 88.3%

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

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

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

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

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

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

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

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

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

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

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

      \[\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
    5. Taylor expanded in y around 0 93.6%

      \[\leadsto \color{blue}{\frac{0.3333333333333333 \cdot \frac{t}{z} + x \cdot y}{y}} \]
    6. Taylor expanded in t around inf 65.5%

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

    if 12200 < y

    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y - \frac{t}{y}}{\frac{z}{-0.3333333333333333}}} \]
      4. div-inv99.9%

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

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

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

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

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

Alternative 10: 76.2% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.7999999999999999e-60 < y < 12200

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 12200 < y

    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y - \frac{t}{y}}{\frac{z}{-0.3333333333333333}}} \]
      4. div-inv99.9%

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

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

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

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

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

Alternative 11: 49.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+78} \lor \neg \left(y \leq 9.5 \cdot 10^{+70}\right):\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.8000000000000001e78 or 9.5000000000000002e70 < y

    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}} \]
    11. Taylor expanded in y around inf 78.6%

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

    if -1.8000000000000001e78 < y < 9.5000000000000002e70

    1. Initial program 91.4%

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

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

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

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

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

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

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

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

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

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

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

      \[\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
    5. Taylor expanded in x around inf 39.4%

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

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

Alternative 12: 49.3% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;y \leq 4.4 \cdot 10^{+71}:\\
\;\;\;\;x\\

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


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

    1. Initial program 97.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-neg97.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+97.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}} \]
    11. Taylor expanded in y around inf 81.4%

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

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

        \[\leadsto \frac{y}{z} \cdot \color{blue}{\left(-0.3333333333333333\right)} \]
      3. distribute-rgt-neg-in81.4%

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{0.3333333333333333}{z}} \]
      6. metadata-eval81.5%

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

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

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

        \[\leadsto y \cdot \left(-\color{blue}{\frac{0.3333333333333333 \cdot 1}{z}}\right) \]
      10. metadata-eval81.5%

        \[\leadsto y \cdot \left(-\frac{\color{blue}{0.3333333333333333}}{z}\right) \]
      11. distribute-neg-frac81.5%

        \[\leadsto y \cdot \color{blue}{\frac{-0.3333333333333333}{z}} \]
      12. metadata-eval81.5%

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

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

    if -1.02e77 < y < 4.39999999999999989e71

    1. Initial program 91.4%

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

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

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

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

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

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

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

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

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

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

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

      \[\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
    5. Taylor expanded in x around inf 39.4%

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

    if 4.39999999999999989e71 < y

    1. Initial program 95.9%

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

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-y}{z \cdot 3}} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
      7. neg-mul-195.9%

        \[\leadsto x + \left(\frac{\color{blue}{-1 \cdot y}}{z \cdot 3} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
      8. *-commutative95.9%

        \[\leadsto x + \left(\frac{\color{blue}{y \cdot -1}}{z \cdot 3} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
      9. associate-/l*95.8%

        \[\leadsto x + \left(\color{blue}{y \cdot \frac{-1}{z \cdot 3}} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
      10. *-commutative95.8%

        \[\leadsto x + \left(\color{blue}{\frac{-1}{z \cdot 3} \cdot y} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
      11. neg-mul-195.8%

        \[\leadsto x + \left(\frac{-1}{z \cdot 3} \cdot y - \frac{\color{blue}{-1 \cdot t}}{\left(z \cdot 3\right) \cdot y}\right) \]
      12. times-frac95.8%

        \[\leadsto x + \left(\frac{-1}{z \cdot 3} \cdot y - \color{blue}{\frac{-1}{z \cdot 3} \cdot \frac{t}{y}}\right) \]
      13. distribute-lft-out--99.8%

        \[\leadsto x + \color{blue}{\frac{-1}{z \cdot 3} \cdot \left(y - \frac{t}{y}\right)} \]
      14. *-commutative99.8%

        \[\leadsto x + \frac{-1}{\color{blue}{3 \cdot z}} \cdot \left(y - \frac{t}{y}\right) \]
      15. associate-/r*99.7%

        \[\leadsto x + \color{blue}{\frac{\frac{-1}{3}}{z}} \cdot \left(y - \frac{t}{y}\right) \]
      16. metadata-eval99.7%

        \[\leadsto x + \frac{\color{blue}{-0.3333333333333333}}{z} \cdot \left(y - \frac{t}{y}\right) \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{x + \frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative99.7%

        \[\leadsto x + \color{blue}{\left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}} \]
      2. clear-num99.6%

        \[\leadsto x + \left(y - \frac{t}{y}\right) \cdot \color{blue}{\frac{1}{\frac{z}{-0.3333333333333333}}} \]
      3. un-div-inv99.8%

        \[\leadsto x + \color{blue}{\frac{y - \frac{t}{y}}{\frac{z}{-0.3333333333333333}}} \]
      4. div-inv99.9%

        \[\leadsto x + \frac{y - \frac{t}{y}}{\color{blue}{z \cdot \frac{1}{-0.3333333333333333}}} \]
      5. metadata-eval99.9%

        \[\leadsto x + \frac{y - \frac{t}{y}}{z \cdot \color{blue}{-3}} \]
    6. Applied egg-rr99.9%

      \[\leadsto x + \color{blue}{\frac{y - \frac{t}{y}}{z \cdot -3}} \]
    7. Taylor expanded in x around 0 99.7%

      \[\leadsto \color{blue}{x + -0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}} \]
    8. Step-by-step derivation
      1. +-commutative99.7%

        \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z} + x} \]
    9. Simplified99.7%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z} + x} \]
    10. Taylor expanded in z around 0 79.5%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}} \]
    11. Taylor expanded in y around inf 75.7%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 13: 95.9% accurate, 1.4× speedup?

\[\begin{array}{l} \\ x + \frac{y - \frac{t}{y}}{z \cdot -3} \end{array} \]
(FPCore (x y z t) :precision binary64 (+ x (/ (- y (/ t y)) (* z -3.0))))
double code(double x, double y, double z, double t) {
	return x + ((y - (t / y)) / (z * -3.0));
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x + ((y - (t / y)) / (z * (-3.0d0)))
end function
public static double code(double x, double y, double z, double t) {
	return x + ((y - (t / y)) / (z * -3.0));
}
def code(x, y, z, t):
	return x + ((y - (t / y)) / (z * -3.0))
function code(x, y, z, t)
	return Float64(x + Float64(Float64(y - Float64(t / y)) / Float64(z * -3.0)))
end
function tmp = code(x, y, z, t)
	tmp = x + ((y - (t / y)) / (z * -3.0));
end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{y - \frac{t}{y}}{z \cdot -3}
\end{array}
Derivation
  1. Initial program 93.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-neg93.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+93.6%

      \[\leadsto \color{blue}{x + \left(\left(-\frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
    3. remove-double-neg93.6%

      \[\leadsto x + \left(\left(-\frac{y}{z \cdot 3}\right) + \color{blue}{\left(-\left(-\frac{t}{\left(z \cdot 3\right) \cdot y}\right)\right)}\right) \]
    4. distribute-frac-neg93.6%

      \[\leadsto x + \left(\left(-\frac{y}{z \cdot 3}\right) + \left(-\color{blue}{\frac{-t}{\left(z \cdot 3\right) \cdot y}}\right)\right) \]
    5. sub-neg93.6%

      \[\leadsto x + \color{blue}{\left(\left(-\frac{y}{z \cdot 3}\right) - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right)} \]
    6. distribute-frac-neg93.6%

      \[\leadsto x + \left(\color{blue}{\frac{-y}{z \cdot 3}} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
    7. neg-mul-193.6%

      \[\leadsto x + \left(\frac{\color{blue}{-1 \cdot y}}{z \cdot 3} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
    8. *-commutative93.6%

      \[\leadsto x + \left(\frac{\color{blue}{y \cdot -1}}{z \cdot 3} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
    9. associate-/l*93.6%

      \[\leadsto x + \left(\color{blue}{y \cdot \frac{-1}{z \cdot 3}} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
    10. *-commutative93.6%

      \[\leadsto x + \left(\color{blue}{\frac{-1}{z \cdot 3} \cdot y} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
    11. neg-mul-193.6%

      \[\leadsto x + \left(\frac{-1}{z \cdot 3} \cdot y - \frac{\color{blue}{-1 \cdot t}}{\left(z \cdot 3\right) \cdot y}\right) \]
    12. times-frac95.4%

      \[\leadsto x + \left(\frac{-1}{z \cdot 3} \cdot y - \color{blue}{\frac{-1}{z \cdot 3} \cdot \frac{t}{y}}\right) \]
    13. distribute-lft-out--96.6%

      \[\leadsto x + \color{blue}{\frac{-1}{z \cdot 3} \cdot \left(y - \frac{t}{y}\right)} \]
    14. *-commutative96.6%

      \[\leadsto x + \frac{-1}{\color{blue}{3 \cdot z}} \cdot \left(y - \frac{t}{y}\right) \]
    15. associate-/r*96.5%

      \[\leadsto x + \color{blue}{\frac{\frac{-1}{3}}{z}} \cdot \left(y - \frac{t}{y}\right) \]
    16. metadata-eval96.5%

      \[\leadsto x + \frac{\color{blue}{-0.3333333333333333}}{z} \cdot \left(y - \frac{t}{y}\right) \]
  3. Simplified96.5%

    \[\leadsto \color{blue}{x + \frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. *-commutative96.5%

      \[\leadsto x + \color{blue}{\left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}} \]
    2. clear-num96.5%

      \[\leadsto x + \left(y - \frac{t}{y}\right) \cdot \color{blue}{\frac{1}{\frac{z}{-0.3333333333333333}}} \]
    3. un-div-inv96.5%

      \[\leadsto x + \color{blue}{\frac{y - \frac{t}{y}}{\frac{z}{-0.3333333333333333}}} \]
    4. div-inv96.6%

      \[\leadsto x + \frac{y - \frac{t}{y}}{\color{blue}{z \cdot \frac{1}{-0.3333333333333333}}} \]
    5. metadata-eval96.6%

      \[\leadsto x + \frac{y - \frac{t}{y}}{z \cdot \color{blue}{-3}} \]
  6. Applied egg-rr96.6%

    \[\leadsto x + \color{blue}{\frac{y - \frac{t}{y}}{z \cdot -3}} \]
  7. Add Preprocessing

Alternative 14: 95.8% accurate, 1.4× speedup?

\[\begin{array}{l} \\ x + \frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right) \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (+ x (* (/ -0.3333333333333333 z) (- y (/ t y)))))
double code(double x, double y, double z, double t) {
	return x + ((-0.3333333333333333 / z) * (y - (t / y)));
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x + (((-0.3333333333333333d0) / z) * (y - (t / y)))
end function
public static double code(double x, double y, double z, double t) {
	return x + ((-0.3333333333333333 / z) * (y - (t / y)));
}
def code(x, y, z, t):
	return x + ((-0.3333333333333333 / z) * (y - (t / y)))
function code(x, y, z, t)
	return Float64(x + Float64(Float64(-0.3333333333333333 / z) * Float64(y - Float64(t / y))))
end
function tmp = code(x, y, z, t)
	tmp = x + ((-0.3333333333333333 / z) * (y - (t / y)));
end
code[x_, y_, z_, t_] := N[(x + N[(N[(-0.3333333333333333 / z), $MachinePrecision] * N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)
\end{array}
Derivation
  1. Initial program 93.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-neg93.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+93.6%

      \[\leadsto \color{blue}{x + \left(\left(-\frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
    3. remove-double-neg93.6%

      \[\leadsto x + \left(\left(-\frac{y}{z \cdot 3}\right) + \color{blue}{\left(-\left(-\frac{t}{\left(z \cdot 3\right) \cdot y}\right)\right)}\right) \]
    4. distribute-frac-neg93.6%

      \[\leadsto x + \left(\left(-\frac{y}{z \cdot 3}\right) + \left(-\color{blue}{\frac{-t}{\left(z \cdot 3\right) \cdot y}}\right)\right) \]
    5. sub-neg93.6%

      \[\leadsto x + \color{blue}{\left(\left(-\frac{y}{z \cdot 3}\right) - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right)} \]
    6. distribute-frac-neg93.6%

      \[\leadsto x + \left(\color{blue}{\frac{-y}{z \cdot 3}} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
    7. neg-mul-193.6%

      \[\leadsto x + \left(\frac{\color{blue}{-1 \cdot y}}{z \cdot 3} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
    8. *-commutative93.6%

      \[\leadsto x + \left(\frac{\color{blue}{y \cdot -1}}{z \cdot 3} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
    9. associate-/l*93.6%

      \[\leadsto x + \left(\color{blue}{y \cdot \frac{-1}{z \cdot 3}} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
    10. *-commutative93.6%

      \[\leadsto x + \left(\color{blue}{\frac{-1}{z \cdot 3} \cdot y} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
    11. neg-mul-193.6%

      \[\leadsto x + \left(\frac{-1}{z \cdot 3} \cdot y - \frac{\color{blue}{-1 \cdot t}}{\left(z \cdot 3\right) \cdot y}\right) \]
    12. times-frac95.4%

      \[\leadsto x + \left(\frac{-1}{z \cdot 3} \cdot y - \color{blue}{\frac{-1}{z \cdot 3} \cdot \frac{t}{y}}\right) \]
    13. distribute-lft-out--96.6%

      \[\leadsto x + \color{blue}{\frac{-1}{z \cdot 3} \cdot \left(y - \frac{t}{y}\right)} \]
    14. *-commutative96.6%

      \[\leadsto x + \frac{-1}{\color{blue}{3 \cdot z}} \cdot \left(y - \frac{t}{y}\right) \]
    15. associate-/r*96.5%

      \[\leadsto x + \color{blue}{\frac{\frac{-1}{3}}{z}} \cdot \left(y - \frac{t}{y}\right) \]
    16. metadata-eval96.5%

      \[\leadsto x + \frac{\color{blue}{-0.3333333333333333}}{z} \cdot \left(y - \frac{t}{y}\right) \]
  3. Simplified96.5%

    \[\leadsto \color{blue}{x + \frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)} \]
  4. Add Preprocessing
  5. Add Preprocessing

Alternative 15: 95.8% accurate, 1.4× speedup?

\[\begin{array}{l} \\ x + -0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (+ x (* -0.3333333333333333 (/ (- y (/ t y)) z))))
double code(double x, double y, double z, double t) {
	return x + (-0.3333333333333333 * ((y - (t / y)) / z));
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x + ((-0.3333333333333333d0) * ((y - (t / y)) / z))
end function
public static double code(double x, double y, double z, double t) {
	return x + (-0.3333333333333333 * ((y - (t / y)) / z));
}
def code(x, y, z, t):
	return x + (-0.3333333333333333 * ((y - (t / y)) / z))
function code(x, y, z, t)
	return Float64(x + Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z)))
end
function tmp = code(x, y, z, t)
	tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z));
end
code[x_, y_, z_, t_] := N[(x + N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + -0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}
\end{array}
Derivation
  1. Initial program 93.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-neg93.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+93.6%

      \[\leadsto \color{blue}{x + \left(\left(-\frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
    3. remove-double-neg93.6%

      \[\leadsto x + \left(\left(-\frac{y}{z \cdot 3}\right) + \color{blue}{\left(-\left(-\frac{t}{\left(z \cdot 3\right) \cdot y}\right)\right)}\right) \]
    4. distribute-frac-neg93.6%

      \[\leadsto x + \left(\left(-\frac{y}{z \cdot 3}\right) + \left(-\color{blue}{\frac{-t}{\left(z \cdot 3\right) \cdot y}}\right)\right) \]
    5. sub-neg93.6%

      \[\leadsto x + \color{blue}{\left(\left(-\frac{y}{z \cdot 3}\right) - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right)} \]
    6. distribute-frac-neg93.6%

      \[\leadsto x + \left(\color{blue}{\frac{-y}{z \cdot 3}} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
    7. neg-mul-193.6%

      \[\leadsto x + \left(\frac{\color{blue}{-1 \cdot y}}{z \cdot 3} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
    8. *-commutative93.6%

      \[\leadsto x + \left(\frac{\color{blue}{y \cdot -1}}{z \cdot 3} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
    9. associate-/l*93.6%

      \[\leadsto x + \left(\color{blue}{y \cdot \frac{-1}{z \cdot 3}} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
    10. *-commutative93.6%

      \[\leadsto x + \left(\color{blue}{\frac{-1}{z \cdot 3} \cdot y} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
    11. neg-mul-193.6%

      \[\leadsto x + \left(\frac{-1}{z \cdot 3} \cdot y - \frac{\color{blue}{-1 \cdot t}}{\left(z \cdot 3\right) \cdot y}\right) \]
    12. times-frac95.4%

      \[\leadsto x + \left(\frac{-1}{z \cdot 3} \cdot y - \color{blue}{\frac{-1}{z \cdot 3} \cdot \frac{t}{y}}\right) \]
    13. distribute-lft-out--96.6%

      \[\leadsto x + \color{blue}{\frac{-1}{z \cdot 3} \cdot \left(y - \frac{t}{y}\right)} \]
    14. *-commutative96.6%

      \[\leadsto x + \frac{-1}{\color{blue}{3 \cdot z}} \cdot \left(y - \frac{t}{y}\right) \]
    15. associate-/r*96.5%

      \[\leadsto x + \color{blue}{\frac{\frac{-1}{3}}{z}} \cdot \left(y - \frac{t}{y}\right) \]
    16. metadata-eval96.5%

      \[\leadsto x + \frac{\color{blue}{-0.3333333333333333}}{z} \cdot \left(y - \frac{t}{y}\right) \]
  3. Simplified96.5%

    \[\leadsto \color{blue}{x + \frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in z around 0 96.5%

    \[\leadsto x + \color{blue}{-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}} \]
  6. Add Preprocessing

Alternative 16: 30.7% accurate, 15.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
	return x;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x
end function
public static double code(double x, double y, double z, double t) {
	return x;
}
def code(x, y, z, t):
	return x
function code(x, y, z, t)
	return x
end
function tmp = code(x, y, z, t)
	tmp = x;
end
code[x_, y_, z_, t_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 93.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-neg93.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+93.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-neg93.6%

      \[\leadsto x + \left(\color{blue}{\frac{-y}{z \cdot 3}} + \frac{t}{\left(z \cdot 3\right) \cdot y}\right) \]
    4. neg-mul-193.6%

      \[\leadsto x + \left(\frac{\color{blue}{-1 \cdot y}}{z \cdot 3} + \frac{t}{\left(z \cdot 3\right) \cdot y}\right) \]
    5. *-commutative93.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-frac93.5%

      \[\leadsto x + \left(\color{blue}{\frac{-1}{3} \cdot \frac{y}{z}} + \frac{t}{\left(z \cdot 3\right) \cdot y}\right) \]
    7. fma-define93.5%

      \[\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-eval93.5%

      \[\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*93.5%

      \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}}\right) \]
    10. *-commutative93.5%

      \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{z \cdot \color{blue}{\left(y \cdot 3\right)}}\right) \]
  3. Simplified93.5%

    \[\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
  5. Taylor expanded in x around inf 31.2%

    \[\leadsto \color{blue}{x} \]
  6. Add Preprocessing

Developer Target 1: 95.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(x - \frac{y}{z \cdot 3}\right) + \frac{\frac{t}{z \cdot 3}}{y} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y)))
double code(double x, double y, double z, double t) {
	return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (x - (y / (z * 3.0d0))) + ((t / (z * 3.0d0)) / y)
end function
public static double code(double x, double y, double z, double t) {
	return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
def code(x, y, z, t):
	return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y)
function code(x, y, z, t)
	return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(Float64(t / Float64(z * 3.0)) / y))
end
function tmp = code(x, y, z, t)
	tmp = (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{\frac{t}{z \cdot 3}}{y}
\end{array}

Reproduce

?
herbie shell --seed 2024163 
(FPCore (x y z t)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, H"
  :precision binary64

  :alt
  (! :herbie-platform default (+ (- x (/ y (* z 3))) (/ (/ t (* z 3)) y)))

  (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))