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

Percentage Accurate: 95.4% → 97.3%
Time: 11.4s
Alternatives: 18
Speedup: 1.4×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 95.4% 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.3% 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^{+264}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - \frac{t}{y}}{z \cdot -3}\\ \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+264) t_1 (+ x (/ (- y (/ t y)) (* z -3.0))))))
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+264) {
		tmp = t_1;
	} else {
		tmp = x + ((y - (t / y)) / (z * -3.0));
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x - (y / (z * 3.0d0))) + (t / (y * (z * 3.0d0)))
    if (t_1 <= 1d+264) then
        tmp = t_1
    else
        tmp = x + ((y - (t / y)) / (z * (-3.0d0)))
    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+264) {
		tmp = t_1;
	} else {
		tmp = x + ((y - (t / y)) / (z * -3.0));
	}
	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+264:
		tmp = t_1
	else:
		tmp = x + ((y - (t / y)) / (z * -3.0))
	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+264)
		tmp = t_1;
	else
		tmp = Float64(x + Float64(Float64(y - Float64(t / y)) / Float64(z * -3.0)));
	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+264)
		tmp = t_1;
	else
		tmp = x + ((y - (t / y)) / (z * -3.0));
	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+264], t$95$1, N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * -3.0), $MachinePrecision]), $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^{+264}:\\
\;\;\;\;t_1\\

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


\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))) < 1.00000000000000004e264

    1. Initial program 98.8%

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

    if 1.00000000000000004e264 < (+.f64 (-.f64 x (/.f64 y (*.f64 z 3))) (/.f64 t (*.f64 (*.f64 z 3) y)))

    1. Initial program 92.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-92.2%

        \[\leadsto \color{blue}{x - \left(\frac{y}{z \cdot 3} - \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      2. sub-neg92.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-neg92.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-in92.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-neg92.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-192.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/92.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/92.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-frac92.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-192.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-frac96.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.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.9%

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

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

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

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

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

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

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

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

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

    \[\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^{+264}:\\ \;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{y \cdot \left(z \cdot 3\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - \frac{t}{y}}{z \cdot -3}\\ \end{array} \]

Alternative 2: 57.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{\frac{y}{z}}{-3}\\
\mathbf{if}\;y \leq -1.28 \cdot 10^{+41}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -6.5 \cdot 10^{+35}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq -9.5 \cdot 10^{-43}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq -9.8 \cdot 10^{-175}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 6.4 \cdot 10^{+41}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\

\mathbf{elif}\;y \leq 10^{+146}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.27999999999999992e41 or -6.5000000000000003e35 < y < -9.50000000000000044e-43

    1. Initial program 96.9%

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

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

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}}{z} \]
      2. *-un-lft-identity79.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(-y\right) \cdot \color{blue}{\frac{1}{3}}}{z} \]
      4. metadata-eval68.5%

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

        \[\leadsto \frac{\color{blue}{\frac{-y}{--3}}}{z} \]
      6. frac-2neg68.6%

        \[\leadsto \frac{\color{blue}{\frac{y}{-3}}}{z} \]
      7. associate-/l/68.5%

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

        \[\leadsto \color{blue}{\frac{\frac{y}{z}}{-3}} \]
    9. Applied egg-rr68.6%

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

    if -1.27999999999999992e41 < y < -6.5000000000000003e35 or -1.05e-93 < y < -9.79999999999999996e-175 or 6.40000000000000019e41 < y < 9.99999999999999934e145

    1. Initial program 99.8%

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

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

    if -9.50000000000000044e-43 < y < -1.05e-93

    1. Initial program 84.3%

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

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

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}}{z} \]
      2. *-un-lft-identity51.6%

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

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

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

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

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

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

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

    if -9.79999999999999996e-175 < y < 6.40000000000000019e41

    1. Initial program 96.5%

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

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

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

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

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

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

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

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

    if 9.99999999999999934e145 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(-y\right) \cdot \color{blue}{\frac{1}{3}}}{z} \]
      4. metadata-eval74.1%

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

        \[\leadsto \frac{\color{blue}{\frac{-y}{--3}}}{z} \]
      6. frac-2neg74.1%

        \[\leadsto \frac{\color{blue}{\frac{y}{-3}}}{z} \]
      7. div-inv74.1%

        \[\leadsto \frac{\color{blue}{y \cdot \frac{1}{-3}}}{z} \]
      8. metadata-eval74.1%

        \[\leadsto \frac{y \cdot \color{blue}{-0.3333333333333333}}{z} \]
      9. metadata-eval74.1%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{-0.3333333333333333}}} \]
      11. metadata-eval74.2%

        \[\leadsto \frac{y}{\frac{z}{\color{blue}{-0.3333333333333333}}} \]
    9. Applied egg-rr74.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.28 \cdot 10^{+41}:\\ \;\;\;\;\frac{\frac{y}{z}}{-3}\\ \mathbf{elif}\;y \leq -6.5 \cdot 10^{+35}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -9.5 \cdot 10^{-43}:\\ \;\;\;\;\frac{\frac{y}{z}}{-3}\\ \mathbf{elif}\;y \leq -1.05 \cdot 10^{-93}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ \mathbf{elif}\;y \leq -9.8 \cdot 10^{-175}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{+41}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{elif}\;y \leq 10^{+146}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{z}{-0.3333333333333333}}\\ \end{array} \]

Alternative 3: 57.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\frac{y}{z}}{-3}\\ \mathbf{if}\;y \leq -7.4 \cdot 10^{+40}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -7 \cdot 10^{+35}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -9.5 \cdot 10^{-43}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -6.7 \cdot 10^{-94}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ \mathbf{elif}\;y \leq -9.8 \cdot 10^{-175}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.36 \cdot 10^{+42}:\\ \;\;\;\;t \cdot \frac{0.3333333333333333}{y \cdot z}\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{+145}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{z}{-0.3333333333333333}}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (/ y z) -3.0)))
   (if (<= y -7.4e+40)
     t_1
     (if (<= y -7e+35)
       x
       (if (<= y -9.5e-43)
         t_1
         (if (<= y -6.7e-94)
           (* 0.3333333333333333 (/ (/ t z) y))
           (if (<= y -9.8e-175)
             x
             (if (<= y 1.36e+42)
               (* t (/ 0.3333333333333333 (* y z)))
               (if (<= y 3.5e+145) x (/ y (/ z -0.3333333333333333)))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (y / z) / -3.0;
	double tmp;
	if (y <= -7.4e+40) {
		tmp = t_1;
	} else if (y <= -7e+35) {
		tmp = x;
	} else if (y <= -9.5e-43) {
		tmp = t_1;
	} else if (y <= -6.7e-94) {
		tmp = 0.3333333333333333 * ((t / z) / y);
	} else if (y <= -9.8e-175) {
		tmp = x;
	} else if (y <= 1.36e+42) {
		tmp = t * (0.3333333333333333 / (y * z));
	} else if (y <= 3.5e+145) {
		tmp = x;
	} else {
		tmp = y / (z / -0.3333333333333333);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (y / z) / (-3.0d0)
    if (y <= (-7.4d+40)) then
        tmp = t_1
    else if (y <= (-7d+35)) then
        tmp = x
    else if (y <= (-9.5d-43)) then
        tmp = t_1
    else if (y <= (-6.7d-94)) then
        tmp = 0.3333333333333333d0 * ((t / z) / y)
    else if (y <= (-9.8d-175)) then
        tmp = x
    else if (y <= 1.36d+42) then
        tmp = t * (0.3333333333333333d0 / (y * z))
    else if (y <= 3.5d+145) then
        tmp = x
    else
        tmp = y / (z / (-0.3333333333333333d0))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (y / z) / -3.0;
	double tmp;
	if (y <= -7.4e+40) {
		tmp = t_1;
	} else if (y <= -7e+35) {
		tmp = x;
	} else if (y <= -9.5e-43) {
		tmp = t_1;
	} else if (y <= -6.7e-94) {
		tmp = 0.3333333333333333 * ((t / z) / y);
	} else if (y <= -9.8e-175) {
		tmp = x;
	} else if (y <= 1.36e+42) {
		tmp = t * (0.3333333333333333 / (y * z));
	} else if (y <= 3.5e+145) {
		tmp = x;
	} else {
		tmp = y / (z / -0.3333333333333333);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (y / z) / -3.0
	tmp = 0
	if y <= -7.4e+40:
		tmp = t_1
	elif y <= -7e+35:
		tmp = x
	elif y <= -9.5e-43:
		tmp = t_1
	elif y <= -6.7e-94:
		tmp = 0.3333333333333333 * ((t / z) / y)
	elif y <= -9.8e-175:
		tmp = x
	elif y <= 1.36e+42:
		tmp = t * (0.3333333333333333 / (y * z))
	elif y <= 3.5e+145:
		tmp = x
	else:
		tmp = y / (z / -0.3333333333333333)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(y / z) / -3.0)
	tmp = 0.0
	if (y <= -7.4e+40)
		tmp = t_1;
	elseif (y <= -7e+35)
		tmp = x;
	elseif (y <= -9.5e-43)
		tmp = t_1;
	elseif (y <= -6.7e-94)
		tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y));
	elseif (y <= -9.8e-175)
		tmp = x;
	elseif (y <= 1.36e+42)
		tmp = Float64(t * Float64(0.3333333333333333 / Float64(y * z)));
	elseif (y <= 3.5e+145)
		tmp = x;
	else
		tmp = Float64(y / Float64(z / -0.3333333333333333));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (y / z) / -3.0;
	tmp = 0.0;
	if (y <= -7.4e+40)
		tmp = t_1;
	elseif (y <= -7e+35)
		tmp = x;
	elseif (y <= -9.5e-43)
		tmp = t_1;
	elseif (y <= -6.7e-94)
		tmp = 0.3333333333333333 * ((t / z) / y);
	elseif (y <= -9.8e-175)
		tmp = x;
	elseif (y <= 1.36e+42)
		tmp = t * (0.3333333333333333 / (y * z));
	elseif (y <= 3.5e+145)
		tmp = x;
	else
		tmp = y / (z / -0.3333333333333333);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y / z), $MachinePrecision] / -3.0), $MachinePrecision]}, If[LessEqual[y, -7.4e+40], t$95$1, If[LessEqual[y, -7e+35], x, If[LessEqual[y, -9.5e-43], t$95$1, If[LessEqual[y, -6.7e-94], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -9.8e-175], x, If[LessEqual[y, 1.36e+42], N[(t * N[(0.3333333333333333 / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e+145], x, N[(y / N[(z / -0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{\frac{y}{z}}{-3}\\
\mathbf{if}\;y \leq -7.4 \cdot 10^{+40}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -7 \cdot 10^{+35}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq -9.5 \cdot 10^{-43}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq -9.8 \cdot 10^{-175}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.36 \cdot 10^{+42}:\\
\;\;\;\;t \cdot \frac{0.3333333333333333}{y \cdot z}\\

\mathbf{elif}\;y \leq 3.5 \cdot 10^{+145}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -7.4e40 or -7.0000000000000001e35 < y < -9.50000000000000044e-43

    1. Initial program 96.9%

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

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

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}}{z} \]
      2. *-un-lft-identity79.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(-y\right) \cdot \color{blue}{\frac{1}{3}}}{z} \]
      4. metadata-eval68.5%

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

        \[\leadsto \frac{\color{blue}{\frac{-y}{--3}}}{z} \]
      6. frac-2neg68.6%

        \[\leadsto \frac{\color{blue}{\frac{y}{-3}}}{z} \]
      7. associate-/l/68.5%

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

        \[\leadsto \color{blue}{\frac{\frac{y}{z}}{-3}} \]
    9. Applied egg-rr68.6%

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

    if -7.4e40 < y < -7.0000000000000001e35 or -6.69999999999999995e-94 < y < -9.79999999999999996e-175 or 1.35999999999999999e42 < y < 3.5000000000000001e145

    1. Initial program 99.8%

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

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

    if -9.50000000000000044e-43 < y < -6.69999999999999995e-94

    1. Initial program 84.3%

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

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

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}}{z} \]
      2. *-un-lft-identity51.6%

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

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

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

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

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

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

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

    if -9.79999999999999996e-175 < y < 1.35999999999999999e42

    1. Initial program 96.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.5000000000000001e145 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(-y\right) \cdot \color{blue}{\frac{1}{3}}}{z} \]
      4. metadata-eval74.1%

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

        \[\leadsto \frac{\color{blue}{\frac{-y}{--3}}}{z} \]
      6. frac-2neg74.1%

        \[\leadsto \frac{\color{blue}{\frac{y}{-3}}}{z} \]
      7. div-inv74.1%

        \[\leadsto \frac{\color{blue}{y \cdot \frac{1}{-3}}}{z} \]
      8. metadata-eval74.1%

        \[\leadsto \frac{y \cdot \color{blue}{-0.3333333333333333}}{z} \]
      9. metadata-eval74.1%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{-0.3333333333333333}}} \]
      11. metadata-eval74.2%

        \[\leadsto \frac{y}{\frac{z}{\color{blue}{-0.3333333333333333}}} \]
    9. Applied egg-rr74.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.4 \cdot 10^{+40}:\\ \;\;\;\;\frac{\frac{y}{z}}{-3}\\ \mathbf{elif}\;y \leq -7 \cdot 10^{+35}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -9.5 \cdot 10^{-43}:\\ \;\;\;\;\frac{\frac{y}{z}}{-3}\\ \mathbf{elif}\;y \leq -6.7 \cdot 10^{-94}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ \mathbf{elif}\;y \leq -9.8 \cdot 10^{-175}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.36 \cdot 10^{+42}:\\ \;\;\;\;t \cdot \frac{0.3333333333333333}{y \cdot z}\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{+145}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{z}{-0.3333333333333333}}\\ \end{array} \]

Alternative 4: 85.8% accurate, 0.9× speedup?

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

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

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

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

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

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


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

    1. Initial program 96.7%

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

        \[\leadsto \color{blue}{x - \left(\frac{y}{z \cdot 3} - \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      2. sub-neg96.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-neg96.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-in96.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-neg96.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-196.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/96.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/96.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-frac96.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-196.7%

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

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

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

    if -8.00000000000000038e26 < y < 3.2999999999999999e-103

    1. Initial program 95.3%

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

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

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

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

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

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

        \[\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/95.3%

        \[\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/95.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-frac95.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-195.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-frac94.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--94.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{0.3333333333333333}{\frac{\color{blue}{z \cdot y}}{t}} \]
      2. *-un-lft-identity89.7%

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

        \[\leadsto x + \frac{0.3333333333333333}{\color{blue}{\frac{z}{1} \cdot \frac{y}{t}}} \]
      4. /-rgt-identity88.8%

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

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

    if 3.2999999999999999e-103 < y < 1.99999999999999994e59

    1. Initial program 99.6%

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

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

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}}{z} \]
      2. *-un-lft-identity80.7%

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

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

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

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

    if 1.99999999999999994e59 < y < 5.50000000000000022e87

    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.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*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. Taylor expanded in y around 0 100.0%

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

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

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

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

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

    if 5.50000000000000022e87 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{+26}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{-103}:\\ \;\;\;\;x + \frac{0.3333333333333333}{z \cdot \frac{y}{t}}\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+59}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{+87}:\\ \;\;\;\;x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{z \cdot -3}\\ \end{array} \]

Alternative 5: 72.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{if}\;y \leq -9.8 \cdot 10^{-175}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-121}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{-57} \lor \neg \left(y \leq 6.4 \cdot 10^{+21}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (+ x (* y (/ -0.3333333333333333 z)))))
   (if (<= y -9.8e-175)
     t_1
     (if (<= y 3.1e-121)
       (* 0.3333333333333333 (/ t (* y z)))
       (if (or (<= y 2.1e-57) (not (<= y 6.4e+21)))
         t_1
         (* 0.3333333333333333 (/ (/ t z) y)))))))
double code(double x, double y, double z, double t) {
	double t_1 = x + (y * (-0.3333333333333333 / z));
	double tmp;
	if (y <= -9.8e-175) {
		tmp = t_1;
	} else if (y <= 3.1e-121) {
		tmp = 0.3333333333333333 * (t / (y * z));
	} else if ((y <= 2.1e-57) || !(y <= 6.4e+21)) {
		tmp = t_1;
	} else {
		tmp = 0.3333333333333333 * ((t / z) / y);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (y * ((-0.3333333333333333d0) / z))
    if (y <= (-9.8d-175)) then
        tmp = t_1
    else if (y <= 3.1d-121) then
        tmp = 0.3333333333333333d0 * (t / (y * z))
    else if ((y <= 2.1d-57) .or. (.not. (y <= 6.4d+21))) then
        tmp = t_1
    else
        tmp = 0.3333333333333333d0 * ((t / z) / y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x + (y * (-0.3333333333333333 / z));
	double tmp;
	if (y <= -9.8e-175) {
		tmp = t_1;
	} else if (y <= 3.1e-121) {
		tmp = 0.3333333333333333 * (t / (y * z));
	} else if ((y <= 2.1e-57) || !(y <= 6.4e+21)) {
		tmp = t_1;
	} else {
		tmp = 0.3333333333333333 * ((t / z) / y);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x + (y * (-0.3333333333333333 / z))
	tmp = 0
	if y <= -9.8e-175:
		tmp = t_1
	elif y <= 3.1e-121:
		tmp = 0.3333333333333333 * (t / (y * z))
	elif (y <= 2.1e-57) or not (y <= 6.4e+21):
		tmp = t_1
	else:
		tmp = 0.3333333333333333 * ((t / z) / y)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x + Float64(y * Float64(-0.3333333333333333 / z)))
	tmp = 0.0
	if (y <= -9.8e-175)
		tmp = t_1;
	elseif (y <= 3.1e-121)
		tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z)));
	elseif ((y <= 2.1e-57) || !(y <= 6.4e+21))
		tmp = t_1;
	else
		tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x + (y * (-0.3333333333333333 / z));
	tmp = 0.0;
	if (y <= -9.8e-175)
		tmp = t_1;
	elseif (y <= 3.1e-121)
		tmp = 0.3333333333333333 * (t / (y * z));
	elseif ((y <= 2.1e-57) || ~((y <= 6.4e+21)))
		tmp = t_1;
	else
		tmp = 0.3333333333333333 * ((t / z) / y);
	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, -9.8e-175], t$95$1, If[LessEqual[y, 3.1e-121], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 2.1e-57], N[Not[LessEqual[y, 6.4e+21]], $MachinePrecision]], t$95$1, N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq 2.1 \cdot 10^{-57} \lor \neg \left(y \leq 6.4 \cdot 10^{+21}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.79999999999999996e-175 or 3.0999999999999998e-121 < y < 2.0999999999999999e-57 or 6.4e21 < y

    1. Initial program 97.2%

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

        \[\leadsto \color{blue}{x - \left(\frac{y}{z \cdot 3} - \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      2. sub-neg97.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-neg97.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-in97.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-neg97.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-197.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/97.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/97.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-frac97.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-197.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-frac96.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--97.8%

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

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

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

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

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

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

    if -9.79999999999999996e-175 < y < 3.0999999999999998e-121

    1. Initial program 96.1%

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

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

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}}{z} \]
      2. *-un-lft-identity70.4%

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

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

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

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

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

    if 2.0999999999999999e-57 < y < 6.4e21

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.8 \cdot 10^{-175}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-121}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{-57} \lor \neg \left(y \leq 6.4 \cdot 10^{+21}\right):\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ \end{array} \]

Alternative 6: 72.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{if}\;y \leq -6.6 \cdot 10^{-175}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 6.6 \cdot 10^{-125}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{-57}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{+21}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{-0.3333333333333333}{\frac{z}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (+ x (* y (/ -0.3333333333333333 z)))))
   (if (<= y -6.6e-175)
     t_1
     (if (<= y 6.6e-125)
       (* 0.3333333333333333 (/ t (* y z)))
       (if (<= y 1.65e-57)
         t_1
         (if (<= y 6.4e+21)
           (* 0.3333333333333333 (/ (/ t z) y))
           (+ x (/ -0.3333333333333333 (/ z y)))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x + (y * (-0.3333333333333333 / z));
	double tmp;
	if (y <= -6.6e-175) {
		tmp = t_1;
	} else if (y <= 6.6e-125) {
		tmp = 0.3333333333333333 * (t / (y * z));
	} else if (y <= 1.65e-57) {
		tmp = t_1;
	} else if (y <= 6.4e+21) {
		tmp = 0.3333333333333333 * ((t / z) / y);
	} else {
		tmp = x + (-0.3333333333333333 / (z / y));
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (y * ((-0.3333333333333333d0) / z))
    if (y <= (-6.6d-175)) then
        tmp = t_1
    else if (y <= 6.6d-125) then
        tmp = 0.3333333333333333d0 * (t / (y * z))
    else if (y <= 1.65d-57) then
        tmp = t_1
    else if (y <= 6.4d+21) then
        tmp = 0.3333333333333333d0 * ((t / z) / y)
    else
        tmp = x + ((-0.3333333333333333d0) / (z / y))
    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 <= -6.6e-175) {
		tmp = t_1;
	} else if (y <= 6.6e-125) {
		tmp = 0.3333333333333333 * (t / (y * z));
	} else if (y <= 1.65e-57) {
		tmp = t_1;
	} else if (y <= 6.4e+21) {
		tmp = 0.3333333333333333 * ((t / z) / y);
	} else {
		tmp = x + (-0.3333333333333333 / (z / y));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x + (y * (-0.3333333333333333 / z))
	tmp = 0
	if y <= -6.6e-175:
		tmp = t_1
	elif y <= 6.6e-125:
		tmp = 0.3333333333333333 * (t / (y * z))
	elif y <= 1.65e-57:
		tmp = t_1
	elif y <= 6.4e+21:
		tmp = 0.3333333333333333 * ((t / z) / y)
	else:
		tmp = x + (-0.3333333333333333 / (z / y))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x + Float64(y * Float64(-0.3333333333333333 / z)))
	tmp = 0.0
	if (y <= -6.6e-175)
		tmp = t_1;
	elseif (y <= 6.6e-125)
		tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z)));
	elseif (y <= 1.65e-57)
		tmp = t_1;
	elseif (y <= 6.4e+21)
		tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y));
	else
		tmp = Float64(x + Float64(-0.3333333333333333 / Float64(z / y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x + (y * (-0.3333333333333333 / z));
	tmp = 0.0;
	if (y <= -6.6e-175)
		tmp = t_1;
	elseif (y <= 6.6e-125)
		tmp = 0.3333333333333333 * (t / (y * z));
	elseif (y <= 1.65e-57)
		tmp = t_1;
	elseif (y <= 6.4e+21)
		tmp = 0.3333333333333333 * ((t / z) / y);
	else
		tmp = x + (-0.3333333333333333 / (z / y));
	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, -6.6e-175], t$95$1, If[LessEqual[y, 6.6e-125], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.65e-57], t$95$1, If[LessEqual[y, 6.4e+21], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq 1.65 \cdot 10^{-57}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 6.4 \cdot 10^{+21}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -6.59999999999999997e-175 or 6.6000000000000001e-125 < y < 1.6499999999999999e-57

    1. Initial program 96.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-96.0%

        \[\leadsto \color{blue}{x - \left(\frac{y}{z \cdot 3} - \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      2. sub-neg96.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-neg96.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-in96.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-neg96.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-196.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/96.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/96.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-frac96.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-196.0%

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

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

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

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

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

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

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

    if -6.59999999999999997e-175 < y < 6.6000000000000001e-125

    1. Initial program 96.1%

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

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

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}}{z} \]
      2. *-un-lft-identity70.4%

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

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

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

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

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

    if 1.6499999999999999e-57 < y < 6.4e21

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

    if 6.4e21 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.6 \cdot 10^{-175}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 6.6 \cdot 10^{-125}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{-57}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{+21}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{-0.3333333333333333}{\frac{z}{y}}\\ \end{array} \]

Alternative 7: 72.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{if}\;y \leq -9.8 \cdot 10^{-175}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 3.9 \cdot 10^{-122}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{elif}\;y \leq 10^{-57}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{+21}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{z \cdot -3}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (+ x (* y (/ -0.3333333333333333 z)))))
   (if (<= y -9.8e-175)
     t_1
     (if (<= y 3.9e-122)
       (* 0.3333333333333333 (/ t (* y z)))
       (if (<= y 1e-57)
         t_1
         (if (<= y 6.4e+21)
           (* 0.3333333333333333 (/ (/ t z) y))
           (+ x (/ y (* z -3.0)))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x + (y * (-0.3333333333333333 / z));
	double tmp;
	if (y <= -9.8e-175) {
		tmp = t_1;
	} else if (y <= 3.9e-122) {
		tmp = 0.3333333333333333 * (t / (y * z));
	} else if (y <= 1e-57) {
		tmp = t_1;
	} else if (y <= 6.4e+21) {
		tmp = 0.3333333333333333 * ((t / z) / y);
	} else {
		tmp = x + (y / (z * -3.0));
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (y * ((-0.3333333333333333d0) / z))
    if (y <= (-9.8d-175)) then
        tmp = t_1
    else if (y <= 3.9d-122) then
        tmp = 0.3333333333333333d0 * (t / (y * z))
    else if (y <= 1d-57) then
        tmp = t_1
    else if (y <= 6.4d+21) then
        tmp = 0.3333333333333333d0 * ((t / z) / y)
    else
        tmp = x + (y / (z * (-3.0d0)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x + (y * (-0.3333333333333333 / z));
	double tmp;
	if (y <= -9.8e-175) {
		tmp = t_1;
	} else if (y <= 3.9e-122) {
		tmp = 0.3333333333333333 * (t / (y * z));
	} else if (y <= 1e-57) {
		tmp = t_1;
	} else if (y <= 6.4e+21) {
		tmp = 0.3333333333333333 * ((t / z) / y);
	} else {
		tmp = x + (y / (z * -3.0));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x + (y * (-0.3333333333333333 / z))
	tmp = 0
	if y <= -9.8e-175:
		tmp = t_1
	elif y <= 3.9e-122:
		tmp = 0.3333333333333333 * (t / (y * z))
	elif y <= 1e-57:
		tmp = t_1
	elif y <= 6.4e+21:
		tmp = 0.3333333333333333 * ((t / z) / y)
	else:
		tmp = x + (y / (z * -3.0))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x + Float64(y * Float64(-0.3333333333333333 / z)))
	tmp = 0.0
	if (y <= -9.8e-175)
		tmp = t_1;
	elseif (y <= 3.9e-122)
		tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z)));
	elseif (y <= 1e-57)
		tmp = t_1;
	elseif (y <= 6.4e+21)
		tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y));
	else
		tmp = Float64(x + Float64(y / Float64(z * -3.0)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x + (y * (-0.3333333333333333 / z));
	tmp = 0.0;
	if (y <= -9.8e-175)
		tmp = t_1;
	elseif (y <= 3.9e-122)
		tmp = 0.3333333333333333 * (t / (y * z));
	elseif (y <= 1e-57)
		tmp = t_1;
	elseif (y <= 6.4e+21)
		tmp = 0.3333333333333333 * ((t / z) / y);
	else
		tmp = x + (y / (z * -3.0));
	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, -9.8e-175], t$95$1, If[LessEqual[y, 3.9e-122], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e-57], t$95$1, If[LessEqual[y, 6.4e+21], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq 10^{-57}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 6.4 \cdot 10^{+21}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -9.79999999999999996e-175 or 3.8999999999999999e-122 < y < 9.99999999999999955e-58

    1. Initial program 96.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-96.0%

        \[\leadsto \color{blue}{x - \left(\frac{y}{z \cdot 3} - \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      2. sub-neg96.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-neg96.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-in96.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-neg96.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-196.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/96.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/96.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-frac96.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-196.0%

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

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

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

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

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

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

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

    if -9.79999999999999996e-175 < y < 3.8999999999999999e-122

    1. Initial program 96.1%

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

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

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}}{z} \]
      2. *-un-lft-identity70.4%

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

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

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

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

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

    if 9.99999999999999955e-58 < y < 6.4e21

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

    if 6.4e21 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.8 \cdot 10^{-175}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 3.9 \cdot 10^{-122}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{elif}\;y \leq 10^{-57}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{+21}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{z \cdot -3}\\ \end{array} \]

Alternative 8: 57.7% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;y \leq -9.8 \cdot 10^{-175}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.56 \cdot 10^{+41}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\

\mathbf{elif}\;y \leq 3.5 \cdot 10^{+145}:\\
\;\;\;\;x\\

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


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

    1. Initial program 96.3%

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

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

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}}{z} \]
      2. *-un-lft-identity79.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(-y\right) \cdot \color{blue}{\frac{1}{3}}}{z} \]
      4. metadata-eval73.9%

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

        \[\leadsto \frac{\color{blue}{\frac{-y}{--3}}}{z} \]
      6. frac-2neg74.0%

        \[\leadsto \frac{\color{blue}{\frac{y}{-3}}}{z} \]
      7. associate-/l/73.9%

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

        \[\leadsto \color{blue}{\frac{\frac{y}{z}}{-3}} \]
    9. Applied egg-rr74.0%

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

    if -4.6e42 < y < -9.79999999999999996e-175 or 1.56e41 < y < 3.5000000000000001e145

    1. Initial program 97.4%

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

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

    if -9.79999999999999996e-175 < y < 1.56e41

    1. Initial program 96.5%

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

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

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

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

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

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

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

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

    if 3.5000000000000001e145 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(-y\right) \cdot \color{blue}{\frac{1}{3}}}{z} \]
      4. metadata-eval74.1%

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

        \[\leadsto \frac{\color{blue}{\frac{-y}{--3}}}{z} \]
      6. frac-2neg74.1%

        \[\leadsto \frac{\color{blue}{\frac{y}{-3}}}{z} \]
      7. div-inv74.1%

        \[\leadsto \frac{\color{blue}{y \cdot \frac{1}{-3}}}{z} \]
      8. metadata-eval74.1%

        \[\leadsto \frac{y \cdot \color{blue}{-0.3333333333333333}}{z} \]
      9. metadata-eval74.1%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{-0.3333333333333333}}} \]
      11. metadata-eval74.2%

        \[\leadsto \frac{y}{\frac{z}{\color{blue}{-0.3333333333333333}}} \]
    9. Applied egg-rr74.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.6 \cdot 10^{+42}:\\ \;\;\;\;\frac{\frac{y}{z}}{-3}\\ \mathbf{elif}\;y \leq -9.8 \cdot 10^{-175}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.56 \cdot 10^{+41}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{+145}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{z}{-0.3333333333333333}}\\ \end{array} \]

Alternative 9: 79.4% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.52e53 < x < 8.5e7

    1. Initial program 95.9%

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

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

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

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

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

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

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

    if 8.5e7 < x

    1. Initial program 98.5%

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

        \[\leadsto \color{blue}{x - \left(\frac{y}{z \cdot 3} - \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      2. sub-neg98.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-neg98.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-in98.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-neg98.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-198.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/98.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/98.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-frac98.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-198.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-frac96.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--96.9%

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

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

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

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

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

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

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

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

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

Alternative 10: 79.1% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2e53 < x < 5.7e7

    1. Initial program 95.9%

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

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

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

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

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

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

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

    if 5.7e7 < x

    1. Initial program 98.5%

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

        \[\leadsto \color{blue}{x - \left(\frac{y}{z \cdot 3} - \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      2. sub-neg98.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-neg98.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-in98.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-neg98.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-198.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/98.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/98.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-frac98.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-198.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-frac96.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--96.9%

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

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

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

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

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

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

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

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

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

Alternative 11: 89.2% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 96.7%

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

        \[\leadsto \color{blue}{x - \left(\frac{y}{z \cdot 3} - \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      2. sub-neg96.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-neg96.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-in96.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-neg96.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-196.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/96.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/96.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-frac96.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-196.7%

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

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

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

    if -1.6499999999999999e22 < y < 1.34e23

    1. Initial program 96.1%

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

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

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

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

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

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

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

        \[\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.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-frac96.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-196.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-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 y around 0 88.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.34e23 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.65 \cdot 10^{+22}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 1.34 \cdot 10^{+23}:\\ \;\;\;\;x + \frac{0.3333333333333333}{\frac{y \cdot z}{t}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{z \cdot -3}\\ \end{array} \]

Alternative 12: 89.0% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 96.7%

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

        \[\leadsto \color{blue}{x - \left(\frac{y}{z \cdot 3} - \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      2. sub-neg96.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-neg96.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-in96.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-neg96.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-196.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/96.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/96.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-frac96.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-196.7%

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

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

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

    if -1.5e32 < y < 1.25e23

    1. Initial program 96.1%

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

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

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

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

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

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

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

        \[\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.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-frac96.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-196.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-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 y around 0 88.0%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{1 \cdot t}{\frac{z}{0.3333333333333333} \cdot y}} \]
      4. *-un-lft-identity88.0%

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

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

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

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

    if 1.25e23 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

Alternative 13: 89.2% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 96.7%

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

        \[\leadsto \color{blue}{x - \left(\frac{y}{z \cdot 3} - \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      2. sub-neg96.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-neg96.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-in96.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-neg96.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-196.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/96.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/96.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-frac96.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-196.7%

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

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

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

    if -5.6e17 < y < 6.60000000000000059e23

    1. Initial program 96.1%

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

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

    if 6.60000000000000059e23 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.6 \cdot 10^{+17}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 6.6 \cdot 10^{+23}:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{z \cdot -3}\\ \end{array} \]

Alternative 14: 96.0% accurate, 1.4× speedup?

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

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

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

      \[\leadsto \color{blue}{x - \left(\frac{y}{z \cdot 3} - \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
    2. sub-neg97.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-neg97.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-in97.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-neg97.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-197.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/97.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/97.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-frac97.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-197.1%

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

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

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

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

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

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

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

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

Alternative 15: 96.0% accurate, 1.4× speedup?

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

\\
x + \frac{y - \frac{t}{y}}{z \cdot -3}
\end{array}
Derivation
  1. Initial program 97.2%

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

      \[\leadsto \color{blue}{x - \left(\frac{y}{z \cdot 3} - \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
    2. sub-neg97.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-neg97.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-in97.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-neg97.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-197.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/97.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/97.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-frac97.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-197.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 46.4% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{-77}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 3.55 \cdot 10^{+112}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.7999999999999998e-77 or 3.55e112 < z

    1. Initial program 99.8%

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

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

    if -4.7999999999999998e-77 < z < 3.55e112

    1. Initial program 95.2%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\left(-y\right) \cdot 0.3333333333333333}{z}} \]
      3. metadata-eval51.4%

        \[\leadsto \frac{\left(-y\right) \cdot \color{blue}{\frac{1}{3}}}{z} \]
      4. metadata-eval51.4%

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

        \[\leadsto \frac{\color{blue}{\frac{-y}{--3}}}{z} \]
      6. frac-2neg51.4%

        \[\leadsto \frac{\color{blue}{\frac{y}{-3}}}{z} \]
      7. associate-/l/51.4%

        \[\leadsto \color{blue}{\frac{y}{z \cdot -3}} \]
    9. Applied egg-rr51.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{-77}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.55 \cdot 10^{+112}:\\ \;\;\;\;\frac{y}{z \cdot -3}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 17: 46.4% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{-77}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 4.8 \cdot 10^{+112}:\\
\;\;\;\;\frac{\frac{y}{z}}{-3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.7999999999999998e-77 or 4.8e112 < z

    1. Initial program 99.8%

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

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

    if -4.7999999999999998e-77 < z < 4.8e112

    1. Initial program 95.2%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\left(-y\right) \cdot 0.3333333333333333}{z}} \]
      3. metadata-eval51.4%

        \[\leadsto \frac{\left(-y\right) \cdot \color{blue}{\frac{1}{3}}}{z} \]
      4. metadata-eval51.4%

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

        \[\leadsto \frac{\color{blue}{\frac{-y}{--3}}}{z} \]
      6. frac-2neg51.4%

        \[\leadsto \frac{\color{blue}{\frac{y}{-3}}}{z} \]
      7. associate-/l/51.4%

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

        \[\leadsto \color{blue}{\frac{\frac{y}{z}}{-3}} \]
    9. Applied egg-rr51.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{-77}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{+112}:\\ \;\;\;\;\frac{\frac{y}{z}}{-3}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 18: 30.3% 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 97.2%

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

    \[\leadsto \color{blue}{x} \]
  3. Final simplification34.1%

    \[\leadsto x \]

Developer target: 96.1% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2023181 
(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))))