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

Percentage Accurate: 95.5% → 97.6%
Time: 13.5s
Alternatives: 18
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 95.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.9× speedup?

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

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

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


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

    1. Initial program 99.8%

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

    if -9.9999999999999993e-41 < t

    1. Initial program 94.5%

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

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

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

      \[\leadsto \color{blue}{x - \left(\frac{y}{z \cdot 3} - \frac{t}{y \cdot \left(z \cdot 3\right)}\right)} \]
    4. Step-by-step derivation
      1. sub-neg94.5%

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{y - \frac{t}{y}}{z \cdot 3}} \]
    7. Simplified98.2%

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

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

Alternative 2: 79.3% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \cdot 3 \leq -4 \cdot 10^{+49}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \cdot 3 \leq -5 \cdot 10^{-13}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\

\mathbf{elif}\;z \cdot 3 \leq 5 \cdot 10^{-36}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 z 3) < -3.9999999999999997e168

    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. distribute-frac-neg97.1%

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

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

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

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

        \[\leadsto x + \color{blue}{\left(\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. associate-*l/97.1%

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

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

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

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

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

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

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

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

    if -3.9999999999999997e168 < (*.f64 z 3) < -3.99999999999999979e49 or -4.9999999999999999e-13 < (*.f64 z 3) < 5.00000000000000004e-36

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-1}{z \cdot 3} \cdot y} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
      9. neg-mul-193.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) \]
      10. times-frac97.6%

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

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

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

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

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

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

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

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

    if -3.99999999999999979e49 < (*.f64 z 3) < -4.9999999999999999e-13

    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. distribute-frac-neg99.9%

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-1}{z \cdot 3} \cdot y} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
      9. neg-mul-199.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) \]
      10. times-frac99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000004e-36 < (*.f64 z 3)

    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. distribute-frac-neg99.8%

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

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

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

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

        \[\leadsto x + \color{blue}{\left(\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. associate-*l/99.8%

        \[\leadsto x + \left(\color{blue}{\frac{-1}{z \cdot 3} \cdot y} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
      9. neg-mul-199.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) \]
      10. times-frac92.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot 3 \leq -4 \cdot 10^{+168}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;z \cdot 3 \leq -4 \cdot 10^{+49}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\ \mathbf{elif}\;z \cdot 3 \leq -5 \cdot 10^{-13}:\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \mathbf{elif}\;z \cdot 3 \leq 5 \cdot 10^{-36}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{\frac{z}{0.3333333333333333}}\\ \end{array} \]

Alternative 3: 97.5% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.1e73

    1. Initial program 99.7%

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

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

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

      \[\leadsto \color{blue}{x - \left(\frac{y}{z \cdot 3} - \frac{t}{y \cdot \left(z \cdot 3\right)}\right)} \]
    4. Step-by-step derivation
      1. associate--r-99.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.1e73 < t

    1. Initial program 95.1%

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

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

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

      \[\leadsto \color{blue}{x - \left(\frac{y}{z \cdot 3} - \frac{t}{y \cdot \left(z \cdot 3\right)}\right)} \]
    4. Step-by-step derivation
      1. sub-neg95.1%

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{y - \frac{t}{y}}{z \cdot 3}} \]
    7. Simplified98.4%

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

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

Alternative 4: 97.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{-38} \lor \neg \left(y \leq 5.4 \cdot 10^{-124}\right):\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.20000000000000007e-38 or 5.40000000000000035e-124 < y

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.20000000000000007e-38 < y < 5.40000000000000035e-124

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-1}{z \cdot 3} \cdot y} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
      9. neg-mul-192.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) \]
      10. times-frac86.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{\frac{\frac{t}{y} \cdot 0.3333333333333333}{z}}}{1} \]
      12. *-commutative84.7%

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

        \[\leadsto x + \frac{\color{blue}{0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}}}{1} \]
      14. *-commutative84.7%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{\frac{t}{y}}{z \cdot 3}} \]
      20. associate-/l/91.2%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.2 \cdot 10^{-38} \lor \neg \left(y \leq 5.4 \cdot 10^{-124}\right):\\ \;\;\;\;x + -0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \end{array} \]

Alternative 5: 97.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{-38} \lor \neg \left(y \leq 5.9 \cdot 10^{-124}\right):\\
\;\;\;\;x + \frac{\left(y - \frac{t}{y}\right) \cdot -0.3333333333333333}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.20000000000000007e-38 or 5.9000000000000002e-124 < y

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.20000000000000007e-38 < y < 5.9000000000000002e-124

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-1}{z \cdot 3} \cdot y} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
      9. neg-mul-192.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) \]
      10. times-frac86.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{\frac{\frac{t}{y} \cdot 0.3333333333333333}{z}}}{1} \]
      12. *-commutative84.7%

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

        \[\leadsto x + \frac{\color{blue}{0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}}}{1} \]
      14. *-commutative84.7%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{\frac{t}{y}}{z \cdot 3}} \]
      20. associate-/l/91.2%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.2 \cdot 10^{-38} \lor \neg \left(y \leq 5.9 \cdot 10^{-124}\right):\\ \;\;\;\;x + \frac{\left(y - \frac{t}{y}\right) \cdot -0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \end{array} \]

Alternative 6: 49.0% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -1 \cdot 10^{-20}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \cdot 3 \leq 500000000000:\\
\;\;\;\;\frac{-y}{z \cdot 3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z 3) < -9.99999999999999945e-21 or 5e11 < (*.f64 z 3)

    1. Initial program 99.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-neg99.1%

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

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

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-1}{z \cdot 3} \cdot y} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
      9. neg-mul-199.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) \]
      10. times-frac90.1%

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

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

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

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

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

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

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

    if -9.99999999999999945e-21 < (*.f64 z 3) < 5e11

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-1}{z \cdot 3} \cdot y} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
      9. neg-mul-192.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) \]
      10. times-frac99.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{y}{\frac{z}{0.3333333333333333}}} \]
      5. distribute-neg-frac50.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot 3 \leq -1 \cdot 10^{-20}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \cdot 3 \leq 500000000000:\\ \;\;\;\;\frac{-y}{z \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 7: 89.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{+45} \lor \neg \left(y \leq 6 \cdot 10^{-7}\right):\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.00000000000000011e45 or 5.9999999999999997e-7 < y

    1. Initial program 99.1%

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

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

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

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

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

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

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

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

    if -3.00000000000000011e45 < y < 5.9999999999999997e-7

    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. distribute-frac-neg93.6%

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

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

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

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

        \[\leadsto x + \color{blue}{\left(\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. associate-*l/93.6%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3 \cdot 10^{+45} \lor \neg \left(y \leq 6 \cdot 10^{-7}\right):\\ \;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \end{array} \]

Alternative 8: 49.0% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -1 \cdot 10^{-20}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \cdot 3 \leq 500000000000:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z 3) < -9.99999999999999945e-21 or 5e11 < (*.f64 z 3)

    1. Initial program 99.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-neg99.1%

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

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

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-1}{z \cdot 3} \cdot y} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
      9. neg-mul-199.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) \]
      10. times-frac90.1%

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

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

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

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

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

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

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

    if -9.99999999999999945e-21 < (*.f64 z 3) < 5e11

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-1}{z \cdot 3} \cdot y} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
      9. neg-mul-192.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) \]
      10. times-frac99.7%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot 3 \leq -1 \cdot 10^{-20}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \cdot 3 \leq 500000000000:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 9: 78.1% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;y \leq 1.82 \cdot 10^{-84}:\\
\;\;\;\;-0.3333333333333333 \cdot \left(\frac{t}{z} \cdot \frac{-1}{y}\right)\\

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


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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(\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. associate-*l/98.2%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{\frac{-1}{3}}{z}} \cdot \left(y - \frac{t}{y}\right) \]
      14. 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. Taylor expanded in y around inf 85.6%

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

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

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

        \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
      3. *-commutative85.6%

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

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

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

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

    if -1.44999999999999997e-38 < y < 1.81999999999999991e-84

    1. Initial program 91.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-neg91.5%

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

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

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-1}{z \cdot 3} \cdot y} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
      9. neg-mul-191.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) \]
      10. times-frac87.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -0.3333333333333333 \cdot \color{blue}{\frac{-1 \cdot t}{z \cdot y}} \]
      3. neg-mul-167.5%

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

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

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

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

        \[\leadsto -0.3333333333333333 \cdot \color{blue}{\left(\frac{-1}{y} \cdot \frac{t}{z}\right)} \]
    10. Applied egg-rr70.2%

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

    if 1.81999999999999991e-84 < y

    1. Initial program 99.9%

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

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

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

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

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

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

        \[\leadsto x - \frac{\color{blue}{y \cdot 0.3333333333333333}}{z} \]
    6. Applied egg-rr87.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.45 \cdot 10^{-38}:\\ \;\;\;\;x - \frac{y}{\frac{z}{0.3333333333333333}}\\ \mathbf{elif}\;y \leq 1.82 \cdot 10^{-84}:\\ \;\;\;\;-0.3333333333333333 \cdot \left(\frac{t}{z} \cdot \frac{-1}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\ \end{array} \]

Alternative 10: 92.2% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -750:\\
\;\;\;\;x - \frac{y}{\frac{z}{0.3333333333333333}}\\

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

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


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

    1. Initial program 98.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{\frac{-1}{3}}{z}} \cdot \left(y - \frac{t}{y}\right) \]
      14. 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. Taylor expanded in y around inf 89.9%

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

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

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

        \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
      3. *-commutative89.9%

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

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

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

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

    if -750 < y < 3.59999999999999994e-7

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-1}{z \cdot 3} \cdot y} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
      9. neg-mul-193.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) \]
      10. times-frac89.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{\frac{0.3333333333333333}{z}}{y} \cdot t} \]
      6. /-rgt-identity89.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{\frac{t}{y}}{z \cdot 3}} \]
      20. associate-/l/89.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{t}{z} \cdot \frac{\color{blue}{0.3333333333333333}}{y} \]
    10. Simplified92.0%

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

    if 3.59999999999999994e-7 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -750:\\ \;\;\;\;x - \frac{y}{\frac{z}{0.3333333333333333}}\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{-7}:\\ \;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\ \end{array} \]

Alternative 11: 75.8% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;y \leq 1.08 \cdot 10^{-85}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{-t}{y \cdot z}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{\frac{-1}{3}}{z}} \cdot \left(y - \frac{t}{y}\right) \]
      14. 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. Taylor expanded in y around inf 87.8%

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

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

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

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

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

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

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

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

    if -1.7e-16 < y < 1.07999999999999997e-85

    1. Initial program 91.8%

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-1}{z \cdot 3} \cdot y} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
      9. neg-mul-191.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) \]
      10. times-frac87.5%

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

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

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

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

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

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

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

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

      \[\leadsto -0.3333333333333333 \cdot \color{blue}{\left(-1 \cdot \frac{t}{y \cdot z}\right)} \]
    7. Step-by-step derivation
      1. *-commutative66.9%

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

        \[\leadsto -0.3333333333333333 \cdot \color{blue}{\frac{-1 \cdot t}{z \cdot y}} \]
      3. neg-mul-166.9%

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

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

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

    if 1.07999999999999997e-85 < y

    1. Initial program 99.9%

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

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

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

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

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

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

        \[\leadsto x - \frac{\color{blue}{y \cdot 0.3333333333333333}}{z} \]
    6. Applied egg-rr87.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{-16}:\\ \;\;\;\;x - \frac{y}{\frac{z}{0.3333333333333333}}\\ \mathbf{elif}\;y \leq 1.08 \cdot 10^{-85}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{-t}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\ \end{array} \]

Alternative 12: 75.4% accurate, 1.3× speedup?

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

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

\mathbf{elif}\;y \leq 2.45 \cdot 10^{-80}:\\
\;\;\;\;\frac{0.3333333333333333}{\frac{z}{\frac{t}{y}}}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{\frac{-1}{3}}{z}} \cdot \left(y - \frac{t}{y}\right) \]
      14. 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. Taylor expanded in y around inf 87.8%

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

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

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

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

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

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

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

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

    if -2.50000000000000018e-18 < y < 2.44999999999999995e-80

    1. Initial program 91.8%

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-1}{z \cdot 3} \cdot y} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
      9. neg-mul-191.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) \]
      10. times-frac87.5%

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

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

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

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

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

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

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

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

      \[\leadsto -0.3333333333333333 \cdot \color{blue}{\left(-1 \cdot \frac{t}{y \cdot z}\right)} \]
    7. Step-by-step derivation
      1. *-commutative66.9%

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

        \[\leadsto -0.3333333333333333 \cdot \color{blue}{\frac{-1 \cdot t}{z \cdot y}} \]
      3. neg-mul-166.9%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{\frac{y \cdot z}{t}}} \]
      6. add-sqr-sqrt25.6%

        \[\leadsto \frac{0.3333333333333333}{\frac{y \cdot z}{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}} \]
      7. sqrt-unprod21.8%

        \[\leadsto \frac{0.3333333333333333}{\frac{y \cdot z}{\color{blue}{\sqrt{t \cdot t}}}} \]
      8. sqr-neg21.8%

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

        \[\leadsto \frac{0.3333333333333333}{\frac{y \cdot z}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}} \]
      10. *-commutative0.8%

        \[\leadsto \frac{0.3333333333333333}{\frac{\color{blue}{z \cdot y}}{\sqrt{-t} \cdot \sqrt{-t}}} \]
      11. add-sqr-sqrt1.5%

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

        \[\leadsto \frac{0.3333333333333333}{\color{blue}{\frac{z}{\frac{-t}{y}}}} \]
      13. add-sqr-sqrt0.7%

        \[\leadsto \frac{0.3333333333333333}{\frac{z}{\frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{y}}} \]
      14. sqrt-unprod21.9%

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

        \[\leadsto \frac{0.3333333333333333}{\frac{z}{\frac{\sqrt{\color{blue}{t \cdot t}}}{y}}} \]
      16. sqrt-unprod24.7%

        \[\leadsto \frac{0.3333333333333333}{\frac{z}{\frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{y}}} \]
      17. add-sqr-sqrt59.9%

        \[\leadsto \frac{0.3333333333333333}{\frac{z}{\frac{\color{blue}{t}}{y}}} \]
    10. Applied egg-rr59.9%

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

    if 2.44999999999999995e-80 < y

    1. Initial program 99.9%

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

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

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

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

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

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

        \[\leadsto x - \frac{\color{blue}{y \cdot 0.3333333333333333}}{z} \]
    6. Applied egg-rr87.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{-18}:\\ \;\;\;\;x - \frac{y}{\frac{z}{0.3333333333333333}}\\ \mathbf{elif}\;y \leq 2.45 \cdot 10^{-80}:\\ \;\;\;\;\frac{0.3333333333333333}{\frac{z}{\frac{t}{y}}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\ \end{array} \]

Alternative 13: 75.8% accurate, 1.3× speedup?

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

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

\mathbf{elif}\;y \leq 9.6 \cdot 10^{-79}:\\
\;\;\;\;\frac{t}{\frac{y \cdot z}{0.3333333333333333}}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{\frac{-1}{3}}{z}} \cdot \left(y - \frac{t}{y}\right) \]
      14. 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. Taylor expanded in y around inf 87.8%

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

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

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

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

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

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

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

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

    if -3.90000000000000005e-18 < y < 9.60000000000000023e-79

    1. Initial program 91.8%

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-1}{z \cdot 3} \cdot y} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
      9. neg-mul-191.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) \]
      10. times-frac87.5%

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

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

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

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

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

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

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

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

      \[\leadsto -0.3333333333333333 \cdot \color{blue}{\left(-1 \cdot \frac{t}{y \cdot z}\right)} \]
    7. Step-by-step derivation
      1. *-commutative66.9%

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

        \[\leadsto -0.3333333333333333 \cdot \color{blue}{\frac{-1 \cdot t}{z \cdot y}} \]
      3. neg-mul-166.9%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{y \cdot z}{0.3333333333333333}}} \]
      7. *-commutative66.8%

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

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

    if 9.60000000000000023e-79 < y

    1. Initial program 99.9%

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

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

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

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

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

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

        \[\leadsto x - \frac{\color{blue}{y \cdot 0.3333333333333333}}{z} \]
    6. Applied egg-rr87.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.9 \cdot 10^{-18}:\\ \;\;\;\;x - \frac{y}{\frac{z}{0.3333333333333333}}\\ \mathbf{elif}\;y \leq 9.6 \cdot 10^{-79}:\\ \;\;\;\;\frac{t}{\frac{y \cdot z}{0.3333333333333333}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\ \end{array} \]

Alternative 14: 65.3% accurate, 2.1× speedup?

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \left(\color{blue}{\frac{-1}{z \cdot 3} \cdot y} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
    9. neg-mul-196.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) \]
    10. times-frac94.6%

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

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

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

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

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

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

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

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

Alternative 15: 65.3% accurate, 2.1× speedup?

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

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

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

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

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

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

    \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
  5. Final simplification63.1%

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

Alternative 16: 65.3% accurate, 2.1× speedup?

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \left(\color{blue}{\frac{-1}{z \cdot 3} \cdot y} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
    9. neg-mul-196.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) \]
    10. times-frac94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto x - \frac{y}{\color{blue}{z \cdot 3}} \]
  11. Final simplification63.1%

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

Alternative 17: 65.3% accurate, 2.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 31.1% 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 96.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-neg96.1%

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

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

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

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

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

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

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

      \[\leadsto x + \left(\color{blue}{\frac{-1}{z \cdot 3} \cdot y} - \frac{-t}{\left(z \cdot 3\right) \cdot y}\right) \]
    9. neg-mul-196.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) \]
    10. times-frac94.6%

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification30.4%

    \[\leadsto x \]

Developer target: 96.1% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2023301 
(FPCore (x y z t)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, H"
  :precision binary64

  :herbie-target
  (+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))

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