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

Percentage Accurate: 95.2% → 98.5%
Time: 11.8s
Alternatives: 15
Speedup: 0.7×

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 15 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.2% 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: 98.5% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq 9.2 \cdot 10^{-129}:\\
\;\;\;\;x + \frac{\frac{t}{z}}{y \cdot 3}\\

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


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

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

    if -1.3800000000000001e-105 < y < 9.1999999999999998e-129

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.1999999999999998e-129 < y

    1. Initial program 97.7%

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

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

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

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

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

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

Alternative 2: 60.5% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -4.1 \cdot 10^{-122}:\\
\;\;\;\;x\\

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

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


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

    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. *-un-lft-identity97.3%

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

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

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

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{t}{y \cdot z} - 0.3333333333333333 \cdot \frac{y}{z}} \]
    5. Step-by-step derivation
      1. cancel-sign-sub-inv70.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{\color{blue}{\frac{-0.3333333333333333}{-1}}}{z \cdot \frac{y}{t}} \]
      11. associate-/r*71.3%

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{-0.3333333333333333}{\color{blue}{-z \cdot \frac{y}{t}}} \]
      13. distribute-lft-neg-out71.3%

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{-0.3333333333333333}{\color{blue}{\frac{\left(-z\right) \cdot y}{t}}} \]
      15. *-commutative70.5%

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \color{blue}{\frac{-0.3333333333333333 \cdot t}{y \cdot \left(-z\right)}} \]
      17. *-commutative70.5%

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{\color{blue}{t \cdot -0.3333333333333333}}{y \cdot \left(-z\right)} \]
      18. metadata-eval70.5%

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{t \cdot \color{blue}{\left(-0.3333333333333333\right)}}{y \cdot \left(-z\right)} \]
      19. distribute-rgt-neg-in70.5%

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{\color{blue}{-t \cdot 0.3333333333333333}}{y \cdot \left(-z\right)} \]
      20. distribute-lft-neg-in70.5%

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

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{-t}{\color{blue}{\frac{y}{\frac{0.3333333333333333}{-z}}}} \]
      23. neg-mul-170.5%

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{-t}{\frac{y}{\frac{0.3333333333333333}{\color{blue}{-1 \cdot z}}}} \]
      24. associate-/r*70.5%

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{-t}{\frac{y}{\color{blue}{\frac{\frac{0.3333333333333333}{-1}}{z}}}} \]
    6. Simplified73.0%

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

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

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

        \[\leadsto \frac{\color{blue}{y \cdot -0.3333333333333333}}{z} \]
      3. /-rgt-identity64.9%

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

        \[\leadsto \frac{\color{blue}{\frac{y}{\frac{1}{-0.3333333333333333}}}}{z} \]
      5. metadata-eval65.0%

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

        \[\leadsto \color{blue}{\frac{y}{z \cdot -3}} \]
    9. Simplified65.0%

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

    if -3.1999999999999999e36 < y < -4.1e-122

    1. Initial program 99.8%

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

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

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

    if -4.1e-122 < y < 2.2000000000000002e-11

    1. Initial program 93.8%

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

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

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

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

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{t}{y \cdot z} - 0.3333333333333333 \cdot \frac{y}{z}} \]
    5. Step-by-step derivation
      1. cancel-sign-sub-inv68.7%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{0.3333333333333333}{\color{blue}{z \cdot \frac{y}{t}}} \]
      10. metadata-eval64.9%

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{\color{blue}{\frac{-0.3333333333333333}{-1}}}{z \cdot \frac{y}{t}} \]
      11. associate-/r*64.9%

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{-0.3333333333333333}{\color{blue}{-z \cdot \frac{y}{t}}} \]
      13. distribute-lft-neg-out64.9%

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{-0.3333333333333333}{\color{blue}{\frac{\left(-z\right) \cdot y}{t}}} \]
      15. *-commutative68.6%

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \color{blue}{\frac{-0.3333333333333333 \cdot t}{y \cdot \left(-z\right)}} \]
      17. *-commutative68.7%

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

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{\color{blue}{-t \cdot 0.3333333333333333}}{y \cdot \left(-z\right)} \]
      20. distribute-lft-neg-in68.7%

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

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{-t}{\color{blue}{\frac{y}{\frac{0.3333333333333333}{-z}}}} \]
      23. neg-mul-168.6%

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{-t}{\frac{y}{\frac{0.3333333333333333}{\color{blue}{-1 \cdot z}}}} \]
      24. associate-/r*68.6%

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{-t}{\frac{y}{\color{blue}{\frac{\frac{0.3333333333333333}{-1}}{z}}}} \]
    6. Simplified64.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.2 \cdot 10^{+36}:\\ \;\;\;\;\frac{y}{z \cdot -3}\\ \mathbf{elif}\;y \leq -4.1 \cdot 10^{-122}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{-11}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z \cdot -3}\\ \end{array} \]

Alternative 3: 98.5% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.9 \cdot 10^{-105} \lor \neg \left(y \leq 2.25 \cdot 10^{-128}\right):\\
\;\;\;\;x + \left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.9e-105 or 2.25e-128 < y

    1. Initial program 98.1%

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

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

    if -3.9e-105 < y < 2.25e-128

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 98.4% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq 2.75 \cdot 10^{-129}:\\
\;\;\;\;x + \frac{\frac{t}{z}}{y \cdot 3}\\

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


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

    1. Initial program 98.6%

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

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

    if -1.70000000000000001e-103 < y < 2.75000000000000012e-129

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.75000000000000012e-129 < y

    1. Initial program 97.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{-103}:\\ \;\;\;\;x + \left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 2.75 \cdot 10^{-129}:\\ \;\;\;\;x + \frac{\frac{t}{z}}{y \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{-0.3333333333333333}{\frac{z}{y - \frac{t}{y}}}\\ \end{array} \]

Alternative 5: 97.7% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 99.8%

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

    if -4.3000000000000001e98 < t

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

Alternative 6: 97.7% accurate, 0.7× speedup?

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

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

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


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

    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. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.5000000000000002e98 < t

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

Alternative 7: 82.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+69} \lor \neg \left(z \leq 1.4 \cdot 10^{+39}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.5000000000000001e69 or 1.40000000000000001e39 < z

    1. Initial program 99.0%

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

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

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

        \[\leadsto x + \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y - \frac{t}{y}}}} \]
    4. Applied egg-rr91.2%

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{-3}} \cdot \frac{1}{\frac{z}{y}} \]
      3. clear-num78.8%

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{z} \cdot \frac{y}{-3}} \]
    7. Applied egg-rr78.9%

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

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

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

        \[\leadsto x + \frac{\frac{\color{blue}{y}}{z}}{-3} \]
      4. rem-square-sqrt39.6%

        \[\leadsto x + \frac{\frac{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}{z}}{-3} \]
      5. associate-/r*39.6%

        \[\leadsto x + \color{blue}{\frac{\sqrt{y} \cdot \sqrt{y}}{z \cdot -3}} \]
      6. rem-square-sqrt78.9%

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

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

    if -6.5000000000000001e69 < z < 1.40000000000000001e39

    1. Initial program 93.9%

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

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

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

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

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{t}{y \cdot z} - 0.3333333333333333 \cdot \frac{y}{z}} \]
    5. Step-by-step derivation
      1. cancel-sign-sub-inv85.3%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{0.3333333333333333}{\color{blue}{z \cdot \frac{y}{t}}} \]
      10. metadata-eval87.9%

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{\color{blue}{\frac{-0.3333333333333333}{-1}}}{z \cdot \frac{y}{t}} \]
      11. associate-/r*87.9%

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{-0.3333333333333333}{\color{blue}{-z \cdot \frac{y}{t}}} \]
      13. distribute-lft-neg-out87.9%

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

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

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

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

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

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{\color{blue}{-t \cdot 0.3333333333333333}}{y \cdot \left(-z\right)} \]
      20. distribute-lft-neg-in85.3%

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

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{-t}{\color{blue}{\frac{y}{\frac{0.3333333333333333}{-z}}}} \]
      23. neg-mul-185.3%

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{-t}{\frac{y}{\frac{0.3333333333333333}{\color{blue}{-1 \cdot z}}}} \]
      24. associate-/r*85.3%

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

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

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

Alternative 8: 88.1% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.6000000000000001e-55 or 2.70000000000000011e-13 < y

    1. Initial program 97.6%

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

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

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

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

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

      \[\leadsto x + \frac{-0.3333333333333333}{\color{blue}{\frac{z}{y}}} \]
    6. Step-by-step derivation
      1. div-inv89.7%

        \[\leadsto x + \color{blue}{-0.3333333333333333 \cdot \frac{1}{\frac{z}{y}}} \]
      2. metadata-eval89.7%

        \[\leadsto x + \color{blue}{\frac{1}{-3}} \cdot \frac{1}{\frac{z}{y}} \]
      3. clear-num89.8%

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{z} \cdot \frac{y}{-3}} \]
    7. Applied egg-rr89.9%

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

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

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

        \[\leadsto x + \frac{\frac{\color{blue}{y}}{z}}{-3} \]
      4. rem-square-sqrt43.7%

        \[\leadsto x + \frac{\frac{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}{z}}{-3} \]
      5. associate-/r*43.7%

        \[\leadsto x + \color{blue}{\frac{\sqrt{y} \cdot \sqrt{y}}{z \cdot -3}} \]
      6. rem-square-sqrt90.0%

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

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

    if -3.6000000000000001e-55 < y < 2.70000000000000011e-13

    1. Initial program 94.3%

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

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

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

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

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

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

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

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

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

Alternative 9: 88.2% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.7e-55 or 5.8000000000000003e-8 < y

    1. Initial program 97.6%

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

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

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

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

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

      \[\leadsto x + \frac{-0.3333333333333333}{\color{blue}{\frac{z}{y}}} \]
    6. Step-by-step derivation
      1. div-inv89.7%

        \[\leadsto x + \color{blue}{-0.3333333333333333 \cdot \frac{1}{\frac{z}{y}}} \]
      2. metadata-eval89.7%

        \[\leadsto x + \color{blue}{\frac{1}{-3}} \cdot \frac{1}{\frac{z}{y}} \]
      3. clear-num89.8%

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{z} \cdot \frac{y}{-3}} \]
    7. Applied egg-rr89.9%

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

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

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

        \[\leadsto x + \frac{\frac{\color{blue}{y}}{z}}{-3} \]
      4. rem-square-sqrt43.7%

        \[\leadsto x + \frac{\frac{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}{z}}{-3} \]
      5. associate-/r*43.7%

        \[\leadsto x + \color{blue}{\frac{\sqrt{y} \cdot \sqrt{y}}{z \cdot -3}} \]
      6. rem-square-sqrt90.0%

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

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

    if -4.7e-55 < y < 5.8000000000000003e-8

    1. Initial program 94.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 91.2% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.7e-55 or 7.4999999999999997e-8 < y

    1. Initial program 97.6%

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

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

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

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

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

      \[\leadsto x + \frac{-0.3333333333333333}{\color{blue}{\frac{z}{y}}} \]
    6. Step-by-step derivation
      1. div-inv89.7%

        \[\leadsto x + \color{blue}{-0.3333333333333333 \cdot \frac{1}{\frac{z}{y}}} \]
      2. metadata-eval89.7%

        \[\leadsto x + \color{blue}{\frac{1}{-3}} \cdot \frac{1}{\frac{z}{y}} \]
      3. clear-num89.8%

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{z} \cdot \frac{y}{-3}} \]
    7. Applied egg-rr89.9%

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

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

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

        \[\leadsto x + \frac{\frac{\color{blue}{y}}{z}}{-3} \]
      4. rem-square-sqrt43.7%

        \[\leadsto x + \frac{\frac{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}{z}}{-3} \]
      5. associate-/r*43.7%

        \[\leadsto x + \color{blue}{\frac{\sqrt{y} \cdot \sqrt{y}}{z \cdot -3}} \]
      6. rem-square-sqrt90.0%

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

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

    if -4.7e-55 < y < 7.4999999999999997e-8

    1. Initial program 94.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 75.4% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 97.8%

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

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

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

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

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

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

    if -4.1e-122 < y < 3.10000000000000004e-14

    1. Initial program 93.8%

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

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

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

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

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{t}{y \cdot z} - 0.3333333333333333 \cdot \frac{y}{z}} \]
    5. Step-by-step derivation
      1. cancel-sign-sub-inv68.7%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{0.3333333333333333}{\color{blue}{z \cdot \frac{y}{t}}} \]
      10. metadata-eval64.9%

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{\color{blue}{\frac{-0.3333333333333333}{-1}}}{z \cdot \frac{y}{t}} \]
      11. associate-/r*64.9%

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{-0.3333333333333333}{\color{blue}{-z \cdot \frac{y}{t}}} \]
      13. distribute-lft-neg-out64.9%

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{-0.3333333333333333}{\color{blue}{\frac{\left(-z\right) \cdot y}{t}}} \]
      15. *-commutative68.6%

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \color{blue}{\frac{-0.3333333333333333 \cdot t}{y \cdot \left(-z\right)}} \]
      17. *-commutative68.7%

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

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{\color{blue}{-t \cdot 0.3333333333333333}}{y \cdot \left(-z\right)} \]
      20. distribute-lft-neg-in68.7%

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

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{-t}{\color{blue}{\frac{y}{\frac{0.3333333333333333}{-z}}}} \]
      23. neg-mul-168.6%

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{-t}{\frac{y}{\frac{0.3333333333333333}{\color{blue}{-1 \cdot z}}}} \]
      24. associate-/r*68.6%

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{-t}{\frac{y}{\color{blue}{\frac{\frac{0.3333333333333333}{-1}}{z}}}} \]
    6. Simplified64.5%

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

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

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

Alternative 12: 75.5% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{-123} \lor \neg \left(y \leq 5.4 \cdot 10^{-14}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\

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


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

    1. Initial program 97.8%

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

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

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

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

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

      \[\leadsto x + \frac{-0.3333333333333333}{\color{blue}{\frac{z}{y}}} \]
    6. Step-by-step derivation
      1. div-inv88.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{\frac{\color{blue}{y}}{z}}{-3} \]
      4. rem-square-sqrt40.8%

        \[\leadsto x + \frac{\frac{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}{z}}{-3} \]
      5. associate-/r*40.7%

        \[\leadsto x + \color{blue}{\frac{\sqrt{y} \cdot \sqrt{y}}{z \cdot -3}} \]
      6. rem-square-sqrt88.7%

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

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

    if -9.19999999999999947e-123 < y < 5.3999999999999997e-14

    1. Initial program 93.8%

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

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

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

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

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{t}{y \cdot z} - 0.3333333333333333 \cdot \frac{y}{z}} \]
    5. Step-by-step derivation
      1. cancel-sign-sub-inv68.7%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{0.3333333333333333}{\color{blue}{z \cdot \frac{y}{t}}} \]
      10. metadata-eval64.9%

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{\color{blue}{\frac{-0.3333333333333333}{-1}}}{z \cdot \frac{y}{t}} \]
      11. associate-/r*64.9%

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{-0.3333333333333333}{\color{blue}{-z \cdot \frac{y}{t}}} \]
      13. distribute-lft-neg-out64.9%

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{-0.3333333333333333}{\color{blue}{\frac{\left(-z\right) \cdot y}{t}}} \]
      15. *-commutative68.6%

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \color{blue}{\frac{-0.3333333333333333 \cdot t}{y \cdot \left(-z\right)}} \]
      17. *-commutative68.7%

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

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{\color{blue}{-t \cdot 0.3333333333333333}}{y \cdot \left(-z\right)} \]
      20. distribute-lft-neg-in68.7%

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

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{-t}{\color{blue}{\frac{y}{\frac{0.3333333333333333}{-z}}}} \]
      23. neg-mul-168.6%

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{-t}{\frac{y}{\frac{0.3333333333333333}{\color{blue}{-1 \cdot z}}}} \]
      24. associate-/r*68.6%

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{-t}{\frac{y}{\color{blue}{\frac{\frac{0.3333333333333333}{-1}}{z}}}} \]
    6. Simplified64.5%

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

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

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

Alternative 13: 46.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.4 \cdot 10^{+179}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 102000:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.4e179 or 102000 < x

    1. Initial program 94.8%

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

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

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

    if -1.4e179 < x < 102000

    1. Initial program 96.8%

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

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

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

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

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

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

Alternative 14: 46.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.4 \cdot 10^{+179}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 61000000:\\
\;\;\;\;\frac{y}{z \cdot -3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.4e179 or 6.1e7 < x

    1. Initial program 94.8%

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

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

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

    if -1.4e179 < x < 6.1e7

    1. Initial program 96.8%

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

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

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

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

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{t}{y \cdot z} - 0.3333333333333333 \cdot \frac{y}{z}} \]
    5. Step-by-step derivation
      1. cancel-sign-sub-inv85.5%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{0.3333333333333333}{\color{blue}{z \cdot \frac{y}{t}}} \]
      10. metadata-eval83.5%

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{\color{blue}{\frac{-0.3333333333333333}{-1}}}{z \cdot \frac{y}{t}} \]
      11. associate-/r*83.5%

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \color{blue}{\frac{-0.3333333333333333}{-1 \cdot \left(z \cdot \frac{y}{t}\right)}} \]
      12. mul-1-neg83.5%

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{-0.3333333333333333}{\color{blue}{-z \cdot \frac{y}{t}}} \]
      13. distribute-lft-neg-out83.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{-t}{\color{blue}{\frac{y}{\frac{0.3333333333333333}{-z}}}} \]
      23. neg-mul-185.4%

        \[\leadsto \frac{-0.3333333333333333}{z} \cdot y + \frac{-t}{\frac{y}{\frac{0.3333333333333333}{\color{blue}{-1 \cdot z}}}} \]
      24. associate-/r*85.4%

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

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

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

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

        \[\leadsto \frac{\color{blue}{y \cdot -0.3333333333333333}}{z} \]
      3. /-rgt-identity43.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.4 \cdot 10^{+179}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 61000000:\\ \;\;\;\;\frac{y}{z \cdot -3}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 15: 30.5% accurate, 15.0× speedup?

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

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

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

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

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

    \[\leadsto x \]

Developer target: 95.9% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2023336 
(FPCore (x y z t)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, H"
  :precision binary64

  :herbie-target
  (+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))

  (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))