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

Percentage Accurate: 95.7% → 97.6%
Time: 11.1s
Alternatives: 16
Speedup: 1.4×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 95.7% accurate, 1.0× speedup?

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

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

Alternative 1: 97.6% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 99.8%

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

    if -5.0000000000000002e75 < (*.f64 z 3)

    1. Initial program 96.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\frac{z}{-0.3333333333333333}} \cdot \left(y - \frac{t}{y}\right)\right)\right)} \]
      2. expm1-udef53.0%

        \[\leadsto x + \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{1}{\frac{z}{-0.3333333333333333}} \cdot \left(y - \frac{t}{y}\right)\right)} - 1\right)} \]
      3. associate-*l/53.0%

        \[\leadsto x + \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{1 \cdot \left(y - \frac{t}{y}\right)}{\frac{z}{-0.3333333333333333}}}\right)} - 1\right) \]
      4. *-un-lft-identity53.0%

        \[\leadsto x + \left(e^{\mathsf{log1p}\left(\frac{\color{blue}{y - \frac{t}{y}}}{\frac{z}{-0.3333333333333333}}\right)} - 1\right) \]
      5. div-inv53.0%

        \[\leadsto x + \left(e^{\mathsf{log1p}\left(\frac{y - \frac{t}{y}}{\color{blue}{z \cdot \frac{1}{-0.3333333333333333}}}\right)} - 1\right) \]
      6. metadata-eval53.0%

        \[\leadsto x + \left(e^{\mathsf{log1p}\left(\frac{y - \frac{t}{y}}{z \cdot \color{blue}{-3}}\right)} - 1\right) \]
    9. Applied egg-rr53.0%

      \[\leadsto x + \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{y - \frac{t}{y}}{z \cdot -3}\right)} - 1\right)} \]
    10. Step-by-step derivation
      1. expm1-def60.9%

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

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

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

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

Alternative 2: 58.5% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{z \cdot -3}\\ \mathbf{if}\;y \leq -4.6 \cdot 10^{+144}:\\ \;\;\;\;\frac{\frac{y}{-3}}{z}\\ \mathbf{elif}\;y \leq -4.4 \cdot 10^{+123}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -4.7 \cdot 10^{-42}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{-67}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{-134}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\ \mathbf{elif}\;y \leq 75000000000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ y (* z -3.0))))
   (if (<= y -4.6e+144)
     (/ (/ y -3.0) z)
     (if (<= y -4.4e+123)
       x
       (if (<= y -4.7e-42)
         t_1
         (if (<= y -1.2e-67)
           x
           (if (<= y 2.2e-134)
             (* 0.3333333333333333 (/ (/ t y) z))
             (if (<= y 75000000000.0) x t_1))))))))
double code(double x, double y, double z, double t) {
	double t_1 = y / (z * -3.0);
	double tmp;
	if (y <= -4.6e+144) {
		tmp = (y / -3.0) / z;
	} else if (y <= -4.4e+123) {
		tmp = x;
	} else if (y <= -4.7e-42) {
		tmp = t_1;
	} else if (y <= -1.2e-67) {
		tmp = x;
	} else if (y <= 2.2e-134) {
		tmp = 0.3333333333333333 * ((t / y) / z);
	} else if (y <= 75000000000.0) {
		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 = y / (z * (-3.0d0))
    if (y <= (-4.6d+144)) then
        tmp = (y / (-3.0d0)) / z
    else if (y <= (-4.4d+123)) then
        tmp = x
    else if (y <= (-4.7d-42)) then
        tmp = t_1
    else if (y <= (-1.2d-67)) then
        tmp = x
    else if (y <= 2.2d-134) then
        tmp = 0.3333333333333333d0 * ((t / y) / z)
    else if (y <= 75000000000.0d0) 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 = y / (z * -3.0);
	double tmp;
	if (y <= -4.6e+144) {
		tmp = (y / -3.0) / z;
	} else if (y <= -4.4e+123) {
		tmp = x;
	} else if (y <= -4.7e-42) {
		tmp = t_1;
	} else if (y <= -1.2e-67) {
		tmp = x;
	} else if (y <= 2.2e-134) {
		tmp = 0.3333333333333333 * ((t / y) / z);
	} else if (y <= 75000000000.0) {
		tmp = x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = y / (z * -3.0)
	tmp = 0
	if y <= -4.6e+144:
		tmp = (y / -3.0) / z
	elif y <= -4.4e+123:
		tmp = x
	elif y <= -4.7e-42:
		tmp = t_1
	elif y <= -1.2e-67:
		tmp = x
	elif y <= 2.2e-134:
		tmp = 0.3333333333333333 * ((t / y) / z)
	elif y <= 75000000000.0:
		tmp = x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(y / Float64(z * -3.0))
	tmp = 0.0
	if (y <= -4.6e+144)
		tmp = Float64(Float64(y / -3.0) / z);
	elseif (y <= -4.4e+123)
		tmp = x;
	elseif (y <= -4.7e-42)
		tmp = t_1;
	elseif (y <= -1.2e-67)
		tmp = x;
	elseif (y <= 2.2e-134)
		tmp = Float64(0.3333333333333333 * Float64(Float64(t / y) / z));
	elseif (y <= 75000000000.0)
		tmp = x;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = y / (z * -3.0);
	tmp = 0.0;
	if (y <= -4.6e+144)
		tmp = (y / -3.0) / z;
	elseif (y <= -4.4e+123)
		tmp = x;
	elseif (y <= -4.7e-42)
		tmp = t_1;
	elseif (y <= -1.2e-67)
		tmp = x;
	elseif (y <= 2.2e-134)
		tmp = 0.3333333333333333 * ((t / y) / z);
	elseif (y <= 75000000000.0)
		tmp = x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.6e+144], N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, -4.4e+123], x, If[LessEqual[y, -4.7e-42], t$95$1, If[LessEqual[y, -1.2e-67], x, If[LessEqual[y, 2.2e-134], N[(0.3333333333333333 * N[(N[(t / y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 75000000000.0], x, t$95$1]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -4.4 \cdot 10^{+123}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq -4.7 \cdot 10^{-42}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -1.2 \cdot 10^{-67}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;y \leq 75000000000:\\
\;\;\;\;x\\

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y \cdot \color{blue}{\frac{1}{-3}}}{z} \]
      2. div-inv72.3%

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

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

    if -4.6000000000000003e144 < y < -4.39999999999999984e123 or -4.7000000000000001e-42 < y < -1.2e-67 or 2.2e-134 < y < 7.5e10

    1. Initial program 100.0%

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

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

    if -4.39999999999999984e123 < y < -4.7000000000000001e-42 or 7.5e10 < y

    1. Initial program 99.7%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot 1}{z \cdot -3}} \]
      4. *-rgt-identity66.4%

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

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

    if -1.2e-67 < y < 2.2e-134

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{0.3333333333333333 \cdot \color{blue}{\frac{t}{y}}}{z} \]
    6. Step-by-step derivation
      1. *-un-lft-identity65.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.6 \cdot 10^{+144}:\\ \;\;\;\;\frac{\frac{y}{-3}}{z}\\ \mathbf{elif}\;y \leq -4.4 \cdot 10^{+123}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -4.7 \cdot 10^{-42}:\\ \;\;\;\;\frac{y}{z \cdot -3}\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{-67}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{-134}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\ \mathbf{elif}\;y \leq 75000000000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z \cdot -3}\\ \end{array} \]

Alternative 3: 74.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.02 \cdot 10^{-69}:\\ \;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq -5.7 \cdot 10^{-118}:\\ \;\;\;\;\frac{0.3333333333333333}{\frac{z \cdot y}{t}}\\ \mathbf{elif}\;y \leq -9 \cdot 10^{-178} \lor \neg \left(y \leq 3.6 \cdot 10^{-136}\right):\\ \;\;\;\;x + y \cdot \frac{-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 (<= y -1.02e-69)
   (+ x (/ (* y -0.3333333333333333) z))
   (if (<= y -5.7e-118)
     (/ 0.3333333333333333 (/ (* z y) t))
     (if (or (<= y -9e-178) (not (<= y 3.6e-136)))
       (+ 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.02e-69) {
		tmp = x + ((y * -0.3333333333333333) / z);
	} else if (y <= -5.7e-118) {
		tmp = 0.3333333333333333 / ((z * y) / t);
	} else if ((y <= -9e-178) || !(y <= 3.6e-136)) {
		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.02d-69)) then
        tmp = x + ((y * (-0.3333333333333333d0)) / z)
    else if (y <= (-5.7d-118)) then
        tmp = 0.3333333333333333d0 / ((z * y) / t)
    else if ((y <= (-9d-178)) .or. (.not. (y <= 3.6d-136))) 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.02e-69) {
		tmp = x + ((y * -0.3333333333333333) / z);
	} else if (y <= -5.7e-118) {
		tmp = 0.3333333333333333 / ((z * y) / t);
	} else if ((y <= -9e-178) || !(y <= 3.6e-136)) {
		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.02e-69:
		tmp = x + ((y * -0.3333333333333333) / z)
	elif y <= -5.7e-118:
		tmp = 0.3333333333333333 / ((z * y) / t)
	elif (y <= -9e-178) or not (y <= 3.6e-136):
		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.02e-69)
		tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z));
	elseif (y <= -5.7e-118)
		tmp = Float64(0.3333333333333333 / Float64(Float64(z * y) / t));
	elseif ((y <= -9e-178) || !(y <= 3.6e-136))
		tmp = Float64(x + Float64(y * Float64(-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.02e-69)
		tmp = x + ((y * -0.3333333333333333) / z);
	elseif (y <= -5.7e-118)
		tmp = 0.3333333333333333 / ((z * y) / t);
	elseif ((y <= -9e-178) || ~((y <= 3.6e-136)))
		tmp = x + (y * (-0.3333333333333333 / z));
	else
		tmp = 0.3333333333333333 / (z * (y / t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.02e-69], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.7e-118], N[(0.3333333333333333 / N[(N[(z * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -9e-178], N[Not[LessEqual[y, 3.6e-136]], $MachinePrecision]], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 / N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq -9 \cdot 10^{-178} \lor \neg \left(y \leq 3.6 \cdot 10^{-136}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.02000000000000005e-69 < y < -5.70000000000000012e-118

    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 x around 0 85.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\color{blue}{3} \cdot \frac{z}{\frac{t}{y} - y}\right)}^{-1} \]
    6. Applied egg-rr74.3%

      \[\leadsto \color{blue}{{\left(3 \cdot \frac{z}{\frac{t}{y} - y}\right)}^{-1}} \]
    7. Step-by-step derivation
      1. unpow-174.3%

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

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

        \[\leadsto \frac{\color{blue}{0.3333333333333333}}{\frac{z}{\frac{t}{y} - y}} \]
    8. Simplified74.3%

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

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

    if -5.70000000000000012e-118 < y < -8.99999999999999957e-178 or 3.5999999999999998e-136 < y

    1. Initial program 98.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.99999999999999957e-178 < y < 3.5999999999999998e-136

    1. Initial program 91.2%

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

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

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

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

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y}}{z} - \color{blue}{\frac{0.3333333333333333 \cdot y}{z}} \]
      4. div-sub73.4%

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{z}{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}}} \]
      2. inv-pow73.4%

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

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

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

        \[\leadsto {\left(\color{blue}{3} \cdot \frac{z}{\frac{t}{y} - y}\right)}^{-1} \]
    6. Applied egg-rr73.4%

      \[\leadsto \color{blue}{{\left(3 \cdot \frac{z}{\frac{t}{y} - y}\right)}^{-1}} \]
    7. Step-by-step derivation
      1. unpow-173.4%

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

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

        \[\leadsto \frac{\color{blue}{0.3333333333333333}}{\frac{z}{\frac{t}{y} - y}} \]
    8. Simplified73.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.02 \cdot 10^{-69}:\\ \;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq -5.7 \cdot 10^{-118}:\\ \;\;\;\;\frac{0.3333333333333333}{\frac{z \cdot y}{t}}\\ \mathbf{elif}\;y \leq -9 \cdot 10^{-178} \lor \neg \left(y \leq 3.6 \cdot 10^{-136}\right):\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.3333333333333333}{z \cdot \frac{y}{t}}\\ \end{array} \]

Alternative 4: 79.3% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.45e11 or 8.2e-39 < x

    1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.45e11 < x < 8.2e-39

    1. Initial program 97.4%

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

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

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

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

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y}}{z} - \color{blue}{\frac{0.3333333333333333 \cdot y}{z}} \]
      4. div-sub87.4%

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

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

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

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

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

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

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

        \[\leadsto \frac{-0.3333333333333333}{-1} \cdot \frac{\color{blue}{\left(0 - y\right)} + \frac{t}{y}}{z} \]
      5. associate-+l-87.3%

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

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

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

        \[\leadsto \frac{\color{blue}{--0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}}{-1 \cdot z} \]
      9. distribute-lft-neg-in87.4%

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

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

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

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

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

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

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

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

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

Alternative 5: 88.5% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.2000000000000001e-11 < y < 1.75000000000000008e47

    1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\mathsf{fma}\left(\frac{-1}{3}, \frac{y}{z}, \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      11. metadata-eval95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.75000000000000008e47 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 89.3% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.89999999999999981e-10 < y < 1.05e47

    1. Initial program 95.0%

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

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

    if 1.05e47 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 75.1% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{-70} \lor \neg \left(y \leq 7.5 \cdot 10^{-135}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.20000000000000004e-70 or 7.5e-135 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.20000000000000004e-70 < y < 7.5e-135

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{0.3333333333333333 \cdot \color{blue}{\frac{t}{y}}}{z} \]
    6. Step-by-step derivation
      1. *-un-lft-identity65.3%

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

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

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

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

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

Alternative 8: 75.1% accurate, 1.3× speedup?

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

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.20000000000000002e-68 < y < 2.44999999999999988e-134

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{0.3333333333333333 \cdot \color{blue}{\frac{t}{y}}}{z} \]
    6. Step-by-step derivation
      1. *-un-lft-identity65.3%

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

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

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

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

    if 2.44999999999999988e-134 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 75.3% accurate, 1.3× speedup?

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

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.7000000000000001e-70 < y < 1.7999999999999999e-136

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{z}{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}}} \]
      2. inv-pow66.9%

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

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

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

        \[\leadsto {\left(\color{blue}{3} \cdot \frac{z}{\frac{t}{y} - y}\right)}^{-1} \]
    6. Applied egg-rr66.9%

      \[\leadsto \color{blue}{{\left(3 \cdot \frac{z}{\frac{t}{y} - y}\right)}^{-1}} \]
    7. Step-by-step derivation
      1. unpow-166.9%

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

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

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

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

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

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

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

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

    if 1.7999999999999999e-136 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 95.7% accurate, 1.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\frac{z}{-0.3333333333333333}} \cdot \left(y - \frac{t}{y}\right)\right)\right)} \]
    2. expm1-udef56.8%

      \[\leadsto x + \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{1}{\frac{z}{-0.3333333333333333}} \cdot \left(y - \frac{t}{y}\right)\right)} - 1\right)} \]
    3. associate-*l/56.8%

      \[\leadsto x + \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{1 \cdot \left(y - \frac{t}{y}\right)}{\frac{z}{-0.3333333333333333}}}\right)} - 1\right) \]
    4. *-un-lft-identity56.8%

      \[\leadsto x + \left(e^{\mathsf{log1p}\left(\frac{\color{blue}{y - \frac{t}{y}}}{\frac{z}{-0.3333333333333333}}\right)} - 1\right) \]
    5. div-inv56.8%

      \[\leadsto x + \left(e^{\mathsf{log1p}\left(\frac{y - \frac{t}{y}}{\color{blue}{z \cdot \frac{1}{-0.3333333333333333}}}\right)} - 1\right) \]
    6. metadata-eval56.8%

      \[\leadsto x + \left(e^{\mathsf{log1p}\left(\frac{y - \frac{t}{y}}{z \cdot \color{blue}{-3}}\right)} - 1\right) \]
  9. Applied egg-rr56.8%

    \[\leadsto x + \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{y - \frac{t}{y}}{z \cdot -3}\right)} - 1\right)} \]
  10. Step-by-step derivation
    1. expm1-def64.3%

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

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

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

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

Alternative 12: 47.8% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.4 \cdot 10^{-12}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.4000000000000001e-12 or 1.19999999999999999e27 < x

    1. Initial program 97.6%

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

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

    if -3.4000000000000001e-12 < x < 1.19999999999999999e27

    1. Initial program 96.8%

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

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

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

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

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

Alternative 13: 47.8% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.9 \cdot 10^{-12}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 1.25 \cdot 10^{+23}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.89999999999999994e-12 or 1.25e23 < x

    1. Initial program 97.6%

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

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

    if -3.89999999999999994e-12 < x < 1.25e23

    1. Initial program 96.8%

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

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

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

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

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

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

        \[\leadsto \frac{y}{z} \cdot \color{blue}{\frac{1}{-3}} \]
      3. times-frac51.2%

        \[\leadsto \color{blue}{\frac{y \cdot 1}{z \cdot -3}} \]
      4. *-rgt-identity51.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.9 \cdot 10^{-12}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.25 \cdot 10^{+23}:\\ \;\;\;\;\frac{y}{z \cdot -3}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 14: 47.8% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.05 \cdot 10^{-12}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.04999999999999997e-12 or 5.00000000000000024e25 < x

    1. Initial program 97.6%

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

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

    if -1.04999999999999997e-12 < x < 5.00000000000000024e25

    1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.05 \cdot 10^{-12}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 5 \cdot 10^{+25}:\\ \;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 15: 47.8% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.5 \cdot 10^{-12}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 6.2 \cdot 10^{+15}:\\
\;\;\;\;\frac{\frac{y}{-3}}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.5e-12 or 6.2e15 < x

    1. Initial program 97.6%

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

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

    if -3.5e-12 < x < 6.2e15

    1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y \cdot \color{blue}{\frac{1}{-3}}}{z} \]
      2. div-inv51.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.5 \cdot 10^{-12}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 6.2 \cdot 10^{+15}:\\ \;\;\;\;\frac{\frac{y}{-3}}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

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

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

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

    \[\leadsto x \]

Developer target: 95.8% accurate, 1.0× speedup?

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

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

Reproduce

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