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

Percentage Accurate: 95.5% → 97.8%
Time: 17.2s
Alternatives: 22
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 22 alternatives:

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

Initial Program: 95.5% accurate, 1.0× speedup?

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

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

Alternative 1: 97.8% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.8999999999999999e-38 or 3.59999999999999975e-113 < y

    1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.8999999999999999e-38 < y < 3.59999999999999975e-113

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 97.6% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 98.4%

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

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

    if 5.00000000000000026e300 < (+.f64 (-.f64 x (/.f64 y (*.f64 z 3))) (/.f64 t (*.f64 (*.f64 z 3) y)))

    1. Initial program 79.2%

      \[\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. Recombined 2 regimes into one program.
  4. Final simplification98.7%

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

Alternative 3: 77.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ t_2 := x - \frac{y}{z} \cdot 0.3333333333333333\\ \mathbf{if}\;y \leq -3.9 \cdot 10^{-28}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -2.7 \cdot 10^{-123}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -3.5 \cdot 10^{-141}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{-118} \lor \neg \left(y \leq 2.8 \cdot 10^{-85}\right) \land y \leq 3.8 \cdot 10^{-57}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (/ t z) (/ 0.3333333333333333 y)))
        (t_2 (- x (* (/ y z) 0.3333333333333333))))
   (if (<= y -3.9e-28)
     t_2
     (if (<= y -2.7e-123)
       t_1
       (if (<= y -3.5e-141)
         x
         (if (or (<= y 1.5e-118) (and (not (<= y 2.8e-85)) (<= y 3.8e-57)))
           t_1
           t_2))))))
double code(double x, double y, double z, double t) {
	double t_1 = (t / z) * (0.3333333333333333 / y);
	double t_2 = x - ((y / z) * 0.3333333333333333);
	double tmp;
	if (y <= -3.9e-28) {
		tmp = t_2;
	} else if (y <= -2.7e-123) {
		tmp = t_1;
	} else if (y <= -3.5e-141) {
		tmp = x;
	} else if ((y <= 1.5e-118) || (!(y <= 2.8e-85) && (y <= 3.8e-57))) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (t / z) * (0.3333333333333333d0 / y)
    t_2 = x - ((y / z) * 0.3333333333333333d0)
    if (y <= (-3.9d-28)) then
        tmp = t_2
    else if (y <= (-2.7d-123)) then
        tmp = t_1
    else if (y <= (-3.5d-141)) then
        tmp = x
    else if ((y <= 1.5d-118) .or. (.not. (y <= 2.8d-85)) .and. (y <= 3.8d-57)) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (t / z) * (0.3333333333333333 / y);
	double t_2 = x - ((y / z) * 0.3333333333333333);
	double tmp;
	if (y <= -3.9e-28) {
		tmp = t_2;
	} else if (y <= -2.7e-123) {
		tmp = t_1;
	} else if (y <= -3.5e-141) {
		tmp = x;
	} else if ((y <= 1.5e-118) || (!(y <= 2.8e-85) && (y <= 3.8e-57))) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (t / z) * (0.3333333333333333 / y)
	t_2 = x - ((y / z) * 0.3333333333333333)
	tmp = 0
	if y <= -3.9e-28:
		tmp = t_2
	elif y <= -2.7e-123:
		tmp = t_1
	elif y <= -3.5e-141:
		tmp = x
	elif (y <= 1.5e-118) or (not (y <= 2.8e-85) and (y <= 3.8e-57)):
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(t / z) * Float64(0.3333333333333333 / y))
	t_2 = Float64(x - Float64(Float64(y / z) * 0.3333333333333333))
	tmp = 0.0
	if (y <= -3.9e-28)
		tmp = t_2;
	elseif (y <= -2.7e-123)
		tmp = t_1;
	elseif (y <= -3.5e-141)
		tmp = x;
	elseif ((y <= 1.5e-118) || (!(y <= 2.8e-85) && (y <= 3.8e-57)))
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (t / z) * (0.3333333333333333 / y);
	t_2 = x - ((y / z) * 0.3333333333333333);
	tmp = 0.0;
	if (y <= -3.9e-28)
		tmp = t_2;
	elseif (y <= -2.7e-123)
		tmp = t_1;
	elseif (y <= -3.5e-141)
		tmp = x;
	elseif ((y <= 1.5e-118) || (~((y <= 2.8e-85)) && (y <= 3.8e-57)))
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.9e-28], t$95$2, If[LessEqual[y, -2.7e-123], t$95$1, If[LessEqual[y, -3.5e-141], x, If[Or[LessEqual[y, 1.5e-118], And[N[Not[LessEqual[y, 2.8e-85]], $MachinePrecision], LessEqual[y, 3.8e-57]]], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -2.7 \cdot 10^{-123}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -3.5 \cdot 10^{-141}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.5 \cdot 10^{-118} \lor \neg \left(y \leq 2.8 \cdot 10^{-85}\right) \land y \leq 3.8 \cdot 10^{-57}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.89999999999999999e-28 or 1.50000000000000009e-118 < y < 2.80000000000000017e-85 or 3.7999999999999997e-57 < y

    1. Initial program 96.8%

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

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

    if -3.89999999999999999e-28 < y < -2.7000000000000001e-123 or -3.5000000000000003e-141 < y < 1.50000000000000009e-118 or 2.80000000000000017e-85 < y < 3.7999999999999997e-57

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z} + 0.3333333333333333 \cdot \frac{t}{y \cdot z}} \]
    7. Step-by-step derivation
      1. +-commutative69.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.7000000000000001e-123 < y < -3.5000000000000003e-141

    1. Initial program 91.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.9 \cdot 10^{-28}:\\ \;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\ \mathbf{elif}\;y \leq -2.7 \cdot 10^{-123}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{elif}\;y \leq -3.5 \cdot 10^{-141}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{-118} \lor \neg \left(y \leq 2.8 \cdot 10^{-85}\right) \land y \leq 3.8 \cdot 10^{-57}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\ \end{array} \]

Alternative 4: 77.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ t_2 := x - \frac{y}{z \cdot 3}\\ \mathbf{if}\;y \leq -6.5 \cdot 10^{-25}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -2.25 \cdot 10^{-123}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -3.9 \cdot 10^{-141}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{-114} \lor \neg \left(y \leq 2 \cdot 10^{-80}\right) \land y \leq 1.75 \cdot 10^{-56}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (/ t z) (/ 0.3333333333333333 y))) (t_2 (- x (/ y (* z 3.0)))))
   (if (<= y -6.5e-25)
     t_2
     (if (<= y -2.25e-123)
       t_1
       (if (<= y -3.9e-141)
         x
         (if (or (<= y 2.3e-114) (and (not (<= y 2e-80)) (<= y 1.75e-56)))
           t_1
           t_2))))))
double code(double x, double y, double z, double t) {
	double t_1 = (t / z) * (0.3333333333333333 / y);
	double t_2 = x - (y / (z * 3.0));
	double tmp;
	if (y <= -6.5e-25) {
		tmp = t_2;
	} else if (y <= -2.25e-123) {
		tmp = t_1;
	} else if (y <= -3.9e-141) {
		tmp = x;
	} else if ((y <= 2.3e-114) || (!(y <= 2e-80) && (y <= 1.75e-56))) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (t / z) * (0.3333333333333333d0 / y)
    t_2 = x - (y / (z * 3.0d0))
    if (y <= (-6.5d-25)) then
        tmp = t_2
    else if (y <= (-2.25d-123)) then
        tmp = t_1
    else if (y <= (-3.9d-141)) then
        tmp = x
    else if ((y <= 2.3d-114) .or. (.not. (y <= 2d-80)) .and. (y <= 1.75d-56)) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (t / z) * (0.3333333333333333 / y);
	double t_2 = x - (y / (z * 3.0));
	double tmp;
	if (y <= -6.5e-25) {
		tmp = t_2;
	} else if (y <= -2.25e-123) {
		tmp = t_1;
	} else if (y <= -3.9e-141) {
		tmp = x;
	} else if ((y <= 2.3e-114) || (!(y <= 2e-80) && (y <= 1.75e-56))) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (t / z) * (0.3333333333333333 / y)
	t_2 = x - (y / (z * 3.0))
	tmp = 0
	if y <= -6.5e-25:
		tmp = t_2
	elif y <= -2.25e-123:
		tmp = t_1
	elif y <= -3.9e-141:
		tmp = x
	elif (y <= 2.3e-114) or (not (y <= 2e-80) and (y <= 1.75e-56)):
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(t / z) * Float64(0.3333333333333333 / y))
	t_2 = Float64(x - Float64(y / Float64(z * 3.0)))
	tmp = 0.0
	if (y <= -6.5e-25)
		tmp = t_2;
	elseif (y <= -2.25e-123)
		tmp = t_1;
	elseif (y <= -3.9e-141)
		tmp = x;
	elseif ((y <= 2.3e-114) || (!(y <= 2e-80) && (y <= 1.75e-56)))
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (t / z) * (0.3333333333333333 / y);
	t_2 = x - (y / (z * 3.0));
	tmp = 0.0;
	if (y <= -6.5e-25)
		tmp = t_2;
	elseif (y <= -2.25e-123)
		tmp = t_1;
	elseif (y <= -3.9e-141)
		tmp = x;
	elseif ((y <= 2.3e-114) || (~((y <= 2e-80)) && (y <= 1.75e-56)))
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.5e-25], t$95$2, If[LessEqual[y, -2.25e-123], t$95$1, If[LessEqual[y, -3.9e-141], x, If[Or[LessEqual[y, 2.3e-114], And[N[Not[LessEqual[y, 2e-80]], $MachinePrecision], LessEqual[y, 1.75e-56]]], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -2.25 \cdot 10^{-123}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -3.9 \cdot 10^{-141}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 2.3 \cdot 10^{-114} \lor \neg \left(y \leq 2 \cdot 10^{-80}\right) \land y \leq 1.75 \cdot 10^{-56}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.5e-25 or 2.2999999999999999e-114 < y < 1.99999999999999992e-80 or 1.7499999999999999e-56 < y

    1. Initial program 96.8%

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

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333 \cdot y}{z}} \]
    4. Applied egg-rr88.9%

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

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

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{\frac{1}{z} \cdot \frac{y}{3}} \]
    7. Step-by-step derivation
      1. frac-times88.9%

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

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

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

    if -6.5e-25 < y < -2.24999999999999997e-123 or -3.8999999999999997e-141 < y < 2.2999999999999999e-114 or 1.99999999999999992e-80 < y < 1.7499999999999999e-56

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z} + 0.3333333333333333 \cdot \frac{t}{y \cdot z}} \]
    7. Step-by-step derivation
      1. +-commutative69.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.24999999999999997e-123 < y < -3.8999999999999997e-141

    1. Initial program 91.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.5 \cdot 10^{-25}:\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \mathbf{elif}\;y \leq -2.25 \cdot 10^{-123}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{elif}\;y \leq -3.9 \cdot 10^{-141}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{-114} \lor \neg \left(y \leq 2 \cdot 10^{-80}\right) \land y \leq 1.75 \cdot 10^{-56}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \end{array} \]

Alternative 5: 78.0% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq -2.25 \cdot 10^{-123}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -3.9 \cdot 10^{-141}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 3.7 \cdot 10^{-113}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 1.26 \cdot 10^{-93} \lor \neg \left(y \leq 9.8 \cdot 10^{-57}\right):\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.9000000000000003e-28 or 3.6999999999999998e-113 < y < 1.2600000000000001e-93 or 9.79999999999999976e-57 < y

    1. Initial program 97.0%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{\frac{z}{y}}} \]
      2. div-inv89.4%

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{\frac{1}{z} \cdot \frac{y}{3}} \]
    7. Step-by-step derivation
      1. frac-times89.5%

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

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

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

    if -4.9000000000000003e-28 < y < -2.24999999999999997e-123 or -3.8999999999999997e-141 < y < 3.6999999999999998e-113

    1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{y} \cdot \frac{t}{z}} \]
    11. Applied egg-rr73.6%

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

    if -2.24999999999999997e-123 < y < -3.8999999999999997e-141

    1. Initial program 91.0%

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

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

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

    if 1.2600000000000001e-93 < y < 9.79999999999999976e-57

    1. Initial program 96.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{0.3333333333333333}{\color{blue}{\frac{y}{t} \cdot z}} \]
    11. Applied egg-rr80.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.9 \cdot 10^{-28}:\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \mathbf{elif}\;y \leq -2.25 \cdot 10^{-123}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{elif}\;y \leq -3.9 \cdot 10^{-141}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{-113}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{elif}\;y \leq 1.26 \cdot 10^{-93} \lor \neg \left(y \leq 9.8 \cdot 10^{-57}\right):\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.3333333333333333}{z \cdot \frac{y}{t}}\\ \end{array} \]

Alternative 6: 77.8% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;y \leq -3.8 \cdot 10^{-141}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;y \leq 1.8 \cdot 10^{-92} \lor \neg \left(y \leq 1.35 \cdot 10^{-56}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -7.79999999999999944e-27 or 9.5000000000000002e-119 < y < 1.80000000000000008e-92 or 1.34999999999999997e-56 < y

    1. Initial program 97.0%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{\frac{z}{y}}} \]
      2. div-inv89.4%

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{\frac{1}{z} \cdot \frac{y}{3}} \]
    7. Step-by-step derivation
      1. frac-times89.5%

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

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

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

    if -7.79999999999999944e-27 < y < -3.29999999999999967e-120

    1. Initial program 94.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{0.3333333333333333}{\color{blue}{\frac{y}{\frac{t}{z}}}} \]
    11. Simplified75.1%

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

    if -3.29999999999999967e-120 < y < -3.79999999999999987e-141

    1. Initial program 91.0%

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

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

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

    if -3.79999999999999987e-141 < y < 9.5000000000000002e-119

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z} + 0.3333333333333333 \cdot \frac{t}{y \cdot z}} \]
    7. Step-by-step derivation
      1. +-commutative67.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.80000000000000008e-92 < y < 1.34999999999999997e-56

    1. Initial program 96.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{0.3333333333333333}{\color{blue}{\frac{y}{t} \cdot z}} \]
    11. Applied egg-rr80.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.8 \cdot 10^{-27}:\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \mathbf{elif}\;y \leq -3.3 \cdot 10^{-120}:\\ \;\;\;\;\frac{0.3333333333333333}{\frac{y}{\frac{t}{z}}}\\ \mathbf{elif}\;y \leq -3.8 \cdot 10^{-141}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-119}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-92} \lor \neg \left(y \leq 1.35 \cdot 10^{-56}\right):\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.3333333333333333}{z \cdot \frac{y}{t}}\\ \end{array} \]

Alternative 7: 97.9% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.69999999999999992e-86 < t

    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.3%

        \[\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.3%

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

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

Alternative 8: 97.8% accurate, 0.8× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.44999999999999999e-140 < t

    1. Initial program 97.5%

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

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

Alternative 9: 63.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{if}\;y \leq -38000:\\
\;\;\;\;\frac{-0.3333333333333333 \cdot y}{z}\\

\mathbf{elif}\;y \leq -2.7 \cdot 10^{-123}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -6.3 \cdot 10^{-142}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 8.2 \cdot 10^{+46}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -38000 < y < -2.7000000000000001e-123 or -6.2999999999999998e-142 < y < 8.19999999999999999e46

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.7000000000000001e-123 < y < -6.2999999999999998e-142

    1. Initial program 91.0%

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

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

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

    if 8.19999999999999999e46 < y

    1. Initial program 97.3%

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{0.3333333333333333}{z}} \]
      6. distribute-rgt-neg-in82.1%

        \[\leadsto \color{blue}{y \cdot \left(-\frac{0.3333333333333333}{z}\right)} \]
      7. distribute-neg-frac82.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{\frac{-z}{y}}} \]
      5. clear-num82.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{-z}{y}}{0.3333333333333333}}} \]
      6. associate-/r/82.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{-z}{y}} \cdot 0.3333333333333333} \]
      7. associate-/r/82.2%

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

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

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

        \[\leadsto \left(\left(-\frac{\color{blue}{-1}}{-z}\right) \cdot y\right) \cdot 0.3333333333333333 \]
      11. frac-2neg82.2%

        \[\leadsto \left(\left(-\color{blue}{\frac{1}{z}}\right) \cdot y\right) \cdot 0.3333333333333333 \]
      12. associate-*r*82.1%

        \[\leadsto \color{blue}{\left(-\frac{1}{z}\right) \cdot \left(y \cdot 0.3333333333333333\right)} \]
      13. metadata-eval82.1%

        \[\leadsto \left(-\frac{1}{z}\right) \cdot \left(y \cdot \color{blue}{\frac{1}{3}}\right) \]
      14. div-inv82.3%

        \[\leadsto \left(-\frac{1}{z}\right) \cdot \color{blue}{\frac{y}{3}} \]
      15. distribute-lft-neg-in82.3%

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

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

        \[\leadsto -\frac{\color{blue}{y}}{z \cdot 3} \]
      18. distribute-neg-frac82.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -38000:\\ \;\;\;\;\frac{-0.3333333333333333 \cdot y}{z}\\ \mathbf{elif}\;y \leq -2.7 \cdot 10^{-123}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{elif}\;y \leq -6.3 \cdot 10^{-142}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{+46}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{-y}{z \cdot 3}\\ \end{array} \]

Alternative 10: 97.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.62 \cdot 10^{-31} \lor \neg \left(y \leq 7 \cdot 10^{-113}\right):\\
\;\;\;\;x + \frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.62e-31 or 7.00000000000000057e-113 < y

    1. Initial program 97.0%

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

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

    if -1.62e-31 < y < 7.00000000000000057e-113

    1. Initial program 92.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 97.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.62 \cdot 10^{-31} \lor \neg \left(y \leq 8.8 \cdot 10^{-119}\right):\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.62e-31 or 8.8000000000000002e-119 < y

    1. Initial program 97.0%

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

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

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

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

    if -1.62e-31 < y < 8.8000000000000002e-119

    1. Initial program 92.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 89.6% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2600000:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\

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

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


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

    1. Initial program 99.7%

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

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

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

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

    if -2.6e6 < y < 4.39999999999999973e28

    1. Initial program 92.4%

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

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

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

    if 4.39999999999999973e28 < y

    1. Initial program 97.5%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{\frac{z}{y}}} \]
      2. div-inv97.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 89.6% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2050000:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\

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

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


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

    1. Initial program 99.7%

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

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

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

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

    if -2.05e6 < y < 4.2000000000000003e29

    1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

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

    if 4.2000000000000003e29 < y

    1. Initial program 97.5%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{\frac{z}{y}}} \]
      2. div-inv97.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 92.4% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -550000:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\

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

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


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

    1. Initial program 99.7%

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

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

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

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

    if -5.5e5 < y < 2.1e30

    1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

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

    if 2.1e30 < y

    1. Initial program 97.5%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{\frac{z}{y}}} \]
      2. div-inv97.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 92.2% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -105000:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\

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

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


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

    1. Initial program 99.7%

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

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

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

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

    if -105000 < y < 3.8000000000000001e34

    1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

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

    if 3.8000000000000001e34 < y

    1. Initial program 97.5%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{\frac{z}{y}}} \]
      2. div-inv97.5%

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

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

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

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

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

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

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

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

Alternative 16: 92.3% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -16500000:\\
\;\;\;\;x - \frac{1}{3 \cdot \frac{z}{y}}\\

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

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


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

    1. Initial program 99.7%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{1}{\frac{z}{0.3333333333333333 \cdot y}}} \]
      2. inv-pow97.9%

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{1}{3 \cdot \frac{z}{y}}} \]
      2. *-commutative98.2%

        \[\leadsto x - \frac{1}{\color{blue}{\frac{z}{y} \cdot 3}} \]
    8. Simplified98.2%

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

    if -1.65e7 < y < 4.2000000000000001e33

    1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

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

    if 4.2000000000000001e33 < y

    1. Initial program 97.5%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{\frac{z}{y}}} \]
      2. div-inv97.5%

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

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

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

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

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

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

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

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

Alternative 17: 47.8% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -14000000:\\
\;\;\;\;\frac{-0.3333333333333333 \cdot y}{z}\\

\mathbf{elif}\;y \leq 2.4 \cdot 10^{+57}:\\
\;\;\;\;x\\

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.4e7 < y < 2.40000000000000005e57

    1. Initial program 92.5%

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

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

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

    if 2.40000000000000005e57 < y

    1. Initial program 97.3%

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{0.3333333333333333}{z}} \]
      6. distribute-rgt-neg-in82.1%

        \[\leadsto \color{blue}{y \cdot \left(-\frac{0.3333333333333333}{z}\right)} \]
      7. distribute-neg-frac82.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{\frac{-z}{y}}} \]
      5. clear-num82.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{-z}{y}}{0.3333333333333333}}} \]
      6. associate-/r/82.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{-z}{y}} \cdot 0.3333333333333333} \]
      7. associate-/r/82.2%

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

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

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

        \[\leadsto \left(\left(-\frac{\color{blue}{-1}}{-z}\right) \cdot y\right) \cdot 0.3333333333333333 \]
      11. frac-2neg82.2%

        \[\leadsto \left(\left(-\color{blue}{\frac{1}{z}}\right) \cdot y\right) \cdot 0.3333333333333333 \]
      12. associate-*r*82.1%

        \[\leadsto \color{blue}{\left(-\frac{1}{z}\right) \cdot \left(y \cdot 0.3333333333333333\right)} \]
      13. metadata-eval82.1%

        \[\leadsto \left(-\frac{1}{z}\right) \cdot \left(y \cdot \color{blue}{\frac{1}{3}}\right) \]
      14. div-inv82.3%

        \[\leadsto \left(-\frac{1}{z}\right) \cdot \color{blue}{\frac{y}{3}} \]
      15. distribute-lft-neg-in82.3%

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

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

        \[\leadsto -\frac{\color{blue}{y}}{z \cdot 3} \]
      18. distribute-neg-frac82.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -14000000:\\ \;\;\;\;\frac{-0.3333333333333333 \cdot y}{z}\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{+57}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{-y}{z \cdot 3}\\ \end{array} \]

Alternative 18: 47.7% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2600000 \lor \neg \left(y \leq 6.2 \cdot 10^{+54}\right):\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.6e6 or 6.1999999999999999e54 < y

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6e6 < y < 6.1999999999999999e54

    1. Initial program 92.5%

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

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

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

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

Alternative 19: 47.7% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -20500000:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\

\mathbf{elif}\;y \leq 4 \cdot 10^{+55}:\\
\;\;\;\;x\\

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{0.3333333333333333}{z}} \]
      6. distribute-rgt-neg-in70.8%

        \[\leadsto \color{blue}{y \cdot \left(-\frac{0.3333333333333333}{z}\right)} \]
      7. distribute-neg-frac70.8%

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

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

      \[\leadsto \color{blue}{y \cdot \frac{-0.3333333333333333}{z}} \]

    if -2.05e7 < y < 4.00000000000000004e55

    1. Initial program 92.5%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Simplified90.1%

      \[\leadsto \color{blue}{x + \frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)} \]
    3. Taylor expanded in x around inf 35.7%

      \[\leadsto \color{blue}{x} \]

    if 4.00000000000000004e55 < 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. sub-neg97.3%

        \[\leadsto \color{blue}{\left(x + \left(-\frac{y}{z \cdot 3}\right)\right)} + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      2. distribute-frac-neg97.3%

        \[\leadsto \left(x + \color{blue}{\frac{-y}{z \cdot 3}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      3. neg-mul-197.3%

        \[\leadsto \left(x + \frac{\color{blue}{-1 \cdot y}}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      4. *-commutative97.3%

        \[\leadsto \left(x + \frac{-1 \cdot y}{\color{blue}{3 \cdot z}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      5. times-frac97.2%

        \[\leadsto \left(x + \color{blue}{\frac{-1}{3} \cdot \frac{y}{z}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      6. metadata-eval97.2%

        \[\leadsto \left(x + \color{blue}{-0.3333333333333333} \cdot \frac{y}{z}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      7. associate-/l/97.2%

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \color{blue}{\frac{\frac{t}{y}}{z \cdot 3}} \]
      8. associate-/l/97.2%

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \color{blue}{\frac{\frac{\frac{t}{y}}{3}}{z}} \]
    3. Simplified97.2%

      \[\leadsto \color{blue}{\left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \frac{\frac{\frac{t}{y}}{3}}{z}} \]
    4. Step-by-step derivation
      1. associate-/l/97.2%

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \color{blue}{\frac{\frac{t}{y}}{z \cdot 3}} \]
      2. *-un-lft-identity97.2%

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \frac{\color{blue}{1 \cdot \frac{t}{y}}}{z \cdot 3} \]
      3. times-frac97.2%

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \color{blue}{\frac{1}{z} \cdot \frac{\frac{t}{y}}{3}} \]
      4. associate-/l/97.2%

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \frac{1}{z} \cdot \color{blue}{\frac{t}{3 \cdot y}} \]
      5. times-frac97.1%

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \color{blue}{\frac{1 \cdot t}{z \cdot \left(3 \cdot y\right)}} \]
      6. associate-*l*97.2%

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \frac{1 \cdot t}{\color{blue}{\left(z \cdot 3\right) \cdot y}} \]
      7. *-commutative97.2%

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \frac{1 \cdot t}{\color{blue}{y \cdot \left(z \cdot 3\right)}} \]
      8. times-frac92.3%

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \color{blue}{\frac{1}{y} \cdot \frac{t}{z \cdot 3}} \]
      9. *-un-lft-identity92.3%

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \frac{1}{y} \cdot \frac{\color{blue}{1 \cdot t}}{z \cdot 3} \]
      10. *-commutative92.3%

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \frac{1}{y} \cdot \frac{1 \cdot t}{\color{blue}{3 \cdot z}} \]
      11. times-frac92.3%

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \frac{1}{y} \cdot \color{blue}{\left(\frac{1}{3} \cdot \frac{t}{z}\right)} \]
      12. metadata-eval92.3%

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \frac{1}{y} \cdot \left(\color{blue}{0.3333333333333333} \cdot \frac{t}{z}\right) \]
    5. Applied egg-rr92.3%

      \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \color{blue}{\frac{1}{y} \cdot \left(0.3333333333333333 \cdot \frac{t}{z}\right)} \]
    6. Taylor expanded in y around inf 82.1%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification51.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -20500000:\\ \;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 4 \cdot 10^{+55}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\ \end{array} \]

Alternative 20: 47.7% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -20500000:\\ \;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{+52}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -20500000.0)
   (* y (/ -0.3333333333333333 z))
   (if (<= y 2.1e+52) x (/ -0.3333333333333333 (/ z y)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -20500000.0) {
		tmp = y * (-0.3333333333333333 / z);
	} else if (y <= 2.1e+52) {
		tmp = x;
	} else {
		tmp = -0.3333333333333333 / (z / y);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (y <= (-20500000.0d0)) then
        tmp = y * ((-0.3333333333333333d0) / z)
    else if (y <= 2.1d+52) then
        tmp = x
    else
        tmp = (-0.3333333333333333d0) / (z / y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -20500000.0) {
		tmp = y * (-0.3333333333333333 / z);
	} else if (y <= 2.1e+52) {
		tmp = x;
	} else {
		tmp = -0.3333333333333333 / (z / y);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -20500000.0:
		tmp = y * (-0.3333333333333333 / z)
	elif y <= 2.1e+52:
		tmp = x
	else:
		tmp = -0.3333333333333333 / (z / y)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -20500000.0)
		tmp = Float64(y * Float64(-0.3333333333333333 / z));
	elseif (y <= 2.1e+52)
		tmp = x;
	else
		tmp = Float64(-0.3333333333333333 / Float64(z / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -20500000.0)
		tmp = y * (-0.3333333333333333 / z);
	elseif (y <= 2.1e+52)
		tmp = x;
	else
		tmp = -0.3333333333333333 / (z / y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, -20500000.0], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+52], x, N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -20500000:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\

\mathbf{elif}\;y \leq 2.1 \cdot 10^{+52}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.05e7

    1. Initial program 99.7%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Taylor expanded in z around 0 99.7%

      \[\leadsto \left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\color{blue}{3 \cdot \left(y \cdot z\right)}} \]
    3. Taylor expanded in y around inf 70.8%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    4. Step-by-step derivation
      1. metadata-eval70.8%

        \[\leadsto \color{blue}{\left(-0.3333333333333333\right)} \cdot \frac{y}{z} \]
      2. distribute-lft-neg-in70.8%

        \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
      3. *-commutative70.8%

        \[\leadsto -\color{blue}{\frac{y}{z} \cdot 0.3333333333333333} \]
      4. associate-*l/70.9%

        \[\leadsto -\color{blue}{\frac{y \cdot 0.3333333333333333}{z}} \]
      5. associate-*r/70.8%

        \[\leadsto -\color{blue}{y \cdot \frac{0.3333333333333333}{z}} \]
      6. distribute-rgt-neg-in70.8%

        \[\leadsto \color{blue}{y \cdot \left(-\frac{0.3333333333333333}{z}\right)} \]
      7. distribute-neg-frac70.8%

        \[\leadsto y \cdot \color{blue}{\frac{-0.3333333333333333}{z}} \]
      8. metadata-eval70.8%

        \[\leadsto y \cdot \frac{\color{blue}{-0.3333333333333333}}{z} \]
    5. Simplified70.8%

      \[\leadsto \color{blue}{y \cdot \frac{-0.3333333333333333}{z}} \]

    if -2.05e7 < y < 2.1e52

    1. Initial program 92.5%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Simplified90.1%

      \[\leadsto \color{blue}{x + \frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)} \]
    3. Taylor expanded in x around inf 35.7%

      \[\leadsto \color{blue}{x} \]

    if 2.1e52 < y

    1. Initial program 97.3%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Taylor expanded in z around 0 97.3%

      \[\leadsto \left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\color{blue}{3 \cdot \left(y \cdot z\right)}} \]
    3. Taylor expanded in y around inf 82.1%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    4. Step-by-step derivation
      1. metadata-eval82.1%

        \[\leadsto \color{blue}{\left(-0.3333333333333333\right)} \cdot \frac{y}{z} \]
      2. distribute-lft-neg-in82.1%

        \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
      3. *-commutative82.1%

        \[\leadsto -\color{blue}{\frac{y}{z} \cdot 0.3333333333333333} \]
      4. associate-*l/82.1%

        \[\leadsto -\color{blue}{\frac{y \cdot 0.3333333333333333}{z}} \]
      5. associate-*r/82.1%

        \[\leadsto -\color{blue}{y \cdot \frac{0.3333333333333333}{z}} \]
      6. distribute-rgt-neg-in82.1%

        \[\leadsto \color{blue}{y \cdot \left(-\frac{0.3333333333333333}{z}\right)} \]
      7. distribute-neg-frac82.1%

        \[\leadsto y \cdot \color{blue}{\frac{-0.3333333333333333}{z}} \]
      8. metadata-eval82.1%

        \[\leadsto y \cdot \frac{\color{blue}{-0.3333333333333333}}{z} \]
    5. Simplified82.1%

      \[\leadsto \color{blue}{y \cdot \frac{-0.3333333333333333}{z}} \]
    6. Step-by-step derivation
      1. *-commutative82.1%

        \[\leadsto \color{blue}{\frac{-0.3333333333333333}{z} \cdot y} \]
      2. frac-2neg82.1%

        \[\leadsto \color{blue}{\frac{--0.3333333333333333}{-z}} \cdot y \]
      3. metadata-eval82.1%

        \[\leadsto \frac{\color{blue}{0.3333333333333333}}{-z} \cdot y \]
      4. associate-/r/82.2%

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{\frac{-z}{y}}} \]
      5. frac-2neg82.2%

        \[\leadsto \color{blue}{\frac{-0.3333333333333333}{-\frac{-z}{y}}} \]
      6. metadata-eval82.2%

        \[\leadsto \frac{\color{blue}{-0.3333333333333333}}{-\frac{-z}{y}} \]
      7. distribute-frac-neg82.2%

        \[\leadsto \frac{-0.3333333333333333}{-\color{blue}{\left(-\frac{z}{y}\right)}} \]
      8. remove-double-neg82.2%

        \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\frac{z}{y}}} \]
    7. Applied egg-rr82.2%

      \[\leadsto \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification51.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -20500000:\\ \;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{+52}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\ \end{array} \]

Alternative 21: 47.7% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -19000000:\\ \;\;\;\;\frac{-0.3333333333333333 \cdot y}{z}\\ \mathbf{elif}\;y \leq 1.78 \cdot 10^{+50}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -19000000.0)
   (/ (* -0.3333333333333333 y) z)
   (if (<= y 1.78e+50) x (/ -0.3333333333333333 (/ z y)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -19000000.0) {
		tmp = (-0.3333333333333333 * y) / z;
	} else if (y <= 1.78e+50) {
		tmp = x;
	} else {
		tmp = -0.3333333333333333 / (z / y);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (y <= (-19000000.0d0)) then
        tmp = ((-0.3333333333333333d0) * y) / z
    else if (y <= 1.78d+50) then
        tmp = x
    else
        tmp = (-0.3333333333333333d0) / (z / y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -19000000.0) {
		tmp = (-0.3333333333333333 * y) / z;
	} else if (y <= 1.78e+50) {
		tmp = x;
	} else {
		tmp = -0.3333333333333333 / (z / y);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -19000000.0:
		tmp = (-0.3333333333333333 * y) / z
	elif y <= 1.78e+50:
		tmp = x
	else:
		tmp = -0.3333333333333333 / (z / y)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -19000000.0)
		tmp = Float64(Float64(-0.3333333333333333 * y) / z);
	elseif (y <= 1.78e+50)
		tmp = x;
	else
		tmp = Float64(-0.3333333333333333 / Float64(z / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -19000000.0)
		tmp = (-0.3333333333333333 * y) / z;
	elseif (y <= 1.78e+50)
		tmp = x;
	else
		tmp = -0.3333333333333333 / (z / y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, -19000000.0], N[(N[(-0.3333333333333333 * y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 1.78e+50], x, N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -19000000:\\
\;\;\;\;\frac{-0.3333333333333333 \cdot y}{z}\\

\mathbf{elif}\;y \leq 1.78 \cdot 10^{+50}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.9e7

    1. Initial program 99.7%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Step-by-step derivation
      1. sub-neg99.7%

        \[\leadsto \color{blue}{\left(x + \left(-\frac{y}{z \cdot 3}\right)\right)} + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      2. distribute-frac-neg99.7%

        \[\leadsto \left(x + \color{blue}{\frac{-y}{z \cdot 3}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      3. neg-mul-199.7%

        \[\leadsto \left(x + \frac{\color{blue}{-1 \cdot y}}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      4. *-commutative99.7%

        \[\leadsto \left(x + \frac{-1 \cdot y}{\color{blue}{3 \cdot z}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      5. times-frac99.7%

        \[\leadsto \left(x + \color{blue}{\frac{-1}{3} \cdot \frac{y}{z}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      6. metadata-eval99.7%

        \[\leadsto \left(x + \color{blue}{-0.3333333333333333} \cdot \frac{y}{z}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      7. associate-/l/99.7%

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \color{blue}{\frac{\frac{t}{y}}{z \cdot 3}} \]
      8. associate-/l/99.7%

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \color{blue}{\frac{\frac{\frac{t}{y}}{3}}{z}} \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \frac{\frac{\frac{t}{y}}{3}}{z}} \]
    4. Step-by-step derivation
      1. associate-/l/99.7%

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \color{blue}{\frac{\frac{t}{y}}{z \cdot 3}} \]
      2. *-un-lft-identity99.7%

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \frac{\color{blue}{1 \cdot \frac{t}{y}}}{z \cdot 3} \]
      3. times-frac99.7%

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \color{blue}{\frac{1}{z} \cdot \frac{\frac{t}{y}}{3}} \]
      4. associate-/l/99.7%

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \frac{1}{z} \cdot \color{blue}{\frac{t}{3 \cdot y}} \]
      5. times-frac99.7%

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \color{blue}{\frac{1 \cdot t}{z \cdot \left(3 \cdot y\right)}} \]
      6. associate-*l*99.7%

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \frac{1 \cdot t}{\color{blue}{\left(z \cdot 3\right) \cdot y}} \]
      7. *-commutative99.7%

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \frac{1 \cdot t}{\color{blue}{y \cdot \left(z \cdot 3\right)}} \]
      8. times-frac93.4%

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \color{blue}{\frac{1}{y} \cdot \frac{t}{z \cdot 3}} \]
      9. *-un-lft-identity93.4%

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \frac{1}{y} \cdot \frac{\color{blue}{1 \cdot t}}{z \cdot 3} \]
      10. *-commutative93.4%

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \frac{1}{y} \cdot \frac{1 \cdot t}{\color{blue}{3 \cdot z}} \]
      11. times-frac93.4%

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \frac{1}{y} \cdot \color{blue}{\left(\frac{1}{3} \cdot \frac{t}{z}\right)} \]
      12. metadata-eval93.4%

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \frac{1}{y} \cdot \left(\color{blue}{0.3333333333333333} \cdot \frac{t}{z}\right) \]
    5. Applied egg-rr93.4%

      \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \color{blue}{\frac{1}{y} \cdot \left(0.3333333333333333 \cdot \frac{t}{z}\right)} \]
    6. Taylor expanded in y around inf 70.8%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    7. Step-by-step derivation
      1. associate-*r/70.9%

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot y}{z}} \]
      2. *-commutative70.9%

        \[\leadsto \frac{\color{blue}{y \cdot -0.3333333333333333}}{z} \]
    8. Simplified70.9%

      \[\leadsto \color{blue}{\frac{y \cdot -0.3333333333333333}{z}} \]

    if -1.9e7 < y < 1.78e50

    1. Initial program 92.5%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Simplified90.1%

      \[\leadsto \color{blue}{x + \frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)} \]
    3. Taylor expanded in x around inf 35.7%

      \[\leadsto \color{blue}{x} \]

    if 1.78e50 < y

    1. Initial program 97.3%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Taylor expanded in z around 0 97.3%

      \[\leadsto \left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\color{blue}{3 \cdot \left(y \cdot z\right)}} \]
    3. Taylor expanded in y around inf 82.1%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    4. Step-by-step derivation
      1. metadata-eval82.1%

        \[\leadsto \color{blue}{\left(-0.3333333333333333\right)} \cdot \frac{y}{z} \]
      2. distribute-lft-neg-in82.1%

        \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
      3. *-commutative82.1%

        \[\leadsto -\color{blue}{\frac{y}{z} \cdot 0.3333333333333333} \]
      4. associate-*l/82.1%

        \[\leadsto -\color{blue}{\frac{y \cdot 0.3333333333333333}{z}} \]
      5. associate-*r/82.1%

        \[\leadsto -\color{blue}{y \cdot \frac{0.3333333333333333}{z}} \]
      6. distribute-rgt-neg-in82.1%

        \[\leadsto \color{blue}{y \cdot \left(-\frac{0.3333333333333333}{z}\right)} \]
      7. distribute-neg-frac82.1%

        \[\leadsto y \cdot \color{blue}{\frac{-0.3333333333333333}{z}} \]
      8. metadata-eval82.1%

        \[\leadsto y \cdot \frac{\color{blue}{-0.3333333333333333}}{z} \]
    5. Simplified82.1%

      \[\leadsto \color{blue}{y \cdot \frac{-0.3333333333333333}{z}} \]
    6. Step-by-step derivation
      1. *-commutative82.1%

        \[\leadsto \color{blue}{\frac{-0.3333333333333333}{z} \cdot y} \]
      2. frac-2neg82.1%

        \[\leadsto \color{blue}{\frac{--0.3333333333333333}{-z}} \cdot y \]
      3. metadata-eval82.1%

        \[\leadsto \frac{\color{blue}{0.3333333333333333}}{-z} \cdot y \]
      4. associate-/r/82.2%

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{\frac{-z}{y}}} \]
      5. frac-2neg82.2%

        \[\leadsto \color{blue}{\frac{-0.3333333333333333}{-\frac{-z}{y}}} \]
      6. metadata-eval82.2%

        \[\leadsto \frac{\color{blue}{-0.3333333333333333}}{-\frac{-z}{y}} \]
      7. distribute-frac-neg82.2%

        \[\leadsto \frac{-0.3333333333333333}{-\color{blue}{\left(-\frac{z}{y}\right)}} \]
      8. remove-double-neg82.2%

        \[\leadsto \frac{-0.3333333333333333}{\color{blue}{\frac{z}{y}}} \]
    7. Applied egg-rr82.2%

      \[\leadsto \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification51.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -19000000:\\ \;\;\;\;\frac{-0.3333333333333333 \cdot y}{z}\\ \mathbf{elif}\;y \leq 1.78 \cdot 10^{+50}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\ \end{array} \]

Alternative 22: 30.4% accurate, 15.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
	return x;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x
end function
public static double code(double x, double y, double z, double t) {
	return x;
}
def code(x, y, z, t):
	return x
function code(x, y, z, t)
	return x
end
function tmp = code(x, y, z, t)
	tmp = x;
end
code[x_, y_, z_, t_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 95.0%

    \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
  2. Simplified93.9%

    \[\leadsto \color{blue}{x + \frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)} \]
  3. Taylor expanded in x around inf 30.9%

    \[\leadsto \color{blue}{x} \]
  4. Final simplification30.9%

    \[\leadsto x \]

Developer target: 96.1% 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 2023275 
(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))))