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

Percentage Accurate: 95.8% → 95.7%
Time: 9.5s
Alternatives: 17
Speedup: N/A×

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 17 alternatives:

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

Initial Program: 95.8% accurate, 1.0× speedup?

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

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

Alternative 1: 95.7% accurate, 1.4× speedup?

\[\begin{array}{l} \\ x + \frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{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(Float64(-0.3333333333333333 * 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[(N[(-0.3333333333333333 * N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}
\end{array}
Derivation
  1. Initial program 94.9%

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

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

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

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

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

Alternative 2: 57.8% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;y \leq -9 \cdot 10^{+106}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq -210:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -2.4 \cdot 10^{-111}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;y \leq 5.2 \cdot 10^{+134}:\\
\;\;\;\;x\\

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{-0.3333333333333333 \cdot \frac{t}{y} - -0.3333333333333333 \cdot y}{z}} \]
      5. distribute-lft-out--99.9%

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

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

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

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

    if -3.4e202 < y < -8.9999999999999994e106 or -210 < y < -2.4000000000000001e-111 or 3.9000000000000003e-30 < y < 5.2000000000000003e134

    1. Initial program 99.8%

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

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

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

    if -8.9999999999999994e106 < y < -210 or 5.2000000000000003e134 < y

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{-0.3333333333333333 \cdot \frac{t}{y} - -0.3333333333333333 \cdot y}{z}} \]
      5. distribute-lft-out--99.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot y}{z}} \]
    9. Applied egg-rr72.7%

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

    if -2.4000000000000001e-111 < y < 3.9000000000000003e-30

    1. Initial program 87.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{-0.3333333333333333 \cdot \frac{t}{y} - -0.3333333333333333 \cdot y}{z}} \]
      5. distribute-lft-out--93.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.4 \cdot 10^{+202}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq -9 \cdot 10^{+106}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -210:\\ \;\;\;\;\frac{-0.3333333333333333 \cdot y}{z}\\ \mathbf{elif}\;y \leq -2.4 \cdot 10^{-111}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 3.9 \cdot 10^{-30}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+134}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333 \cdot y}{z}\\ \end{array} \]

Alternative 3: 57.3% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;y \leq -1 \cdot 10^{+108}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq -210:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -1.25 \cdot 10^{-113}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;y \leq 5.2 \cdot 10^{+134}:\\
\;\;\;\;x\\

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{-0.3333333333333333 \cdot \frac{t}{y} - -0.3333333333333333 \cdot y}{z}} \]
      5. distribute-lft-out--99.9%

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

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

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

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

    if -3.4e202 < y < -1e108 or -210 < y < -1.2499999999999999e-113 or 1.54999999999999996e-28 < y < 5.2000000000000003e134

    1. Initial program 99.8%

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

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

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

    if -1e108 < y < -210 or 5.2000000000000003e134 < y

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{-0.3333333333333333 \cdot \frac{t}{y} - -0.3333333333333333 \cdot y}{z}} \]
      5. distribute-lft-out--99.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot y}{z}} \]
    9. Applied egg-rr72.7%

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

    if -1.2499999999999999e-113 < y < 1.54999999999999996e-28

    1. Initial program 87.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{-0.3333333333333333 \cdot \frac{t}{y} - -0.3333333333333333 \cdot y}{z}} \]
      5. distribute-lft-out--93.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.4 \cdot 10^{+202}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq -1 \cdot 10^{+108}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -210:\\ \;\;\;\;\frac{-0.3333333333333333 \cdot y}{z}\\ \mathbf{elif}\;y \leq -1.25 \cdot 10^{-113}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.55 \cdot 10^{-28}:\\ \;\;\;\;\frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+134}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333 \cdot y}{z}\\ \end{array} \]

Alternative 4: 89.4% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -14600 \lor \neg \left(y \leq 3.5 \cdot 10^{-15}\right):\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -14600 or 3.5000000000000001e-15 < y

    1. Initial program 99.1%

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

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

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

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

    if -14600 < y < 3.5000000000000001e-15

    1. Initial program 90.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 89.4% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -22500 or 1.0000000000000001e-15 < y

    1. Initial program 99.1%

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

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

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

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

    if -22500 < y < 1.0000000000000001e-15

    1. Initial program 90.2%

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

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

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

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

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

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

Alternative 6: 89.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9500 \lor \neg \left(y \leq 1.4 \cdot 10^{-14}\right):\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9500 or 1.4e-14 < y

    1. Initial program 99.1%

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

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

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

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

    if -9500 < y < 1.4e-14

    1. Initial program 90.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-90.2%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 76.8% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{-111} \lor \neg \left(y \leq 1.7 \cdot 10^{-37}\right):\\
\;\;\;\;x + \frac{-0.3333333333333333}{\frac{z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.69999999999999989e-111 or 1.70000000000000009e-37 < y

    1. Initial program 99.2%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
      4. metadata-eval88.7%

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

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

    if -2.69999999999999989e-111 < y < 1.70000000000000009e-37

    1. Initial program 86.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{-0.3333333333333333 \cdot \frac{t}{y} - -0.3333333333333333 \cdot y}{z}} \]
      5. distribute-lft-out--93.6%

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

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

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

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

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

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

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

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

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

Alternative 8: 76.7% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{-115} \lor \neg \left(y \leq 1.8 \cdot 10^{-33}\right):\\
\;\;\;\;x + \frac{y}{\frac{z}{-0.3333333333333333}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.7999999999999996e-115 or 1.80000000000000017e-33 < y

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

    if -5.7999999999999996e-115 < y < 1.80000000000000017e-33

    1. Initial program 86.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{-0.3333333333333333 \cdot \frac{t}{y} - -0.3333333333333333 \cdot y}{z}} \]
      5. distribute-lft-out--93.6%

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

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

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

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

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

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

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

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

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

Alternative 9: 76.7% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{-112} \lor \neg \left(y \leq 2.7 \cdot 10^{-34}\right):\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.9999999999999999e-112 or 2.70000000000000017e-34 < y

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

    if -1.9999999999999999e-112 < y < 2.70000000000000017e-34

    1. Initial program 86.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{-0.3333333333333333 \cdot \frac{t}{y} - -0.3333333333333333 \cdot y}{z}} \]
      5. distribute-lft-out--93.6%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2 \cdot 10^{-112} \lor \neg \left(y \leq 2.7 \cdot 10^{-34}\right):\\ \;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\ \end{array} \]

Alternative 10: 76.8% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{-113} \lor \neg \left(y \leq 3.5 \cdot 10^{-37}\right):\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.99999999999999991e-113 or 3.5000000000000001e-37 < y

    1. Initial program 99.2%

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

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

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

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

    if -3.99999999999999991e-113 < y < 3.5000000000000001e-37

    1. Initial program 86.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{-0.3333333333333333 \cdot \frac{t}{y} - -0.3333333333333333 \cdot y}{z}} \]
      5. distribute-lft-out--93.6%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4 \cdot 10^{-113} \lor \neg \left(y \leq 3.5 \cdot 10^{-37}\right):\\ \;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\ \end{array} \]

Alternative 11: 77.0% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{-112} \lor \neg \left(y \leq 8.5 \cdot 10^{-39}\right):\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.89999999999999997e-112 or 8.5000000000000005e-39 < y

    1. Initial program 99.2%

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

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

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

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

    if -1.89999999999999997e-112 < y < 8.5000000000000005e-39

    1. Initial program 86.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{-0.3333333333333333 \cdot \frac{t}{y} - -0.3333333333333333 \cdot y}{z}} \]
      5. distribute-lft-out--93.6%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{y} \cdot \frac{0.3333333333333333}{z}} \]
    10. Step-by-step derivation
      1. clear-num73.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.9 \cdot 10^{-112} \lor \neg \left(y \leq 8.5 \cdot 10^{-39}\right):\\ \;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.3333333333333333}{z \cdot \frac{y}{t}}\\ \end{array} \]

Alternative 12: 79.3% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{-111} \lor \neg \left(y \leq 9.2 \cdot 10^{-39}\right):\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.4000000000000001e-111 or 9.20000000000000033e-39 < y

    1. Initial program 99.2%

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

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

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

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

    if -2.4000000000000001e-111 < y < 9.20000000000000033e-39

    1. Initial program 86.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{-0.3333333333333333 \cdot \frac{t}{y} - -0.3333333333333333 \cdot y}{z}} \]
      5. distribute-lft-out--93.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{t}}{\frac{z}{0.3333333333333333} \cdot y} \]
      5. div-inv69.3%

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

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

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

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

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

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

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

Alternative 13: 95.7% accurate, 1.4× speedup?

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

\\
x + \left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}
\end{array}
Derivation
  1. Initial program 94.9%

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

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

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

Alternative 14: 47.9% accurate, 1.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.5000000000000001e-16 or 3.4999999999999999e44 < z

    1. Initial program 99.5%

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

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

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

    if -8.5000000000000001e-16 < z < 3.4999999999999999e44

    1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{-0.3333333333333333 \cdot \frac{t}{y} - -0.3333333333333333 \cdot y}{z}} \]
      5. distribute-lft-out--99.2%

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

        \[\leadsto x - \color{blue}{\frac{-0.3333333333333333}{\frac{z}{\frac{t}{y} - y}}} \]
    6. Simplified99.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{-16}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+44}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 15: 47.9% accurate, 1.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.5499999999999999e-15 or 1.4e44 < z

    1. Initial program 99.5%

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

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

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

    if -1.5499999999999999e-15 < z < 1.4e44

    1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{-0.3333333333333333 \cdot \frac{t}{y} - -0.3333333333333333 \cdot y}{z}} \]
      5. distribute-lft-out--99.2%

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

        \[\leadsto x - \color{blue}{\frac{-0.3333333333333333}{\frac{z}{\frac{t}{y} - y}}} \]
    6. Simplified99.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{-15}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+44}:\\ \;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 16: 47.9% accurate, 1.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.65e-15 or 3.7000000000000001e43 < z

    1. Initial program 99.5%

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

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

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

    if -1.65e-15 < z < 3.7000000000000001e43

    1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{-0.3333333333333333 \cdot \frac{t}{y} - -0.3333333333333333 \cdot y}{z}} \]
      5. distribute-lft-out--99.2%

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

        \[\leadsto x - \color{blue}{\frac{-0.3333333333333333}{\frac{z}{\frac{t}{y} - y}}} \]
    6. Simplified99.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.65 \cdot 10^{-15}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{+43}:\\ \;\;\;\;\frac{-0.3333333333333333 \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 17: 30.6% accurate, 15.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
	return x;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x
end function
public static double code(double x, double y, double z, double t) {
	return x;
}
def code(x, y, z, t):
	return x
function code(x, y, z, t)
	return x
end
function tmp = code(x, y, z, t)
	tmp = x;
end
code[x_, y_, z_, t_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 94.9%

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

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

    \[\leadsto \color{blue}{x} \]
  4. Final simplification31.5%

    \[\leadsto x \]

Developer target: 95.9% accurate, 1.0× speedup?

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

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

Reproduce

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