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

Percentage Accurate: 95.3% → 97.6%
Time: 12.1s
Alternatives: 19
Speedup: 1.1×

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 19 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.3% accurate, 1.0× speedup?

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

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

Alternative 1: 97.6% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 99.9%

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

    if -1e5 < t

    1. Initial program 91.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 80.4% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \cdot 3 \leq 10^{+27}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \cdot 3 \leq 2 \cdot 10^{+73}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 z 3) < -4.99999999999999974e123 or 1e27 < (*.f64 z 3) < 1.99999999999999997e73

    1. Initial program 100.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-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.99999999999999974e123 < (*.f64 z 3) < 1e27 or 1.99999999999999997e73 < (*.f64 z 3) < 4e103

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\left(0.3333333333333333 \cdot \frac{y}{z} - 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\right)} \]
      5. *-commutative97.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4e103 < (*.f64 z 3)

    1. Initial program 99.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot 3 \leq -5 \cdot 10^{+123}:\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \mathbf{elif}\;z \cdot 3 \leq 10^{+27}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\ \mathbf{elif}\;z \cdot 3 \leq 2 \cdot 10^{+73}:\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \mathbf{elif}\;z \cdot 3 \leq 4 \cdot 10^{+103}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \end{array} \]

Alternative 3: 95.7% accurate, 0.9× speedup?

\[\begin{array}{l} \\ x + \left(\frac{-1}{\frac{y \cdot -3}{\frac{t}{z}}} - \frac{y}{z \cdot 3}\right) \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (+ x (- (/ -1.0 (/ (* y -3.0) (/ t z))) (/ y (* z 3.0)))))
double code(double x, double y, double z, double t) {
	return x + ((-1.0 / ((y * -3.0) / (t / z))) - (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 + (((-1.0d0) / ((y * (-3.0d0)) / (t / z))) - (y / (z * 3.0d0)))
end function
public static double code(double x, double y, double z, double t) {
	return x + ((-1.0 / ((y * -3.0) / (t / z))) - (y / (z * 3.0)));
}
def code(x, y, z, t):
	return x + ((-1.0 / ((y * -3.0) / (t / z))) - (y / (z * 3.0)))
function code(x, y, z, t)
	return Float64(x + Float64(Float64(-1.0 / Float64(Float64(y * -3.0) / Float64(t / z))) - Float64(y / Float64(z * 3.0))))
end
function tmp = code(x, y, z, t)
	tmp = x + ((-1.0 / ((y * -3.0) / (t / z))) - (y / (z * 3.0)));
end
code[x_, y_, z_, t_] := N[(x + N[(N[(-1.0 / N[(N[(y * -3.0), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 95.7% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 61.3% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-y}{z \cdot 3}\\ \mathbf{if}\;y \leq -9 \cdot 10^{-24}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -2.8 \cdot 10^{-68}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{+16}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{+103}:\\ \;\;\;\;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 -9e-24)
     t_1
     (if (<= y -2.8e-68)
       x
       (if (<= y 6.2e+16)
         (* 0.3333333333333333 (/ t (* y z)))
         (if (<= y 1.5e+103) x t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = -y / (z * 3.0);
	double tmp;
	if (y <= -9e-24) {
		tmp = t_1;
	} else if (y <= -2.8e-68) {
		tmp = x;
	} else if (y <= 6.2e+16) {
		tmp = 0.3333333333333333 * (t / (y * z));
	} else if (y <= 1.5e+103) {
		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 <= (-9d-24)) then
        tmp = t_1
    else if (y <= (-2.8d-68)) then
        tmp = x
    else if (y <= 6.2d+16) then
        tmp = 0.3333333333333333d0 * (t / (y * z))
    else if (y <= 1.5d+103) 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 <= -9e-24) {
		tmp = t_1;
	} else if (y <= -2.8e-68) {
		tmp = x;
	} else if (y <= 6.2e+16) {
		tmp = 0.3333333333333333 * (t / (y * z));
	} else if (y <= 1.5e+103) {
		tmp = x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = -y / (z * 3.0)
	tmp = 0
	if y <= -9e-24:
		tmp = t_1
	elif y <= -2.8e-68:
		tmp = x
	elif y <= 6.2e+16:
		tmp = 0.3333333333333333 * (t / (y * z))
	elif y <= 1.5e+103:
		tmp = x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(-y) / Float64(z * 3.0))
	tmp = 0.0
	if (y <= -9e-24)
		tmp = t_1;
	elseif (y <= -2.8e-68)
		tmp = x;
	elseif (y <= 6.2e+16)
		tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z)));
	elseif (y <= 1.5e+103)
		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 <= -9e-24)
		tmp = t_1;
	elseif (y <= -2.8e-68)
		tmp = x;
	elseif (y <= 6.2e+16)
		tmp = 0.3333333333333333 * (t / (y * z));
	elseif (y <= 1.5e+103)
		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, -9e-24], t$95$1, If[LessEqual[y, -2.8e-68], x, If[LessEqual[y, 6.2e+16], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e+103], x, t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -2.8 \cdot 10^{-68}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;y \leq 1.5 \cdot 10^{+103}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.9999999999999995e-24 or 1.5e103 < y

    1. Initial program 97.7%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-0.3333333333333333}{z}, y - \frac{t}{y}, x\right)} \]
    4. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-0.3333333333333333}{z}, y - \frac{t}{y}, x\right)} \]
    5. Taylor expanded in y around inf 71.8%

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

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

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

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

        \[\leadsto \frac{\color{blue}{-y \cdot 0.3333333333333333}}{z} \]
      5. distribute-neg-frac71.9%

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

        \[\leadsto -\color{blue}{\frac{y}{\frac{z}{0.3333333333333333}}} \]
      7. distribute-neg-frac71.9%

        \[\leadsto \color{blue}{\frac{-y}{\frac{z}{0.3333333333333333}}} \]
      8. div-inv72.0%

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

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

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

    if -8.9999999999999995e-24 < y < -2.8000000000000001e-68 or 6.2e16 < y < 1.5e103

    1. Initial program 99.9%

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

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

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

    if -2.8000000000000001e-68 < y < 6.2e16

    1. Initial program 89.4%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-0.3333333333333333}{z}, y - \frac{t}{y}, x\right)} \]
    4. Applied egg-rr92.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9 \cdot 10^{-24}:\\ \;\;\;\;\frac{-y}{z \cdot 3}\\ \mathbf{elif}\;y \leq -2.8 \cdot 10^{-68}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{+16}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{+103}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{-y}{z \cdot 3}\\ \end{array} \]

Alternative 6: 61.2% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-y}{z \cdot 3}\\ \mathbf{if}\;y \leq -3.4 \cdot 10^{-22}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.02 \cdot 10^{-66}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{+16}:\\ \;\;\;\;t \cdot \frac{0.3333333333333333}{y \cdot z}\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+106}:\\ \;\;\;\;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 -3.4e-22)
     t_1
     (if (<= y -1.02e-66)
       x
       (if (<= y 7.2e+16)
         (* t (/ 0.3333333333333333 (* y z)))
         (if (<= y 2.3e+106) x t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = -y / (z * 3.0);
	double tmp;
	if (y <= -3.4e-22) {
		tmp = t_1;
	} else if (y <= -1.02e-66) {
		tmp = x;
	} else if (y <= 7.2e+16) {
		tmp = t * (0.3333333333333333 / (y * z));
	} else if (y <= 2.3e+106) {
		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 <= (-3.4d-22)) then
        tmp = t_1
    else if (y <= (-1.02d-66)) then
        tmp = x
    else if (y <= 7.2d+16) then
        tmp = t * (0.3333333333333333d0 / (y * z))
    else if (y <= 2.3d+106) 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 <= -3.4e-22) {
		tmp = t_1;
	} else if (y <= -1.02e-66) {
		tmp = x;
	} else if (y <= 7.2e+16) {
		tmp = t * (0.3333333333333333 / (y * z));
	} else if (y <= 2.3e+106) {
		tmp = x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = -y / (z * 3.0)
	tmp = 0
	if y <= -3.4e-22:
		tmp = t_1
	elif y <= -1.02e-66:
		tmp = x
	elif y <= 7.2e+16:
		tmp = t * (0.3333333333333333 / (y * z))
	elif y <= 2.3e+106:
		tmp = x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(-y) / Float64(z * 3.0))
	tmp = 0.0
	if (y <= -3.4e-22)
		tmp = t_1;
	elseif (y <= -1.02e-66)
		tmp = x;
	elseif (y <= 7.2e+16)
		tmp = Float64(t * Float64(0.3333333333333333 / Float64(y * z)));
	elseif (y <= 2.3e+106)
		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 <= -3.4e-22)
		tmp = t_1;
	elseif (y <= -1.02e-66)
		tmp = x;
	elseif (y <= 7.2e+16)
		tmp = t * (0.3333333333333333 / (y * z));
	elseif (y <= 2.3e+106)
		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, -3.4e-22], t$95$1, If[LessEqual[y, -1.02e-66], x, If[LessEqual[y, 7.2e+16], N[(t * N[(0.3333333333333333 / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.3e+106], x, t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -1.02 \cdot 10^{-66}:\\
\;\;\;\;x\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.3999999999999998e-22 or 2.3000000000000002e106 < y

    1. Initial program 97.7%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-0.3333333333333333}{z}, y - \frac{t}{y}, x\right)} \]
    4. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-0.3333333333333333}{z}, y - \frac{t}{y}, x\right)} \]
    5. Taylor expanded in y around inf 71.8%

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

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

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

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

        \[\leadsto \frac{\color{blue}{-y \cdot 0.3333333333333333}}{z} \]
      5. distribute-neg-frac71.9%

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

        \[\leadsto -\color{blue}{\frac{y}{\frac{z}{0.3333333333333333}}} \]
      7. distribute-neg-frac71.9%

        \[\leadsto \color{blue}{\frac{-y}{\frac{z}{0.3333333333333333}}} \]
      8. div-inv72.0%

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

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

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

    if -3.3999999999999998e-22 < y < -1.01999999999999996e-66 or 7.2e16 < y < 2.3000000000000002e106

    1. Initial program 99.9%

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

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

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

    if -1.01999999999999996e-66 < y < 7.2e16

    1. Initial program 89.4%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-0.3333333333333333}{z}, y - \frac{t}{y}, x\right)} \]
    4. Applied egg-rr92.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.4 \cdot 10^{-22}:\\ \;\;\;\;\frac{-y}{z \cdot 3}\\ \mathbf{elif}\;y \leq -1.02 \cdot 10^{-66}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{+16}:\\ \;\;\;\;t \cdot \frac{0.3333333333333333}{y \cdot z}\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+106}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{-y}{z \cdot 3}\\ \end{array} \]

Alternative 7: 91.9% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.04e-22 or 5.99999999999999956e30 < 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 x - \color{blue}{\left(\frac{y}{z \cdot 3} + \left(-\frac{t}{\left(z \cdot 3\right) \cdot y}\right)\right)} \]
      3. distribute-frac-neg98.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.04e-22 < y < 5.99999999999999956e30

    1. Initial program 90.5%

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

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

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

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

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

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

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

Alternative 8: 95.6% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

    if -9.99999999999999921e273 < t

    1. Initial program 93.2%

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

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

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

Alternative 9: 95.6% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

    if -1.6499999999999999e271 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 76.6% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 98.3%

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

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

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

    if -1.76e-68 < y < 6.09999999999999972e-15

    1. Initial program 88.9%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-0.3333333333333333}{z}, y - \frac{t}{y}, x\right)} \]
    4. Applied egg-rr92.6%

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

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

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

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

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

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

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

Alternative 11: 76.6% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.7 \cdot 10^{-67} \lor \neg \left(y \leq 1.05 \cdot 10^{-14}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\

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


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

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.7000000000000002e-67 < y < 1.0499999999999999e-14

    1. Initial program 88.9%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-0.3333333333333333}{z}, y - \frac{t}{y}, x\right)} \]
    4. Applied egg-rr92.6%

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

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

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

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

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

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

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

Alternative 12: 76.7% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{-69} \lor \neg \left(y \leq 1.3 \cdot 10^{-14}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\

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


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

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.1999999999999999e-69 < y < 1.29999999999999998e-14

    1. Initial program 88.9%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-0.3333333333333333}{z}, y - \frac{t}{y}, x\right)} \]
    4. Applied egg-rr92.6%

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

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

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

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

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

        \[\leadsto \frac{\frac{t}{y} \cdot \color{blue}{\frac{1}{3}}}{z} \]
      5. div-inv68.8%

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

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

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

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

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

Alternative 13: 78.7% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.8500000000000003e-67 < y < 6.09999999999999972e-15

    1. Initial program 88.9%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-0.3333333333333333}{z}, y - \frac{t}{y}, x\right)} \]
    4. Applied egg-rr92.6%

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

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{t}{y \cdot z}} \]
    6. Step-by-step derivation
      1. clear-num64.4%

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

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

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

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

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

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

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

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

Alternative 14: 78.8% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.3 \cdot 10^{-66} \lor \neg \left(y \leq 2.7 \cdot 10^{-14}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\

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


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

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.30000000000000013e-66 < y < 2.6999999999999999e-14

    1. Initial program 88.9%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-0.3333333333333333}{z}, y - \frac{t}{y}, x\right)} \]
    4. Applied egg-rr92.6%

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

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

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

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

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

        \[\leadsto \frac{\frac{t}{y} \cdot \color{blue}{\frac{1}{3}}}{z} \]
      5. div-inv68.8%

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

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

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

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

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

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

Alternative 15: 46.4% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{-22} \lor \neg \left(y \leq 1.8 \cdot 10^{+103}\right):\\
\;\;\;\;\frac{-y}{z \cdot 3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.79999999999999995e-22 or 1.80000000000000008e103 < y

    1. Initial program 97.7%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-0.3333333333333333}{z}, y - \frac{t}{y}, x\right)} \]
    4. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-0.3333333333333333}{z}, y - \frac{t}{y}, x\right)} \]
    5. Taylor expanded in y around inf 71.8%

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

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

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

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

        \[\leadsto \frac{\color{blue}{-y \cdot 0.3333333333333333}}{z} \]
      5. distribute-neg-frac71.9%

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

        \[\leadsto -\color{blue}{\frac{y}{\frac{z}{0.3333333333333333}}} \]
      7. distribute-neg-frac71.9%

        \[\leadsto \color{blue}{\frac{-y}{\frac{z}{0.3333333333333333}}} \]
      8. div-inv72.0%

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

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

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

    if -2.79999999999999995e-22 < y < 1.80000000000000008e103

    1. Initial program 91.2%

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

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification47.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.8 \cdot 10^{-22} \lor \neg \left(y \leq 1.8 \cdot 10^{+103}\right):\\ \;\;\;\;\frac{-y}{z \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 16: 46.3% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.6 \cdot 10^{-26} \lor \neg \left(y \leq 1.5 \cdot 10^{+103}\right):\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.6000000000000001e-26 or 1.5e103 < y

    1. Initial program 97.7%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-0.3333333333333333}{z}, y - \frac{t}{y}, x\right)} \]
    4. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-0.3333333333333333}{z}, y - \frac{t}{y}, x\right)} \]
    5. Taylor expanded in y around inf 71.8%

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

    if -3.6000000000000001e-26 < y < 1.5e103

    1. Initial program 91.2%

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

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification47.0%

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

Alternative 17: 46.3% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{-24} \lor \neg \left(y \leq 1.65 \cdot 10^{+103}\right):\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.6e-24 or 1.65000000000000004e103 < y

    1. Initial program 97.7%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-0.3333333333333333}{z}, y - \frac{t}{y}, x\right)} \]
    4. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-0.3333333333333333}{z}, y - \frac{t}{y}, x\right)} \]
    5. Taylor expanded in y around inf 71.8%

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

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

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

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

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

    if -2.6e-24 < y < 1.65000000000000004e103

    1. Initial program 91.2%

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

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification47.1%

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

Alternative 18: 46.3% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;y \leq 1.5 \cdot 10^{+103}:\\
\;\;\;\;x\\

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


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

    1. Initial program 96.3%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-0.3333333333333333}{z}, y - \frac{t}{y}, x\right)} \]
    5. Taylor expanded in y around inf 70.3%

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

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

        \[\leadsto \color{blue}{\frac{-0.3333333333333333}{z} \cdot y} \]
      3. *-commutative70.5%

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

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

    if -1.6499999999999999e-25 < y < 1.5e103

    1. Initial program 91.2%

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

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

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

    if 1.5e103 < y

    1. Initial program 99.8%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-0.3333333333333333}{z}, y - \frac{t}{y}, x\right)} \]
    4. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-0.3333333333333333}{z}, y - \frac{t}{y}, x\right)} \]
    5. Taylor expanded in y around inf 74.1%

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

        \[\leadsto -0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{z}{y}}} \]
      2. un-div-inv74.2%

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

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

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

Alternative 19: 30.1% accurate, 15.0× speedup?

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  4. Final simplification28.8%

    \[\leadsto x \]

Developer target: 95.7% 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 2023309 
(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))))