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

Percentage Accurate: 95.5% → 99.1%
Time: 10.9s
Alternatives: 16
Speedup: 1.4×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 95.5% 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: 99.1% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z 3) < -4.9999999999999999e149 or 4.99999999999999954e-22 < (*.f64 z 3)

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{\frac{\frac{t}{z}}{y}}{3}\right)} \]
    4. Step-by-step derivation
      1. fma-udef97.0%

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

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

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

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

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

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

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

    if -4.9999999999999999e149 < (*.f64 z 3) < 4.99999999999999954e-22

    1. Initial program 94.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-94.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 97.4% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 98.3%

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

    if 2.19999999999999989e278 < (+.f64 (-.f64 x (/.f64 y (*.f64 z 3))) (/.f64 t (*.f64 (*.f64 z 3) y)))

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 97.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{-80} \lor \neg \left(y \leq 2.45 \cdot 10^{-231}\right):\\
\;\;\;\;x + \frac{\frac{y - \frac{t}{y}}{-3}}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.99999999999999961e-81 or 2.45000000000000002e-231 < y

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{y - \frac{t}{y}}}{-3 \cdot z} \]
      7. associate-/r*99.3%

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

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

    if -9.99999999999999961e-81 < y < 2.45000000000000002e-231

    1. Initial program 89.2%

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

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

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

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

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

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

Alternative 4: 88.9% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{1 \cdot y}{z \cdot -3}} \]
      5. *-un-lft-identity96.5%

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

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

    if -1.45e49 < y < 7.1999999999999999e84

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{y - \frac{t}{y}}}{-3 \cdot z} \]
      7. associate-/r*92.5%

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

      \[\leadsto x + \color{blue}{\frac{\frac{y - \frac{t}{y}}{-3}}{z}} \]
    10. Taylor expanded in y around 0 90.1%

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

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

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

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

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

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

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

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

    if 7.1999999999999999e84 < y

    1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{\frac{y}{z}}}{-3} \]
    10. Applied egg-rr97.2%

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

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

Alternative 5: 88.8% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.25000000000000001e54 < y < 7.1999999999999999e84

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{y - \frac{t}{y}}}{-3 \cdot z} \]
      7. associate-/r*92.5%

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

      \[\leadsto x + \color{blue}{\frac{\frac{y - \frac{t}{y}}{-3}}{z}} \]
    10. Taylor expanded in y around 0 90.1%

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

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

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

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

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

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

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

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

    if 7.1999999999999999e84 < y

    1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{\frac{y}{z}}}{-3} \]
    10. Applied egg-rr97.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.25 \cdot 10^{+54}:\\ \;\;\;\;x + \frac{1}{z} \cdot \frac{y}{-3}\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{+84}:\\ \;\;\;\;x + t \cdot \frac{0.3333333333333333}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{\frac{y}{z}}{-3}\\ \end{array} \]

Alternative 6: 89.1% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.4999999999999998e50 < y < 7.1999999999999999e84

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{y - \frac{t}{y}}}{-3 \cdot z} \]
      7. associate-/r*92.5%

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

      \[\leadsto x + \color{blue}{\frac{\frac{y - \frac{t}{y}}{-3}}{z}} \]
    10. Taylor expanded in y around 0 90.1%

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

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

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

        \[\leadsto x + \color{blue}{\frac{\frac{t}{y}}{\frac{z}{0.3333333333333333}}} \]
      4. associate-/l/90.1%

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

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

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

    if 7.1999999999999999e84 < y

    1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{\frac{y}{z}}}{-3} \]
    10. Applied egg-rr97.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.5 \cdot 10^{+50}:\\ \;\;\;\;x + \frac{1}{z} \cdot \frac{y}{-3}\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{+84}:\\ \;\;\;\;x + \frac{t}{3 \cdot \left(y \cdot z\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{\frac{y}{z}}{-3}\\ \end{array} \]

Alternative 7: 89.2% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.3499999999999999e49 < y < 7.5000000000000001e84

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{y - \frac{t}{y}}}{-3 \cdot z} \]
      7. associate-/r*92.5%

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

      \[\leadsto x + \color{blue}{\frac{\frac{y - \frac{t}{y}}{-3}}{z}} \]
    10. Taylor expanded in y around 0 90.1%

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

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

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

        \[\leadsto x + \color{blue}{\frac{\frac{t}{y}}{\frac{z}{0.3333333333333333}}} \]
      4. associate-/l/90.1%

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

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

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

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

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

    if 7.5000000000000001e84 < y

    1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{\frac{y}{z}}}{-3} \]
    10. Applied egg-rr97.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.35 \cdot 10^{+49}:\\ \;\;\;\;x + \frac{1}{z} \cdot \frac{y}{-3}\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{+84}:\\ \;\;\;\;x + \frac{t}{y \cdot \left(z \cdot 3\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{\frac{y}{z}}{-3}\\ \end{array} \]

Alternative 8: 96.0% accurate, 1.4× speedup?

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

\\
x + \left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}
\end{array}
Derivation
  1. Initial program 96.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-96.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 96.1% accurate, 1.4× speedup?

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

\\
x + \frac{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}{z}
\end{array}
Derivation
  1. Initial program 96.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-96.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 96.1% accurate, 1.4× speedup?

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

\\
x + \frac{y - \frac{t}{y}}{z \cdot -3}
\end{array}
Derivation
  1. Initial program 96.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-96.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 96.1% accurate, 1.4× speedup?

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

\\
x + \frac{\frac{y - \frac{t}{y}}{-3}}{z}
\end{array}
Derivation
  1. Initial program 96.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-96.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \frac{\color{blue}{y - \frac{t}{y}}}{-3 \cdot z} \]
    7. associate-/r*95.4%

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

    \[\leadsto x + \color{blue}{\frac{\frac{y - \frac{t}{y}}{-3}}{z}} \]
  10. Final simplification95.4%

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

Alternative 12: 48.4% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+79} \lor \neg \left(y \leq 4.7 \cdot 10^{+86}\right):\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.20000000000000016e79 or 4.7000000000000002e86 < y

    1. Initial program 98.7%

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

      \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
    3. Step-by-step derivation
      1. add-sqr-sqrt52.5%

        \[\leadsto x - \color{blue}{\sqrt{0.3333333333333333 \cdot \frac{y}{z}} \cdot \sqrt{0.3333333333333333 \cdot \frac{y}{z}}} \]
      2. sqrt-unprod47.9%

        \[\leadsto x - \color{blue}{\sqrt{\left(0.3333333333333333 \cdot \frac{y}{z}\right) \cdot \left(0.3333333333333333 \cdot \frac{y}{z}\right)}} \]
      3. swap-sqr47.9%

        \[\leadsto x - \sqrt{\color{blue}{\left(0.3333333333333333 \cdot 0.3333333333333333\right) \cdot \left(\frac{y}{z} \cdot \frac{y}{z}\right)}} \]
      4. metadata-eval47.9%

        \[\leadsto x - \sqrt{\color{blue}{0.1111111111111111} \cdot \left(\frac{y}{z} \cdot \frac{y}{z}\right)} \]
      5. metadata-eval47.9%

        \[\leadsto x - \sqrt{\color{blue}{\left(-0.3333333333333333 \cdot -0.3333333333333333\right)} \cdot \left(\frac{y}{z} \cdot \frac{y}{z}\right)} \]
      6. swap-sqr47.9%

        \[\leadsto x - \sqrt{\color{blue}{\left(-0.3333333333333333 \cdot \frac{y}{z}\right) \cdot \left(-0.3333333333333333 \cdot \frac{y}{z}\right)}} \]
      7. clear-num47.9%

        \[\leadsto x - \sqrt{\left(-0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{z}{y}}}\right) \cdot \left(-0.3333333333333333 \cdot \frac{y}{z}\right)} \]
      8. div-inv47.9%

        \[\leadsto x - \sqrt{\color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \cdot \left(-0.3333333333333333 \cdot \frac{y}{z}\right)} \]
      9. clear-num47.9%

        \[\leadsto x - \sqrt{\frac{-0.3333333333333333}{\frac{z}{y}} \cdot \left(-0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{z}{y}}}\right)} \]
      10. div-inv47.9%

        \[\leadsto x - \sqrt{\frac{-0.3333333333333333}{\frac{z}{y}} \cdot \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}}} \]
      11. sqrt-unprod8.9%

        \[\leadsto x - \color{blue}{\sqrt{\frac{-0.3333333333333333}{\frac{z}{y}}} \cdot \sqrt{\frac{-0.3333333333333333}{\frac{z}{y}}}} \]
      12. add-sqr-sqrt18.3%

        \[\leadsto x - \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
    4. Applied egg-rr18.3%

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

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{y}{z}} \]
    6. Step-by-step derivation
      1. add-sqr-sqrt52.5%

        \[\leadsto x - \color{blue}{\sqrt{0.3333333333333333 \cdot \frac{y}{z}} \cdot \sqrt{0.3333333333333333 \cdot \frac{y}{z}}} \]
      2. sqrt-unprod47.9%

        \[\leadsto x - \color{blue}{\sqrt{\left(0.3333333333333333 \cdot \frac{y}{z}\right) \cdot \left(0.3333333333333333 \cdot \frac{y}{z}\right)}} \]
      3. swap-sqr47.9%

        \[\leadsto x - \sqrt{\color{blue}{\left(0.3333333333333333 \cdot 0.3333333333333333\right) \cdot \left(\frac{y}{z} \cdot \frac{y}{z}\right)}} \]
      4. metadata-eval47.9%

        \[\leadsto x - \sqrt{\color{blue}{0.1111111111111111} \cdot \left(\frac{y}{z} \cdot \frac{y}{z}\right)} \]
      5. metadata-eval47.9%

        \[\leadsto x - \sqrt{\color{blue}{\left(-0.3333333333333333 \cdot -0.3333333333333333\right)} \cdot \left(\frac{y}{z} \cdot \frac{y}{z}\right)} \]
      6. swap-sqr47.9%

        \[\leadsto x - \sqrt{\color{blue}{\left(-0.3333333333333333 \cdot \frac{y}{z}\right) \cdot \left(-0.3333333333333333 \cdot \frac{y}{z}\right)}} \]
      7. clear-num47.9%

        \[\leadsto x - \sqrt{\left(-0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{z}{y}}}\right) \cdot \left(-0.3333333333333333 \cdot \frac{y}{z}\right)} \]
      8. div-inv47.9%

        \[\leadsto x - \sqrt{\color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \cdot \left(-0.3333333333333333 \cdot \frac{y}{z}\right)} \]
      9. clear-num47.9%

        \[\leadsto x - \sqrt{\frac{-0.3333333333333333}{\frac{z}{y}} \cdot \left(-0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{z}{y}}}\right)} \]
      10. div-inv47.9%

        \[\leadsto x - \sqrt{\frac{-0.3333333333333333}{\frac{z}{y}} \cdot \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}}} \]
      11. sqrt-unprod8.9%

        \[\leadsto x - \color{blue}{\sqrt{\frac{-0.3333333333333333}{\frac{z}{y}}} \cdot \sqrt{\frac{-0.3333333333333333}{\frac{z}{y}}}} \]
      12. add-sqr-sqrt18.3%

        \[\leadsto x - \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
    7. Applied egg-rr79.0%

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

    if -4.20000000000000016e79 < y < 4.7000000000000002e86

    1. Initial program 94.8%

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

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

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

Alternative 13: 48.4% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{+80} \lor \neg \left(y \leq 5.1 \cdot 10^{+89}\right):\\
\;\;\;\;\frac{\frac{y}{-3}}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.99999999999999987e80 or 5.10000000000000027e89 < y

    1. Initial program 98.7%

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

      \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
    3. Step-by-step derivation
      1. add-sqr-sqrt52.5%

        \[\leadsto x - \color{blue}{\sqrt{0.3333333333333333 \cdot \frac{y}{z}} \cdot \sqrt{0.3333333333333333 \cdot \frac{y}{z}}} \]
      2. sqrt-unprod47.9%

        \[\leadsto x - \color{blue}{\sqrt{\left(0.3333333333333333 \cdot \frac{y}{z}\right) \cdot \left(0.3333333333333333 \cdot \frac{y}{z}\right)}} \]
      3. swap-sqr47.9%

        \[\leadsto x - \sqrt{\color{blue}{\left(0.3333333333333333 \cdot 0.3333333333333333\right) \cdot \left(\frac{y}{z} \cdot \frac{y}{z}\right)}} \]
      4. metadata-eval47.9%

        \[\leadsto x - \sqrt{\color{blue}{0.1111111111111111} \cdot \left(\frac{y}{z} \cdot \frac{y}{z}\right)} \]
      5. metadata-eval47.9%

        \[\leadsto x - \sqrt{\color{blue}{\left(-0.3333333333333333 \cdot -0.3333333333333333\right)} \cdot \left(\frac{y}{z} \cdot \frac{y}{z}\right)} \]
      6. swap-sqr47.9%

        \[\leadsto x - \sqrt{\color{blue}{\left(-0.3333333333333333 \cdot \frac{y}{z}\right) \cdot \left(-0.3333333333333333 \cdot \frac{y}{z}\right)}} \]
      7. clear-num47.9%

        \[\leadsto x - \sqrt{\left(-0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{z}{y}}}\right) \cdot \left(-0.3333333333333333 \cdot \frac{y}{z}\right)} \]
      8. div-inv47.9%

        \[\leadsto x - \sqrt{\color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \cdot \left(-0.3333333333333333 \cdot \frac{y}{z}\right)} \]
      9. clear-num47.9%

        \[\leadsto x - \sqrt{\frac{-0.3333333333333333}{\frac{z}{y}} \cdot \left(-0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{z}{y}}}\right)} \]
      10. div-inv47.9%

        \[\leadsto x - \sqrt{\frac{-0.3333333333333333}{\frac{z}{y}} \cdot \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}}} \]
      11. sqrt-unprod8.9%

        \[\leadsto x - \color{blue}{\sqrt{\frac{-0.3333333333333333}{\frac{z}{y}}} \cdot \sqrt{\frac{-0.3333333333333333}{\frac{z}{y}}}} \]
      12. add-sqr-sqrt18.3%

        \[\leadsto x - \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
    4. Applied egg-rr18.3%

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

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{y}{z}} \]
    6. Step-by-step derivation
      1. add-sqr-sqrt0.9%

        \[\leadsto \color{blue}{\sqrt{0.3333333333333333 \cdot \frac{y}{z}} \cdot \sqrt{0.3333333333333333 \cdot \frac{y}{z}}} \]
      2. sqrt-unprod25.0%

        \[\leadsto \color{blue}{\sqrt{\left(0.3333333333333333 \cdot \frac{y}{z}\right) \cdot \left(0.3333333333333333 \cdot \frac{y}{z}\right)}} \]
      3. swap-sqr25.0%

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

        \[\leadsto \sqrt{\color{blue}{0.1111111111111111} \cdot \left(\frac{y}{z} \cdot \frac{y}{z}\right)} \]
      5. metadata-eval25.0%

        \[\leadsto \sqrt{\color{blue}{\left(-0.3333333333333333 \cdot -0.3333333333333333\right)} \cdot \left(\frac{y}{z} \cdot \frac{y}{z}\right)} \]
      6. swap-sqr25.0%

        \[\leadsto \sqrt{\color{blue}{\left(-0.3333333333333333 \cdot \frac{y}{z}\right) \cdot \left(-0.3333333333333333 \cdot \frac{y}{z}\right)}} \]
      7. clear-num25.0%

        \[\leadsto \sqrt{\left(-0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{z}{y}}}\right) \cdot \left(-0.3333333333333333 \cdot \frac{y}{z}\right)} \]
      8. div-inv25.0%

        \[\leadsto \sqrt{\color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \cdot \left(-0.3333333333333333 \cdot \frac{y}{z}\right)} \]
      9. clear-num25.0%

        \[\leadsto \sqrt{\frac{-0.3333333333333333}{\frac{z}{y}} \cdot \left(-0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{z}{y}}}\right)} \]
      10. div-inv25.0%

        \[\leadsto \sqrt{\frac{-0.3333333333333333}{\frac{z}{y}} \cdot \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}}} \]
      11. sqrt-unprod36.1%

        \[\leadsto \color{blue}{\sqrt{\frac{-0.3333333333333333}{\frac{z}{y}}} \cdot \sqrt{\frac{-0.3333333333333333}{\frac{z}{y}}}} \]
      12. add-sqr-sqrt79.0%

        \[\leadsto \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
      13. div-inv79.1%

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

        \[\leadsto \color{blue}{\frac{1}{-3}} \cdot \frac{1}{\frac{z}{y}} \]
      15. clear-num79.0%

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

        \[\leadsto \color{blue}{\frac{1 \cdot y}{-3 \cdot z}} \]
      17. *-un-lft-identity79.2%

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

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

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

    if -2.99999999999999987e80 < y < 5.10000000000000027e89

    1. Initial program 94.8%

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

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

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

Alternative 14: 48.4% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;y \leq 4.7 \cdot 10^{+86}:\\
\;\;\;\;x\\

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


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

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
    3. Step-by-step derivation
      1. add-sqr-sqrt63.7%

        \[\leadsto x - \color{blue}{\sqrt{0.3333333333333333 \cdot \frac{y}{z}} \cdot \sqrt{0.3333333333333333 \cdot \frac{y}{z}}} \]
      2. sqrt-unprod53.0%

        \[\leadsto x - \color{blue}{\sqrt{\left(0.3333333333333333 \cdot \frac{y}{z}\right) \cdot \left(0.3333333333333333 \cdot \frac{y}{z}\right)}} \]
      3. swap-sqr53.1%

        \[\leadsto x - \sqrt{\color{blue}{\left(0.3333333333333333 \cdot 0.3333333333333333\right) \cdot \left(\frac{y}{z} \cdot \frac{y}{z}\right)}} \]
      4. metadata-eval53.1%

        \[\leadsto x - \sqrt{\color{blue}{0.1111111111111111} \cdot \left(\frac{y}{z} \cdot \frac{y}{z}\right)} \]
      5. metadata-eval53.1%

        \[\leadsto x - \sqrt{\color{blue}{\left(-0.3333333333333333 \cdot -0.3333333333333333\right)} \cdot \left(\frac{y}{z} \cdot \frac{y}{z}\right)} \]
      6. swap-sqr53.0%

        \[\leadsto x - \sqrt{\color{blue}{\left(-0.3333333333333333 \cdot \frac{y}{z}\right) \cdot \left(-0.3333333333333333 \cdot \frac{y}{z}\right)}} \]
      7. clear-num53.0%

        \[\leadsto x - \sqrt{\left(-0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{z}{y}}}\right) \cdot \left(-0.3333333333333333 \cdot \frac{y}{z}\right)} \]
      8. div-inv53.0%

        \[\leadsto x - \sqrt{\color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \cdot \left(-0.3333333333333333 \cdot \frac{y}{z}\right)} \]
      9. clear-num53.0%

        \[\leadsto x - \sqrt{\frac{-0.3333333333333333}{\frac{z}{y}} \cdot \left(-0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{z}{y}}}\right)} \]
      10. div-inv53.0%

        \[\leadsto x - \sqrt{\frac{-0.3333333333333333}{\frac{z}{y}} \cdot \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}}} \]
      11. sqrt-unprod10.1%

        \[\leadsto x - \color{blue}{\sqrt{\frac{-0.3333333333333333}{\frac{z}{y}}} \cdot \sqrt{\frac{-0.3333333333333333}{\frac{z}{y}}}} \]
      12. add-sqr-sqrt21.0%

        \[\leadsto x - \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
    4. Applied egg-rr21.0%

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

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

        \[\leadsto \color{blue}{\sqrt{0.3333333333333333 \cdot \frac{y}{z}} \cdot \sqrt{0.3333333333333333 \cdot \frac{y}{z}}} \]
      2. sqrt-unprod17.6%

        \[\leadsto \color{blue}{\sqrt{\left(0.3333333333333333 \cdot \frac{y}{z}\right) \cdot \left(0.3333333333333333 \cdot \frac{y}{z}\right)}} \]
      3. swap-sqr17.6%

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

        \[\leadsto \sqrt{\color{blue}{0.1111111111111111} \cdot \left(\frac{y}{z} \cdot \frac{y}{z}\right)} \]
      5. metadata-eval17.6%

        \[\leadsto \sqrt{\color{blue}{\left(-0.3333333333333333 \cdot -0.3333333333333333\right)} \cdot \left(\frac{y}{z} \cdot \frac{y}{z}\right)} \]
      6. swap-sqr17.6%

        \[\leadsto \sqrt{\color{blue}{\left(-0.3333333333333333 \cdot \frac{y}{z}\right) \cdot \left(-0.3333333333333333 \cdot \frac{y}{z}\right)}} \]
      7. clear-num17.7%

        \[\leadsto \sqrt{\left(-0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{z}{y}}}\right) \cdot \left(-0.3333333333333333 \cdot \frac{y}{z}\right)} \]
      8. div-inv17.6%

        \[\leadsto \sqrt{\color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \cdot \left(-0.3333333333333333 \cdot \frac{y}{z}\right)} \]
      9. clear-num17.7%

        \[\leadsto \sqrt{\frac{-0.3333333333333333}{\frac{z}{y}} \cdot \left(-0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{z}{y}}}\right)} \]
      10. div-inv17.6%

        \[\leadsto \sqrt{\frac{-0.3333333333333333}{\frac{z}{y}} \cdot \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}}} \]
      11. sqrt-unprod24.0%

        \[\leadsto \color{blue}{\sqrt{\frac{-0.3333333333333333}{\frac{z}{y}}} \cdot \sqrt{\frac{-0.3333333333333333}{\frac{z}{y}}}} \]
      12. add-sqr-sqrt76.0%

        \[\leadsto \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
      13. associate-/r/76.0%

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

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

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

    if -2.99999999999999987e80 < y < 4.7000000000000002e86

    1. Initial program 94.8%

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

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

    if 4.7000000000000002e86 < y

    1. Initial program 97.3%

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

      \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
    3. Step-by-step derivation
      1. add-sqr-sqrt38.8%

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

        \[\leadsto x - \color{blue}{\sqrt{\left(0.3333333333333333 \cdot \frac{y}{z}\right) \cdot \left(0.3333333333333333 \cdot \frac{y}{z}\right)}} \]
      3. swap-sqr41.7%

        \[\leadsto x - \sqrt{\color{blue}{\left(0.3333333333333333 \cdot 0.3333333333333333\right) \cdot \left(\frac{y}{z} \cdot \frac{y}{z}\right)}} \]
      4. metadata-eval41.7%

        \[\leadsto x - \sqrt{\color{blue}{0.1111111111111111} \cdot \left(\frac{y}{z} \cdot \frac{y}{z}\right)} \]
      5. metadata-eval41.7%

        \[\leadsto x - \sqrt{\color{blue}{\left(-0.3333333333333333 \cdot -0.3333333333333333\right)} \cdot \left(\frac{y}{z} \cdot \frac{y}{z}\right)} \]
      6. swap-sqr41.7%

        \[\leadsto x - \sqrt{\color{blue}{\left(-0.3333333333333333 \cdot \frac{y}{z}\right) \cdot \left(-0.3333333333333333 \cdot \frac{y}{z}\right)}} \]
      7. clear-num41.7%

        \[\leadsto x - \sqrt{\left(-0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{z}{y}}}\right) \cdot \left(-0.3333333333333333 \cdot \frac{y}{z}\right)} \]
      8. div-inv41.7%

        \[\leadsto x - \sqrt{\color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \cdot \left(-0.3333333333333333 \cdot \frac{y}{z}\right)} \]
      9. clear-num41.7%

        \[\leadsto x - \sqrt{\frac{-0.3333333333333333}{\frac{z}{y}} \cdot \left(-0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{z}{y}}}\right)} \]
      10. div-inv41.7%

        \[\leadsto x - \sqrt{\frac{-0.3333333333333333}{\frac{z}{y}} \cdot \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}}} \]
      11. sqrt-unprod7.5%

        \[\leadsto x - \color{blue}{\sqrt{\frac{-0.3333333333333333}{\frac{z}{y}}} \cdot \sqrt{\frac{-0.3333333333333333}{\frac{z}{y}}}} \]
      12. add-sqr-sqrt15.0%

        \[\leadsto x - \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
    4. Applied egg-rr15.0%

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

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

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

        \[\leadsto x - \color{blue}{\sqrt{\left(0.3333333333333333 \cdot \frac{y}{z}\right) \cdot \left(0.3333333333333333 \cdot \frac{y}{z}\right)}} \]
      3. swap-sqr41.7%

        \[\leadsto x - \sqrt{\color{blue}{\left(0.3333333333333333 \cdot 0.3333333333333333\right) \cdot \left(\frac{y}{z} \cdot \frac{y}{z}\right)}} \]
      4. metadata-eval41.7%

        \[\leadsto x - \sqrt{\color{blue}{0.1111111111111111} \cdot \left(\frac{y}{z} \cdot \frac{y}{z}\right)} \]
      5. metadata-eval41.7%

        \[\leadsto x - \sqrt{\color{blue}{\left(-0.3333333333333333 \cdot -0.3333333333333333\right)} \cdot \left(\frac{y}{z} \cdot \frac{y}{z}\right)} \]
      6. swap-sqr41.7%

        \[\leadsto x - \sqrt{\color{blue}{\left(-0.3333333333333333 \cdot \frac{y}{z}\right) \cdot \left(-0.3333333333333333 \cdot \frac{y}{z}\right)}} \]
      7. clear-num41.7%

        \[\leadsto x - \sqrt{\left(-0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{z}{y}}}\right) \cdot \left(-0.3333333333333333 \cdot \frac{y}{z}\right)} \]
      8. div-inv41.7%

        \[\leadsto x - \sqrt{\color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \cdot \left(-0.3333333333333333 \cdot \frac{y}{z}\right)} \]
      9. clear-num41.7%

        \[\leadsto x - \sqrt{\frac{-0.3333333333333333}{\frac{z}{y}} \cdot \left(-0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{z}{y}}}\right)} \]
      10. div-inv41.7%

        \[\leadsto x - \sqrt{\frac{-0.3333333333333333}{\frac{z}{y}} \cdot \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}}} \]
      11. sqrt-unprod7.5%

        \[\leadsto x - \color{blue}{\sqrt{\frac{-0.3333333333333333}{\frac{z}{y}}} \cdot \sqrt{\frac{-0.3333333333333333}{\frac{z}{y}}}} \]
      12. add-sqr-sqrt15.0%

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

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

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

Alternative 15: 63.7% accurate, 2.1× speedup?

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

\\
x + \frac{y}{z \cdot -3}
\end{array}
Derivation
  1. Initial program 96.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-96.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{1 \cdot y}{z \cdot -3}} \]
    5. *-un-lft-identity60.6%

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

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

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

Alternative 16: 30.4% accurate, 15.0× speedup?

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

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

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

    \[\leadsto \color{blue}{x} \]
  3. Final simplification28.2%

    \[\leadsto x \]

Developer target: 96.2% 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 2023200 
(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))))