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

Percentage Accurate: 95.9% → 98.1%
Time: 13.7s
Alternatives: 21
Speedup: 0.9×

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 21 alternatives:

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

Initial Program: 95.9% accurate, 1.0× speedup?

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

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

Alternative 1: 98.1% accurate, 0.8× speedup?

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

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


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

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.59999999999999991e-66 < t

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 88.6% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -9.5 \cdot 10^{+42}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -3.2 \cdot 10^{-12}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\

\mathbf{elif}\;y \leq 4.6 \cdot 10^{-204}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 8.5 \cdot 10^{-66}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 1.3 \cdot 10^{-41}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -3.3999999999999999e74

    1. Initial program 97.7%

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

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

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

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

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

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

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

    if -3.3999999999999999e74 < y < -9.50000000000000019e42 or 4.5999999999999998e-204 < y < 8.49999999999999966e-66

    1. Initial program 84.5%

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

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

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

    if -9.50000000000000019e42 < y < -3.2000000000000001e-12

    1. Initial program 99.9%

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

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

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

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

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

    if -3.2000000000000001e-12 < y < 4.5999999999999998e-204 or 8.49999999999999966e-66 < y < 1.3e-41

    1. Initial program 94.9%

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

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

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

    if 1.3e-41 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.4 \cdot 10^{+74}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq -9.5 \cdot 10^{+42}:\\ \;\;\;\;x + \frac{0.3333333333333333}{z} \cdot \frac{t}{y}\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-12}:\\ \;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{-204}:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-66}:\\ \;\;\;\;x + \frac{0.3333333333333333}{z} \cdot \frac{t}{y}\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{-41}:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \end{array} \]

Alternative 3: 90.5% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq -4.1 \cdot 10^{+43}:\\
\;\;\;\;x + \frac{0.3333333333333333}{z} \cdot \frac{t}{y}\\

\mathbf{elif}\;y \leq -3.15 \cdot 10^{+32}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 1.3 \cdot 10^{-41}:\\
\;\;\;\;x + \frac{0.3333333333333333}{y \cdot \frac{z}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -3.3999999999999999e74 or -4.1e43 < y < -3.1500000000000001e32

    1. Initial program 97.9%

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

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

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

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

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

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

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

    if -3.3999999999999999e74 < y < -4.1e43

    1. Initial program 90.4%

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

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

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

    if -3.1500000000000001e32 < y < -5.4999999999999998e-37

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.4999999999999998e-37 < y < 1.3e-41

    1. Initial program 91.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.3e-41 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.4 \cdot 10^{+74}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq -4.1 \cdot 10^{+43}:\\ \;\;\;\;x + \frac{0.3333333333333333}{z} \cdot \frac{t}{y}\\ \mathbf{elif}\;y \leq -3.15 \cdot 10^{+32}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq -5.5 \cdot 10^{-37}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{-41}:\\ \;\;\;\;x + \frac{0.3333333333333333}{y \cdot \frac{z}{t}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \end{array} \]

Alternative 4: 90.6% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq -4.5 \cdot 10^{+42}:\\
\;\;\;\;x + \frac{0.3333333333333333}{z} \cdot \frac{t}{y}\\

\mathbf{elif}\;y \leq -7.9 \cdot 10^{+27}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 1.3 \cdot 10^{-41}:\\
\;\;\;\;x + \frac{\frac{t}{z} \cdot 0.3333333333333333}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -3.3999999999999999e74 or -4.50000000000000012e42 < y < -7.89999999999999991e27

    1. Initial program 97.9%

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

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

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

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

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

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

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

    if -3.3999999999999999e74 < y < -4.50000000000000012e42

    1. Initial program 90.4%

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

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

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

    if -7.89999999999999991e27 < y < -7.5000000000000004e-37

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.5000000000000004e-37 < y < 1.3e-41

    1. Initial program 91.3%

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

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

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

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

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

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

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

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

    if 1.3e-41 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.4 \cdot 10^{+74}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq -4.5 \cdot 10^{+42}:\\ \;\;\;\;x + \frac{0.3333333333333333}{z} \cdot \frac{t}{y}\\ \mathbf{elif}\;y \leq -7.9 \cdot 10^{+27}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq -7.5 \cdot 10^{-37}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{-41}:\\ \;\;\;\;x + \frac{\frac{t}{z} \cdot 0.3333333333333333}{y}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \end{array} \]

Alternative 5: 90.5% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;y \leq -3.35 \cdot 10^{+31}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 1.2 \cdot 10^{-41}:\\
\;\;\;\;x + \frac{\frac{t}{z} \cdot 0.3333333333333333}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -3.3999999999999999e74 or -1.1600000000000001e44 < y < -3.35000000000000008e31

    1. Initial program 97.9%

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

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

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

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

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

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

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

    if -3.3999999999999999e74 < y < -1.1600000000000001e44

    1. Initial program 90.4%

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

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

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

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

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

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

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

    if -3.35000000000000008e31 < y < -1.14999999999999998e-36

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.14999999999999998e-36 < y < 1.20000000000000011e-41

    1. Initial program 91.3%

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

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

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

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

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

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

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

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

    if 1.20000000000000011e-41 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.4 \cdot 10^{+74}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq -1.16 \cdot 10^{+44}:\\ \;\;\;\;x + \frac{\frac{t \cdot 0.3333333333333333}{y}}{z}\\ \mathbf{elif}\;y \leq -3.35 \cdot 10^{+31}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq -1.15 \cdot 10^{-36}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{-41}:\\ \;\;\;\;x + \frac{\frac{t}{z} \cdot 0.3333333333333333}{y}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \end{array} \]

Alternative 6: 81.3% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z 3) < -9.9999999999999993e44 or 1.99999999999999997e-45 < (*.f64 z 3)

    1. Initial program 99.0%

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

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

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

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

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

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

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

    if -9.9999999999999993e44 < (*.f64 z 3) < 1.99999999999999997e-45

    1. Initial program 92.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 97.4% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999992e-72 < t

    1. Initial program 98.5%

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

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

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

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

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

Alternative 8: 97.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 4.6 \cdot 10^{-69}:\\ \;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\ \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 4.6e-69)
   (+ x (/ (- (/ t y) y) (* z 3.0)))
   (+ (/ t (* y (* z 3.0))) (- x (/ y (* z 3.0))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= 4.6e-69) {
		tmp = x + (((t / y) - y) / (z * 3.0));
	} 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 <= 4.6d-69) then
        tmp = x + (((t / y) - y) / (z * 3.0d0))
    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 <= 4.6e-69) {
		tmp = x + (((t / y) - y) / (z * 3.0));
	} else {
		tmp = (t / (y * (z * 3.0))) + (x - (y / (z * 3.0)));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if t <= 4.6e-69:
		tmp = x + (((t / y) - y) / (z * 3.0))
	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 <= 4.6e-69)
		tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0)));
	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 <= 4.6e-69)
		tmp = x + (((t / y) - y) / (z * 3.0));
	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, 4.6e-69], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $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 4.6 \cdot 10^{-69}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\

\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 < 4.6000000000000001e-69

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

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

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

    if 4.6000000000000001e-69 < t

    1. Initial program 98.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 simplification98.3%

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

Alternative 9: 98.1% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 1.02 \cdot 10^{-66}:\\ \;\;\;\;\left(\frac{\frac{t}{z}}{y \cdot 3} + x\right) - y \cdot \frac{0.3333333333333333}{z}\\ \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.02e-66)
   (- (+ (/ (/ t z) (* y 3.0)) x) (* y (/ 0.3333333333333333 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.02e-66) {
		tmp = (((t / z) / (y * 3.0)) + x) - (y * (0.3333333333333333 / 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.02d-66) then
        tmp = (((t / z) / (y * 3.0d0)) + x) - (y * (0.3333333333333333d0 / 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.02e-66) {
		tmp = (((t / z) / (y * 3.0)) + x) - (y * (0.3333333333333333 / 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.02e-66:
		tmp = (((t / z) / (y * 3.0)) + x) - (y * (0.3333333333333333 / 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.02e-66)
		tmp = Float64(Float64(Float64(Float64(t / z) / Float64(y * 3.0)) + x) - Float64(y * Float64(0.3333333333333333 / 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.02e-66)
		tmp = (((t / z) / (y * 3.0)) + x) - (y * (0.3333333333333333 / 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.02e-66], N[(N[(N[(N[(t / z), $MachinePrecision] / N[(y * 3.0), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] - N[(y * N[(0.3333333333333333 / z), $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.02 \cdot 10^{-66}:\\
\;\;\;\;\left(\frac{\frac{t}{z}}{y \cdot 3} + x\right) - y \cdot \frac{0.3333333333333333}{z}\\

\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.01999999999999996e-66

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.01999999999999996e-66 < t

    1. Initial program 98.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 simplification98.3%

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

Alternative 10: 61.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{if}\;y \leq -3.3 \cdot 10^{-12}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;y \leq 3.9 \cdot 10^{+43}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 4 \cdot 10^{+101}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -3.3000000000000001e-12 or 1.70000000000000008e-13 < y < 3.9000000000000001e43

    1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.3000000000000001e-12 < y < 8.0000000000000002e-58

    1. Initial program 91.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.0000000000000002e-58 < y < 1.70000000000000008e-13 or 3.9000000000000001e43 < y < 3.9999999999999999e101

    1. Initial program 99.9%

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

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

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

    if 3.9999999999999999e101 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}} \]
    8. Applied egg-rr74.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.3 \cdot 10^{-12}:\\ \;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 8 \cdot 10^{-58}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{-13}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 3.9 \cdot 10^{+43}:\\ \;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 4 \cdot 10^{+101}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\ \end{array} \]

Alternative 11: 89.4% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{-12} \lor \neg \left(y \leq 3.7 \cdot 10^{-42}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.49999999999999985e-12 or 3.7000000000000002e-42 < y

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.49999999999999985e-12 < y < 3.7000000000000002e-42

    1. Initial program 91.4%

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

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

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

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

Alternative 12: 78.8% accurate, 1.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.35000000000000005e-15 or 1.0600000000000001e-58 < y

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.35000000000000005e-15 < y < 1.0600000000000001e-58

    1. Initial program 91.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -0.3333333333333333 \cdot \color{blue}{\frac{\frac{-1 \cdot t}{z}}{y}} \]
      4. mul-1-neg74.5%

        \[\leadsto -0.3333333333333333 \cdot \frac{\frac{\color{blue}{-t}}{z}}{y} \]
    12. Simplified74.5%

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

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

Alternative 13: 77.1% accurate, 1.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.00000000000000031e-19 or 8.20000000000000056e-58 < y

    1. Initial program 98.5%

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

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

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

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

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

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

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

    if -7.00000000000000031e-19 < y < 8.20000000000000056e-58

    1. Initial program 91.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 77.0% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{-17} \lor \neg \left(y \leq 8.2 \cdot 10^{-58}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.2e-17 or 8.20000000000000056e-58 < y

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.2e-17 < y < 8.20000000000000056e-58

    1. Initial program 91.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 78.9% accurate, 1.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.04999999999999996e-17 or 6.9999999999999998e-58 < y

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.04999999999999996e-17 < y < 6.9999999999999998e-58

    1. Initial program 91.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{\color{blue}{y \cdot \frac{z}{t}}}{0.3333333333333333}} \]
      8. clear-num74.5%

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

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

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

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

Alternative 16: 78.9% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{-21} \lor \neg \left(y \leq 3.05 \cdot 10^{-58}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.99999999999999982e-21 or 3.0500000000000002e-58 < y

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.99999999999999982e-21 < y < 3.0500000000000002e-58

    1. Initial program 91.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{\color{blue}{y \cdot \frac{z}{t}}}{0.3333333333333333}} \]
      8. clear-num74.5%

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

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

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

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

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

Alternative 17: 95.8% accurate, 1.4× speedup?

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

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

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

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

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

Alternative 18: 95.9% accurate, 1.4× speedup?

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

\\
x + \frac{\frac{t}{y} - y}{z \cdot 3}
\end{array}
Derivation
  1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 47.2% accurate, 1.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.59999999999999995e80 or 1.22e55 < x

    1. Initial program 94.5%

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

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

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

    if -1.59999999999999995e80 < x < 1.22e55

    1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.6 \cdot 10^{+80}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.22 \cdot 10^{+55}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 20: 47.2% accurate, 1.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.69999999999999996e80 or 1.24999999999999996e58 < x

    1. Initial program 94.5%

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

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

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

    if -1.69999999999999996e80 < x < 1.24999999999999996e58

    1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.7 \cdot 10^{+80}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.25 \cdot 10^{+58}:\\ \;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 21: 29.8% 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.5%

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

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

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

    \[\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 2023332 
(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))))