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

Percentage Accurate: 95.8% → 97.5%
Time: 8.7s
Alternatives: 13
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 13 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.8% 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.5% accurate, 1.0× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.1000000000000003e-222 < y < 4.3999999999999998e-81

    1. Initial program 91.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.3999999999999998e-81 < y

    1. Initial program 98.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(\frac{-1}{z \cdot 3} \cdot y - \color{blue}{\frac{-t}{\left(z \cdot 3\right) \cdot y}}\right) \]
      10. 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) \]
      11. 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) \]
      12. distribute-lft-out--99.6%

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

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

        \[\leadsto x + \color{blue}{\frac{\frac{-1}{3}}{z}} \cdot \left(y - \frac{t}{y}\right) \]
      15. 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}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.1 \cdot 10^{-222}:\\ \;\;\;\;x + -0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{-81}:\\ \;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}\\ \end{array} \]

Alternative 2: 97.7% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (-.f64 x (/.f64 y (*.f64 z 3))) (/.f64 t (*.f64 (*.f64 z 3) y))) < 1e303

    1. Initial program 98.1%

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

    if 1e303 < (+.f64 (-.f64 x (/.f64 y (*.f64 z 3))) (/.f64 t (*.f64 (*.f64 z 3) y)))

    1. Initial program 86.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 81.2% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;z \leq -3.5 \cdot 10^{+33}:\\
\;\;\;\;x + \frac{y}{\frac{z}{-0.3333333333333333}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -7.50000000000000005e264

    1. Initial program 84.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.50000000000000005e264 < z < -1.65e252

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.65e252 < z < -3.5000000000000001e33

    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. associate-+l-99.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{\frac{-1}{3}}{z}} \cdot \left(y - \frac{t}{y}\right) \]
      15. 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. Step-by-step derivation
      1. div-inv86.5%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{-0.3333333333333333}}} + x \]
    11. Applied egg-rr77.8%

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

    if -3.5000000000000001e33 < z < 3.50000000000000015e47

    1. Initial program 94.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.50000000000000015e47 < z

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{+264}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{+252}:\\ \;\;\;\;t \cdot \frac{0.3333333333333333}{y \cdot z}\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{+33}:\\ \;\;\;\;x + \frac{y}{\frac{z}{-0.3333333333333333}}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+47}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\ \mathbf{else}:\\ \;\;\;\;x + -0.3333333333333333 \cdot \frac{y}{z}\\ \end{array} \]

Alternative 4: 75.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{if}\;y \leq -2.55 \cdot 10^{-46}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq -1.1 \cdot 10^{-141} \lor \neg \left(y \leq 3.2 \cdot 10^{-58}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.5499999999999999e-46 or -1.99999999999999988e-98 < y < -1.10000000000000005e-141 or 3.2000000000000001e-58 < y

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(\frac{-1}{z \cdot 3} \cdot y - \color{blue}{\frac{-t}{\left(z \cdot 3\right) \cdot y}}\right) \]
      10. 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) \]
      11. 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) \]
      12. distribute-lft-out--99.7%

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

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

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

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

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

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

    if -2.5499999999999999e-46 < y < -1.99999999999999988e-98

    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. sub-neg99.7%

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

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

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

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

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

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

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

        \[\leadsto x + \left(\frac{-1}{z \cdot 3} \cdot y - \color{blue}{\frac{-t}{\left(z \cdot 3\right) \cdot y}}\right) \]
      10. 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) \]
      11. 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) \]
      12. distribute-lft-out--99.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.10000000000000005e-141 < y < 3.2000000000000001e-58

    1. Initial program 92.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.55 \cdot 10^{-46}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq -2 \cdot 10^{-98}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{elif}\;y \leq -1.1 \cdot 10^{-141} \lor \neg \left(y \leq 3.2 \cdot 10^{-58}\right):\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{0.3333333333333333}{y \cdot z}\\ \end{array} \]

Alternative 5: 75.2% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;y \leq -1.04 \cdot 10^{-144} \lor \neg \left(y \leq 5.5 \cdot 10^{-57}\right):\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.55e-46 < y < -3e-98

    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. sub-neg99.7%

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

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

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

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

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

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

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

        \[\leadsto x + \left(\frac{-1}{z \cdot 3} \cdot y - \color{blue}{\frac{-t}{\left(z \cdot 3\right) \cdot y}}\right) \]
      10. 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) \]
      11. 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) \]
      12. distribute-lft-out--99.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3e-98 < y < -1.04e-144 or 5.50000000000000011e-57 < y

    1. Initial program 98.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(\frac{-1}{z \cdot 3} \cdot y - \color{blue}{\frac{-t}{\left(z \cdot 3\right) \cdot y}}\right) \]
      10. 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) \]
      11. 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) \]
      12. distribute-lft-out--99.6%

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

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

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

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

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

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

    if -1.04e-144 < y < 5.50000000000000011e-57

    1. Initial program 92.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{-46}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq -3 \cdot 10^{-98}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{elif}\;y \leq -1.04 \cdot 10^{-144} \lor \neg \left(y \leq 5.5 \cdot 10^{-57}\right):\\ \;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{0.3333333333333333}{y \cdot z}\\ \end{array} \]

Alternative 6: 75.3% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;y \leq -1.7 \cdot 10^{-143} \lor \neg \left(y \leq 6.8 \cdot 10^{-59}\right):\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -7.9999999999999998e-47

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.9999999999999998e-47 < y < -1.6e-98

    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. sub-neg99.7%

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

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

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

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

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

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

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

        \[\leadsto x + \left(\frac{-1}{z \cdot 3} \cdot y - \color{blue}{\frac{-t}{\left(z \cdot 3\right) \cdot y}}\right) \]
      10. 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) \]
      11. 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) \]
      12. distribute-lft-out--99.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.6e-98 < y < -1.69999999999999992e-143 or 6.80000000000000035e-59 < y

    1. Initial program 98.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(\frac{-1}{z \cdot 3} \cdot y - \color{blue}{\frac{-t}{\left(z \cdot 3\right) \cdot y}}\right) \]
      10. 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) \]
      11. 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) \]
      12. distribute-lft-out--99.6%

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

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

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

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

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

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

    if -1.69999999999999992e-143 < y < 6.80000000000000035e-59

    1. Initial program 92.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{-47}:\\ \;\;\;\;x + -0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq -1.6 \cdot 10^{-98}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{-143} \lor \neg \left(y \leq 6.8 \cdot 10^{-59}\right):\\ \;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{0.3333333333333333}{y \cdot z}\\ \end{array} \]

Alternative 7: 97.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.1 \cdot 10^{-223} \lor \neg \left(y \leq 4.1 \cdot 10^{-81}\right):\\ \;\;\;\;x + \left(y - \frac{t}{y}\right) \cdot \frac{-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 -1.1e-223) (not (<= y 4.1e-81)))
   (+ 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 <= -1.1e-223) || !(y <= 4.1e-81)) {
		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 <= (-1.1d-223)) .or. (.not. (y <= 4.1d-81))) 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 <= -1.1e-223) || !(y <= 4.1e-81)) {
		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 <= -1.1e-223) or not (y <= 4.1e-81):
		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 <= -1.1e-223) || !(y <= 4.1e-81))
		tmp = Float64(x + Float64(Float64(y - Float64(t / y)) * Float64(-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 <= -1.1e-223) || ~((y <= 4.1e-81)))
		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, -1.1e-223], N[Not[LessEqual[y, 4.1e-81]], $MachinePrecision]], N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / 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 -1.1 \cdot 10^{-223} \lor \neg \left(y \leq 4.1 \cdot 10^{-81}\right):\\
\;\;\;\;x + \left(y - \frac{t}{y}\right) \cdot \frac{-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 < -1.10000000000000004e-223 or 4.09999999999999984e-81 < y

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.10000000000000004e-223 < y < 4.09999999999999984e-81

    1. Initial program 91.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 97.5% accurate, 1.0× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.6999999999999999e-222 < y < 4.09999999999999984e-81

    1. Initial program 91.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.09999999999999984e-81 < y

    1. Initial program 98.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(\frac{-1}{z \cdot 3} \cdot y - \color{blue}{\frac{-t}{\left(z \cdot 3\right) \cdot y}}\right) \]
      10. 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) \]
      11. 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) \]
      12. distribute-lft-out--99.6%

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

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

        \[\leadsto x + \color{blue}{\frac{\frac{-1}{3}}{z}} \cdot \left(y - \frac{t}{y}\right) \]
      15. 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}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.7 \cdot 10^{-222}:\\ \;\;\;\;x + \left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 4.1 \cdot 10^{-81}:\\ \;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}\\ \end{array} \]

Alternative 9: 95.8% 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}
Derivation
  1. Initial program 96.5%

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

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

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

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

Alternative 10: 59.0% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{if}\;y \leq -1 \cdot 10^{+169}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{-43}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 6.6 \cdot 10^{-58}:\\ \;\;\;\;t \cdot \frac{0.3333333333333333}{y \cdot z}\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{+29}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* -0.3333333333333333 (/ y z))))
   (if (<= y -1e+169)
     t_1
     (if (<= y -5.2e-43)
       x
       (if (<= y 6.6e-58)
         (* t (/ 0.3333333333333333 (* y z)))
         (if (<= y 1.35e+29) x t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = -0.3333333333333333 * (y / z);
	double tmp;
	if (y <= -1e+169) {
		tmp = t_1;
	} else if (y <= -5.2e-43) {
		tmp = x;
	} else if (y <= 6.6e-58) {
		tmp = t * (0.3333333333333333 / (y * z));
	} else if (y <= 1.35e+29) {
		tmp = x;
	} else {
		tmp = t_1;
	}
	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 / z)
    if (y <= (-1d+169)) then
        tmp = t_1
    else if (y <= (-5.2d-43)) then
        tmp = x
    else if (y <= 6.6d-58) then
        tmp = t * (0.3333333333333333d0 / (y * z))
    else if (y <= 1.35d+29) then
        tmp = x
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = -0.3333333333333333 * (y / z);
	double tmp;
	if (y <= -1e+169) {
		tmp = t_1;
	} else if (y <= -5.2e-43) {
		tmp = x;
	} else if (y <= 6.6e-58) {
		tmp = t * (0.3333333333333333 / (y * z));
	} else if (y <= 1.35e+29) {
		tmp = x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = -0.3333333333333333 * (y / z)
	tmp = 0
	if y <= -1e+169:
		tmp = t_1
	elif y <= -5.2e-43:
		tmp = x
	elif y <= 6.6e-58:
		tmp = t * (0.3333333333333333 / (y * z))
	elif y <= 1.35e+29:
		tmp = x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(-0.3333333333333333 * Float64(y / z))
	tmp = 0.0
	if (y <= -1e+169)
		tmp = t_1;
	elseif (y <= -5.2e-43)
		tmp = x;
	elseif (y <= 6.6e-58)
		tmp = Float64(t * Float64(0.3333333333333333 / Float64(y * z)));
	elseif (y <= 1.35e+29)
		tmp = x;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = -0.3333333333333333 * (y / z);
	tmp = 0.0;
	if (y <= -1e+169)
		tmp = t_1;
	elseif (y <= -5.2e-43)
		tmp = x;
	elseif (y <= 6.6e-58)
		tmp = t * (0.3333333333333333 / (y * z));
	elseif (y <= 1.35e+29)
		tmp = x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1e+169], t$95$1, If[LessEqual[y, -5.2e-43], x, If[LessEqual[y, 6.6e-58], N[(t * N[(0.3333333333333333 / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.35e+29], x, t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -5.2 \cdot 10^{-43}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;y \leq 1.35 \cdot 10^{+29}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.99999999999999934e168 or 1.35e29 < 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. associate-+l-98.6%

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(\frac{-1}{z \cdot 3} \cdot y - \color{blue}{\frac{-t}{\left(z \cdot 3\right) \cdot y}}\right) \]
      10. 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) \]
      11. 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) \]
      12. distribute-lft-out--99.7%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{z} \cdot -0.3333333333333333} \]
    10. Simplified74.2%

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

    if -9.99999999999999934e168 < y < -5.2e-43 or 6.60000000000000052e-58 < y < 1.35e29

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.2e-43 < y < 6.60000000000000052e-58

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1 \cdot 10^{+169}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{-43}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 6.6 \cdot 10^{-58}:\\ \;\;\;\;t \cdot \frac{0.3333333333333333}{y \cdot z}\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{+29}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\ \end{array} \]

Alternative 11: 90.8% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.6 \cdot 10^{+38}:\\ \;\;\;\;x + -0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{-51}:\\ \;\;\;\;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 -2.6e+38)
   (+ x (* -0.3333333333333333 (/ y z)))
   (if (<= y 4.5e-51)
     (+ 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 <= -2.6e+38) {
		tmp = x + (-0.3333333333333333 * (y / z));
	} else if (y <= 4.5e-51) {
		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 <= (-2.6d+38)) then
        tmp = x + ((-0.3333333333333333d0) * (y / z))
    else if (y <= 4.5d-51) 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 <= -2.6e+38) {
		tmp = x + (-0.3333333333333333 * (y / z));
	} else if (y <= 4.5e-51) {
		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 <= -2.6e+38:
		tmp = x + (-0.3333333333333333 * (y / z))
	elif y <= 4.5e-51:
		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 <= -2.6e+38)
		tmp = Float64(x + Float64(-0.3333333333333333 * Float64(y / z)));
	elseif (y <= 4.5e-51)
		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 <= -2.6e+38)
		tmp = x + (-0.3333333333333333 * (y / z));
	elseif (y <= 4.5e-51)
		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, -2.6e+38], N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e-51], 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 -2.6 \cdot 10^{+38}:\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y}{z}\\

\mathbf{elif}\;y \leq 4.5 \cdot 10^{-51}:\\
\;\;\;\;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 < -2.5999999999999999e38

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.5999999999999999e38 < y < 4.49999999999999974e-51

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.49999999999999974e-51 < 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. associate-+l-98.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 48.8% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.3 \cdot 10^{+33}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.75 \cdot 10^{+39}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.30000000000000028e33 or 1.7500000000000001e39 < z

    1. Initial program 99.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.30000000000000028e33 < z < 1.7500000000000001e39

    1. Initial program 94.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.3 \cdot 10^{+33}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{+39}:\\ \;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 13: 30.5% 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.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-96.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification34.8%

    \[\leadsto x \]

Developer target: 95.8% 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 2023175 
(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))))