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

Percentage Accurate: 95.9% → 96.4%
Time: 12.5s
Alternatives: 17
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 95.9% 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: 96.4% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot -3}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. *-un-lft-identity97.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 61.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\ \mathbf{if}\;y \leq -4.4 \cdot 10^{+55}:\\ \;\;\;\;\frac{y}{z} \cdot -0.3333333333333333\\ \mathbf{elif}\;y \leq -8 \cdot 10^{-30}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{-69}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 8.8 \cdot 10^{-13}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{+99}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* 0.3333333333333333 (/ t (* z y)))))
   (if (<= y -4.4e+55)
     (* (/ y z) -0.3333333333333333)
     (if (<= y -8e-30)
       t_1
       (if (<= y -1.7e-69)
         x
         (if (<= y 8.8e-13)
           t_1
           (if (<= y 3.8e+99) x (/ (* y -0.3333333333333333) z))))))))
double code(double x, double y, double z, double t) {
	double t_1 = 0.3333333333333333 * (t / (z * y));
	double tmp;
	if (y <= -4.4e+55) {
		tmp = (y / z) * -0.3333333333333333;
	} else if (y <= -8e-30) {
		tmp = t_1;
	} else if (y <= -1.7e-69) {
		tmp = x;
	} else if (y <= 8.8e-13) {
		tmp = t_1;
	} else if (y <= 3.8e+99) {
		tmp = x;
	} else {
		tmp = (y * -0.3333333333333333) / z;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 0.3333333333333333d0 * (t / (z * y))
    if (y <= (-4.4d+55)) then
        tmp = (y / z) * (-0.3333333333333333d0)
    else if (y <= (-8d-30)) then
        tmp = t_1
    else if (y <= (-1.7d-69)) then
        tmp = x
    else if (y <= 8.8d-13) then
        tmp = t_1
    else if (y <= 3.8d+99) then
        tmp = x
    else
        tmp = (y * (-0.3333333333333333d0)) / z
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = 0.3333333333333333 * (t / (z * y));
	double tmp;
	if (y <= -4.4e+55) {
		tmp = (y / z) * -0.3333333333333333;
	} else if (y <= -8e-30) {
		tmp = t_1;
	} else if (y <= -1.7e-69) {
		tmp = x;
	} else if (y <= 8.8e-13) {
		tmp = t_1;
	} else if (y <= 3.8e+99) {
		tmp = x;
	} else {
		tmp = (y * -0.3333333333333333) / z;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = 0.3333333333333333 * (t / (z * y))
	tmp = 0
	if y <= -4.4e+55:
		tmp = (y / z) * -0.3333333333333333
	elif y <= -8e-30:
		tmp = t_1
	elif y <= -1.7e-69:
		tmp = x
	elif y <= 8.8e-13:
		tmp = t_1
	elif y <= 3.8e+99:
		tmp = x
	else:
		tmp = (y * -0.3333333333333333) / z
	return tmp
function code(x, y, z, t)
	t_1 = Float64(0.3333333333333333 * Float64(t / Float64(z * y)))
	tmp = 0.0
	if (y <= -4.4e+55)
		tmp = Float64(Float64(y / z) * -0.3333333333333333);
	elseif (y <= -8e-30)
		tmp = t_1;
	elseif (y <= -1.7e-69)
		tmp = x;
	elseif (y <= 8.8e-13)
		tmp = t_1;
	elseif (y <= 3.8e+99)
		tmp = x;
	else
		tmp = Float64(Float64(y * -0.3333333333333333) / z);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = 0.3333333333333333 * (t / (z * y));
	tmp = 0.0;
	if (y <= -4.4e+55)
		tmp = (y / z) * -0.3333333333333333;
	elseif (y <= -8e-30)
		tmp = t_1;
	elseif (y <= -1.7e-69)
		tmp = x;
	elseif (y <= 8.8e-13)
		tmp = t_1;
	elseif (y <= 3.8e+99)
		tmp = x;
	else
		tmp = (y * -0.3333333333333333) / z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.4e+55], N[(N[(y / z), $MachinePrecision] * -0.3333333333333333), $MachinePrecision], If[LessEqual[y, -8e-30], t$95$1, If[LessEqual[y, -1.7e-69], x, If[LessEqual[y, 8.8e-13], t$95$1, If[LessEqual[y, 3.8e+99], x, N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -8 \cdot 10^{-30}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -1.7 \cdot 10^{-69}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 8.8 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 3.8 \cdot 10^{+99}:\\
\;\;\;\;x\\

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


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

    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. sub-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.40000000000000021e55 < y < -8.000000000000001e-30 or -1.70000000000000004e-69 < y < 8.79999999999999986e-13

    1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.000000000000001e-30 < y < -1.70000000000000004e-69 or 8.79999999999999986e-13 < y < 3.8e99

    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.8e99 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.4 \cdot 10^{+55}:\\ \;\;\;\;\frac{y}{z} \cdot -0.3333333333333333\\ \mathbf{elif}\;y \leq -8 \cdot 10^{-30}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{-69}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 8.8 \cdot 10^{-13}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{+99}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 75.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{+30} \lor \neg \left(y \leq -5.2 \cdot 10^{-29}\right) \land \left(y \leq -4.1 \cdot 10^{-72} \lor \neg \left(y \leq 1.05 \cdot 10^{-17}\right)\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.4999999999999995e30 or -5.2000000000000004e-29 < y < -4.10000000000000003e-72 or 1.04999999999999996e-17 < y

    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.4999999999999995e30 < y < -5.2000000000000004e-29 or -4.10000000000000003e-72 < y < 1.04999999999999996e-17

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{+30} \lor \neg \left(y \leq -5.2 \cdot 10^{-29}\right) \land \left(y \leq -4.1 \cdot 10^{-72} \lor \neg \left(y \leq 1.05 \cdot 10^{-17}\right)\right):\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 77.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := x - \frac{y}{z \cdot 3}\\
\mathbf{if}\;y \leq -8.5 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq -3.85 \cdot 10^{-72} \lor \neg \left(y \leq 3.9 \cdot 10^{-16}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.4999999999999995e30 or -1.3499999999999999e-28 < y < -3.8499999999999999e-72 or 3.89999999999999977e-16 < y

    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \frac{\color{blue}{-1 \cdot y}}{z \cdot 3} \]
    12. Step-by-step derivation
      1. neg-mul-192.6%

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

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

    if -8.4999999999999995e30 < y < -1.3499999999999999e-28

    1. Initial program 99.7%

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

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

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

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

        \[\leadsto 0.3333333333333333 \cdot \color{blue}{\frac{\frac{t}{z}}{y}} + -0.3333333333333333 \cdot \frac{y}{z} \]
      3. metadata-eval92.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{t}{y}}}{3 \cdot z} \]
      5. *-commutative82.8%

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

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

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

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

    if -3.8499999999999999e-72 < y < 3.89999999999999977e-16

    1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.3333333333333333 \cdot \left(\color{blue}{\frac{\frac{t}{y}}{z}} - \frac{y}{z}\right) \]
      8. div-sub69.2%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{+30}:\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \mathbf{elif}\;y \leq -1.35 \cdot 10^{-28}:\\ \;\;\;\;\frac{\frac{t}{z \cdot y}}{3}\\ \mathbf{elif}\;y \leq -3.85 \cdot 10^{-72} \lor \neg \left(y \leq 3.9 \cdot 10^{-16}\right):\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{0.3333333333333333 \cdot t}{z}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 75.5% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq -2 \cdot 10^{-28}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 8.5 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.4999999999999995e30 or 8.4999999999999995e-18 < y

    1. Initial program 99.0%

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

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

    if -8.4999999999999995e30 < y < -1.99999999999999994e-28 or -6.2000000000000003e-74 < y < 8.4999999999999995e-18

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999994e-28 < y < -6.2000000000000003e-74

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{+30}:\\ \;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq -2 \cdot 10^{-28}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\ \mathbf{elif}\;y \leq -6.2 \cdot 10^{-74}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-18}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\ \mathbf{else}:\\ \;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 75.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq -5.2 \cdot 10^{-30}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 2.45 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.4999999999999995e30 or 2.45000000000000006e-17 < y

    1. Initial program 99.0%

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

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

    if -8.4999999999999995e30 < y < -5.19999999999999973e-30 or -8.5999999999999998e-75 < y < 2.45000000000000006e-17

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{t}{y}}}{3 \cdot z} \]
      5. *-commutative67.7%

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

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

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

    if -5.19999999999999973e-30 < y < -8.5999999999999998e-75

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{+30}:\\ \;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{-30}:\\ \;\;\;\;\frac{t}{y \cdot \left(z \cdot 3\right)}\\ \mathbf{elif}\;y \leq -8.6 \cdot 10^{-75}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 2.45 \cdot 10^{-17}:\\ \;\;\;\;\frac{t}{y \cdot \left(z \cdot 3\right)}\\ \mathbf{else}:\\ \;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 75.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\frac{t}{z \cdot y}}{3}\\ t_2 := x - 0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{if}\;y \leq -8.5 \cdot 10^{+30}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -4 \cdot 10^{-29}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -5.8 \cdot 10^{-74}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{-18}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (/ t (* z y)) 3.0)) (t_2 (- x (* 0.3333333333333333 (/ y z)))))
   (if (<= y -8.5e+30)
     t_2
     (if (<= y -4e-29)
       t_1
       (if (<= y -5.8e-74)
         (+ x (* y (/ -0.3333333333333333 z)))
         (if (<= y 3.7e-18) t_1 t_2))))))
double code(double x, double y, double z, double t) {
	double t_1 = (t / (z * y)) / 3.0;
	double t_2 = x - (0.3333333333333333 * (y / z));
	double tmp;
	if (y <= -8.5e+30) {
		tmp = t_2;
	} else if (y <= -4e-29) {
		tmp = t_1;
	} else if (y <= -5.8e-74) {
		tmp = x + (y * (-0.3333333333333333 / z));
	} else if (y <= 3.7e-18) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (t / (z * y)) / 3.0d0
    t_2 = x - (0.3333333333333333d0 * (y / z))
    if (y <= (-8.5d+30)) then
        tmp = t_2
    else if (y <= (-4d-29)) then
        tmp = t_1
    else if (y <= (-5.8d-74)) then
        tmp = x + (y * ((-0.3333333333333333d0) / z))
    else if (y <= 3.7d-18) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (t / (z * y)) / 3.0;
	double t_2 = x - (0.3333333333333333 * (y / z));
	double tmp;
	if (y <= -8.5e+30) {
		tmp = t_2;
	} else if (y <= -4e-29) {
		tmp = t_1;
	} else if (y <= -5.8e-74) {
		tmp = x + (y * (-0.3333333333333333 / z));
	} else if (y <= 3.7e-18) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (t / (z * y)) / 3.0
	t_2 = x - (0.3333333333333333 * (y / z))
	tmp = 0
	if y <= -8.5e+30:
		tmp = t_2
	elif y <= -4e-29:
		tmp = t_1
	elif y <= -5.8e-74:
		tmp = x + (y * (-0.3333333333333333 / z))
	elif y <= 3.7e-18:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(t / Float64(z * y)) / 3.0)
	t_2 = Float64(x - Float64(0.3333333333333333 * Float64(y / z)))
	tmp = 0.0
	if (y <= -8.5e+30)
		tmp = t_2;
	elseif (y <= -4e-29)
		tmp = t_1;
	elseif (y <= -5.8e-74)
		tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z)));
	elseif (y <= 3.7e-18)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (t / (z * y)) / 3.0;
	t_2 = x - (0.3333333333333333 * (y / z));
	tmp = 0.0;
	if (y <= -8.5e+30)
		tmp = t_2;
	elseif (y <= -4e-29)
		tmp = t_1;
	elseif (y <= -5.8e-74)
		tmp = x + (y * (-0.3333333333333333 / z));
	elseif (y <= 3.7e-18)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision] / 3.0), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.5e+30], t$95$2, If[LessEqual[y, -4e-29], t$95$1, If[LessEqual[y, -5.8e-74], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7e-18], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -4 \cdot 10^{-29}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 3.7 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.4999999999999995e30 or 3.7000000000000003e-18 < y

    1. Initial program 99.0%

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

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

    if -8.4999999999999995e30 < y < -3.99999999999999977e-29 or -5.8e-74 < y < 3.7000000000000003e-18

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{t}{y}}}{3 \cdot z} \]
      5. *-commutative67.7%

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

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

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

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

    if -3.99999999999999977e-29 < y < -5.8e-74

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{+30}:\\ \;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq -4 \cdot 10^{-29}:\\ \;\;\;\;\frac{\frac{t}{z \cdot y}}{3}\\ \mathbf{elif}\;y \leq -5.8 \cdot 10^{-74}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{-18}:\\ \;\;\;\;\frac{\frac{t}{z \cdot y}}{3}\\ \mathbf{else}:\\ \;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 77.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{if}\;y \leq -9 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -7.8 \cdot 10^{-29}:\\
\;\;\;\;\frac{\frac{t}{z \cdot y}}{3}\\

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

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -8.9999999999999999e30 or 1.16000000000000007e-14 < y

    1. Initial program 99.0%

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

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

    if -8.9999999999999999e30 < y < -7.7999999999999995e-29

    1. Initial program 99.7%

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

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

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

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

        \[\leadsto 0.3333333333333333 \cdot \color{blue}{\frac{\frac{t}{z}}{y}} + -0.3333333333333333 \cdot \frac{y}{z} \]
      3. metadata-eval92.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{t}{y}}}{3 \cdot z} \]
      5. *-commutative82.8%

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

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

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

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

    if -7.7999999999999995e-29 < y < -2.40000000000000013e-76

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.40000000000000013e-76 < y < 1.16000000000000007e-14

    1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.3333333333333333 \cdot \left(\color{blue}{\frac{\frac{t}{y}}{z}} - \frac{y}{z}\right) \]
      8. div-sub69.2%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9 \cdot 10^{+30}:\\ \;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq -7.8 \cdot 10^{-29}:\\ \;\;\;\;\frac{\frac{t}{z \cdot y}}{3}\\ \mathbf{elif}\;y \leq -2.4 \cdot 10^{-76}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 1.16 \cdot 10^{-14}:\\ \;\;\;\;\frac{\frac{0.3333333333333333 \cdot t}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 80.9% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z #s(literal 3 binary64)) < -4.99999999999999997e88 or 4.9999999999999999e-13 < (*.f64 z #s(literal 3 binary64))

    1. Initial program 99.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{0.3333333333333333}{z} \cdot \color{blue}{\mathsf{fma}\left(t, \frac{1}{y}, -y\right)} \]
    6. Applied egg-rr93.2%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \frac{\color{blue}{-1 \cdot y}}{z \cdot 3} \]
    12. Step-by-step derivation
      1. neg-mul-180.0%

        \[\leadsto x + \frac{\color{blue}{-y}}{z \cdot 3} \]
    13. Simplified80.0%

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

    if -4.99999999999999997e88 < (*.f64 z #s(literal 3 binary64)) < 4.9999999999999999e-13

    1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 89.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.6 \cdot 10^{+55} \lor \neg \left(y \leq 4.5 \cdot 10^{+52}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.59999999999999987e55 or 4.5e52 < y

    1. Initial program 98.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \frac{\color{blue}{-1 \cdot y}}{z \cdot 3} \]
    12. Step-by-step derivation
      1. neg-mul-194.8%

        \[\leadsto x + \frac{\color{blue}{-y}}{z \cdot 3} \]
    13. Simplified94.8%

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

    if -3.59999999999999987e55 < y < 4.5e52

    1. Initial program 96.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.6 \cdot 10^{+55} \lor \neg \left(y \leq 4.5 \cdot 10^{+52}\right):\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 92.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{+55} \lor \neg \left(y \leq 1.82 \cdot 10^{+56}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.19999999999999962e55 or 1.8199999999999999e56 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \frac{\color{blue}{-1 \cdot y}}{z \cdot 3} \]
    12. Step-by-step derivation
      1. neg-mul-195.7%

        \[\leadsto x + \frac{\color{blue}{-y}}{z \cdot 3} \]
    13. Simplified95.7%

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

    if -8.19999999999999962e55 < y < 1.8199999999999999e56

    1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{0.3333333333333333}{z} \cdot \color{blue}{\mathsf{fma}\left(t, \frac{1}{y}, -y\right)} \]
    6. Applied egg-rr94.3%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.2 \cdot 10^{+55} \lor \neg \left(y \leq 1.82 \cdot 10^{+56}\right):\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 48.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.1 \cdot 10^{+55} \lor \neg \left(y \leq 3.8 \cdot 10^{+101}\right):\\
\;\;\;\;\frac{y}{z} \cdot -0.3333333333333333\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.09999999999999981e55 or 3.7999999999999998e101 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.09999999999999981e55 < y < 3.7999999999999998e101

    1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.1 \cdot 10^{+55} \lor \neg \left(y \leq 3.8 \cdot 10^{+101}\right):\\ \;\;\;\;\frac{y}{z} \cdot -0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 48.4% accurate, 1.0× speedup?

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

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

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

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


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

    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. sub-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.50000000000000002e55 < y < 3.49999999999999976e100

    1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.49999999999999976e100 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{+55}:\\ \;\;\;\;\frac{y}{z} \cdot -0.3333333333333333\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{+100}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 95.9% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{y}{z \cdot -3} + \left(x + \frac{t}{z \cdot \left(y \cdot 3\right)}\right) \]
  6. Add Preprocessing

Alternative 15: 95.8% accurate, 1.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto x + 0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z} \]
  7. Add Preprocessing

Alternative 16: 95.8% accurate, 1.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \frac{0.3333333333333333}{z} \cdot \color{blue}{\mathsf{fma}\left(t, \frac{1}{y}, -y\right)} \]
  6. Applied egg-rr96.3%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto x + \frac{\frac{t}{y} - y}{z \cdot 3} \]
  12. Add Preprocessing

Alternative 17: 30.1% accurate, 15.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in x around inf 31.2%

    \[\leadsto \color{blue}{x} \]
  6. Final simplification31.2%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 96.4% 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 2024073 
(FPCore (x y z t)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, H"
  :precision binary64

  :alt
  (+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))

  (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))