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

Percentage Accurate: 95.2% → 99.3%
Time: 11.3s
Alternatives: 16
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 95.2% accurate, 1.0× speedup?

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

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

Alternative 1: 99.3% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;3 \cdot z \leq 5 \cdot 10^{-17}:\\
\;\;\;\;x - \frac{y - \frac{t}{y}}{3 \cdot z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 z 3) < -5.00000000000000042e-87

    1. Initial program 99.8%

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

    if -5.00000000000000042e-87 < (*.f64 z 3) < 4.9999999999999999e-17

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\left(0.3333333333333333 \cdot \frac{y}{z} - 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\right)} \]
      5. *-commutative89.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y - \frac{t}{y}}{z \cdot 3}} \]
    6. Simplified99.8%

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

    if 4.9999999999999999e-17 < (*.f64 z 3)

    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 \color{blue}{x - \left(\frac{y}{z \cdot 3} - \frac{t}{\left(z \cdot 3\right) \cdot y}\right)} \]
      2. sub-neg98.5%

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

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

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

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

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

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

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

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

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

Alternative 2: 82.2% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z 3) < -2.0000000000000001e71 or 4.99999999999999977e36 < (*.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. Step-by-step derivation
      1. associate-+l-99.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.0000000000000001e71 < (*.f64 z 3) < 4.99999999999999977e36

    1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y - \frac{t}{y}}{z \cdot 3}} \]
    6. Simplified98.5%

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

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

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}} \]
      2. distribute-lft-out--89.2%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{-0.3333333333333333}{z} - \color{blue}{\frac{t}{y} \cdot \frac{-0.3333333333333333}{z}} \]
      10. distribute-rgt-out--89.3%

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

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

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

Alternative 3: 97.7% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 99.8%

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

    if -4.3000000000000001e98 < t

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 97.5% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y - \frac{t}{y}}{z \cdot 3}} \]
    6. Simplified94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1e10 < y

    1. Initial program 96.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y - \frac{t}{y}}{z \cdot 3}} \]
    6. Simplified99.8%

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

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

Alternative 5: 98.4% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2e-136 or 5.39999999999999998e-129 < y

    1. Initial program 98.2%

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

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

    if -2e-136 < y < 5.39999999999999998e-129

    1. Initial program 91.3%

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

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

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

        \[\leadsto \color{blue}{\frac{0.3333333333333333 \cdot t}{y \cdot z}} \]
      2. times-frac75.5%

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

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

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

Alternative 6: 98.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{-138} \lor \neg \left(y \leq 2.1 \cdot 10^{-128}\right):\\
\;\;\;\;x - \frac{y - \frac{t}{y}}{3 \cdot z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.7999999999999998e-138 or 2.1000000000000001e-128 < y

    1. Initial program 98.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y - \frac{t}{y}}{z \cdot 3}} \]
    6. Simplified98.7%

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

    if -4.7999999999999998e-138 < y < 2.1000000000000001e-128

    1. Initial program 91.3%

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

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

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

        \[\leadsto \color{blue}{\frac{0.3333333333333333 \cdot t}{y \cdot z}} \]
      2. times-frac75.5%

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

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

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

Alternative 7: 98.4% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 98.7%

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

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

    if -7.00000000000000058e-136 < y < 3.2000000000000003e-129

    1. Initial program 91.3%

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

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

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

        \[\leadsto \color{blue}{\frac{0.3333333333333333 \cdot t}{y \cdot z}} \]
      2. times-frac75.5%

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

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

    if 3.2000000000000003e-129 < y

    1. Initial program 97.7%

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

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

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

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

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

Alternative 8: 60.5% accurate, 1.1× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.50000000000000011e39 or 4.3999999999999998e-10 < y

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\left(0.3333333333333333 \cdot \frac{y}{z} - 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\right)} \]
      5. *-commutative90.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y - \frac{t}{y}}{z \cdot 3}} \]
    6. Simplified99.8%

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

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

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}} \]
      2. distribute-lft-out--73.0%

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{-0.3333333333333333}{z} - \color{blue}{\frac{t \cdot -0.3333333333333333}{y \cdot z}} \]
      9. times-frac71.3%

        \[\leadsto y \cdot \frac{-0.3333333333333333}{z} - \color{blue}{\frac{t}{y} \cdot \frac{-0.3333333333333333}{z}} \]
      10. distribute-rgt-out--73.0%

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

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

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

    if -9.50000000000000011e39 < y < -3.59999999999999994e-122

    1. Initial program 99.8%

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

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

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

    if -3.59999999999999994e-122 < y < 4.3999999999999998e-10

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y - \frac{t}{y}}{z \cdot 3}} \]
    6. Simplified89.5%

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

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

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}} \]
      2. distribute-lft-out--64.5%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{-0.3333333333333333}{z} - \color{blue}{\frac{t}{y} \cdot \frac{-0.3333333333333333}{z}} \]
      10. distribute-rgt-out--64.5%

        \[\leadsto \color{blue}{\frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)} \]
    9. Simplified64.5%

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

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

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

Alternative 9: 62.7% accurate, 1.1× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.4999999999999995e38 or 8.0000000000000002e-8 < y

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\left(0.3333333333333333 \cdot \frac{y}{z} - 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\right)} \]
      5. *-commutative90.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y - \frac{t}{y}}{z \cdot 3}} \]
    6. Simplified99.8%

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

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

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}} \]
      2. distribute-lft-out--73.0%

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{-0.3333333333333333}{z} - \color{blue}{\frac{t \cdot -0.3333333333333333}{y \cdot z}} \]
      9. times-frac71.3%

        \[\leadsto y \cdot \frac{-0.3333333333333333}{z} - \color{blue}{\frac{t}{y} \cdot \frac{-0.3333333333333333}{z}} \]
      10. distribute-rgt-out--73.0%

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

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

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

    if -9.4999999999999995e38 < y < -4.1e-122

    1. Initial program 99.8%

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

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

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

    if -4.1e-122 < y < 8.0000000000000002e-8

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y - \frac{t}{y}}{z \cdot 3}} \]
    6. Simplified89.5%

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

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

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}} \]
      2. distribute-lft-out--64.5%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{-0.3333333333333333}{z} - \color{blue}{\frac{t}{y} \cdot \frac{-0.3333333333333333}{z}} \]
      10. distribute-rgt-out--64.5%

        \[\leadsto \color{blue}{\frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)} \]
    9. Simplified64.5%

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

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

        \[\leadsto \color{blue}{\frac{0.3333333333333333 \cdot t}{y \cdot z}} \]
      2. times-frac70.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.5 \cdot 10^{+38}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq -4.1 \cdot 10^{-122}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 8 \cdot 10^{-8}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\ \end{array} \]

Alternative 10: 91.2% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y - \frac{t}{y}}{z \cdot 3}} \]
    6. Simplified99.8%

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

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

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

    1. Initial program 94.3%

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

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

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

        \[\leadsto \color{blue}{\frac{0.3333333333333333 \cdot t}{y \cdot z}} \]
      2. times-frac67.5%

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

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

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

Alternative 11: 77.5% accurate, 1.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.00000000000000012e-122 or 2.34999999999999996e-11 < y

    1. Initial program 97.8%

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

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

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

    if -2.00000000000000012e-122 < y < 2.34999999999999996e-11

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y - \frac{t}{y}}{z \cdot 3}} \]
    6. Simplified89.5%

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

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

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}} \]
      2. distribute-lft-out--64.5%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{-0.3333333333333333}{z} - \color{blue}{\frac{t}{y} \cdot \frac{-0.3333333333333333}{z}} \]
      10. distribute-rgt-out--64.5%

        \[\leadsto \color{blue}{\frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)} \]
    9. Simplified64.5%

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

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

        \[\leadsto \color{blue}{\frac{0.3333333333333333 \cdot t}{y \cdot z}} \]
      2. times-frac70.8%

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

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

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

Alternative 12: 77.6% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y - \frac{t}{y}}{z \cdot 3}} \]
    6. Simplified99.8%

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

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

    if -4.00000000000000024e-122 < y < 1.06e-14

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y - \frac{t}{y}}{z \cdot 3}} \]
    6. Simplified89.5%

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

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

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}} \]
      2. distribute-lft-out--64.5%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{-0.3333333333333333}{z} - \color{blue}{\frac{t}{y} \cdot \frac{-0.3333333333333333}{z}} \]
      10. distribute-rgt-out--64.5%

        \[\leadsto \color{blue}{\frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)} \]
    9. Simplified64.5%

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

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

        \[\leadsto \color{blue}{\frac{0.3333333333333333 \cdot t}{y \cdot z}} \]
      2. times-frac70.8%

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

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

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

Alternative 13: 77.6% accurate, 1.3× speedup?

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

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

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

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


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

    1. Initial program 98.6%

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

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

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

    if -3.8999999999999999e-122 < y < 6.29999999999999982e-15

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y - \frac{t}{y}}{z \cdot 3}} \]
    6. Simplified89.5%

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

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

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}} \]
      2. distribute-lft-out--64.5%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{-0.3333333333333333}{z} - \color{blue}{\frac{t}{y} \cdot \frac{-0.3333333333333333}{z}} \]
      10. distribute-rgt-out--64.5%

        \[\leadsto \color{blue}{\frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)} \]
    9. Simplified64.5%

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

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

        \[\leadsto \color{blue}{\frac{0.3333333333333333 \cdot t}{y \cdot z}} \]
      2. times-frac70.8%

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

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

    if 6.29999999999999982e-15 < y

    1. Initial program 96.8%

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{1 \cdot y}{\frac{z}{-0.3333333333333333}}} \]
      2. *-un-lft-identity91.0%

        \[\leadsto x + \frac{\color{blue}{y}}{\frac{z}{-0.3333333333333333}} \]
      3. add-sqr-sqrt48.3%

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

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

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

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

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

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

        \[\leadsto x + \frac{y}{\sqrt{\left(z \cdot \left(-3\right)\right) \cdot \left(z \cdot \color{blue}{-3}\right)}} \]
      10. metadata-eval56.5%

        \[\leadsto x + \frac{y}{\sqrt{\left(z \cdot \left(-3\right)\right) \cdot \left(z \cdot \color{blue}{\left(-3\right)}\right)}} \]
      11. swap-sqr56.5%

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

        \[\leadsto x + \frac{y}{\sqrt{\left(z \cdot z\right) \cdot \left(\color{blue}{-3} \cdot \left(-3\right)\right)}} \]
      13. metadata-eval56.5%

        \[\leadsto x + \frac{y}{\sqrt{\left(z \cdot z\right) \cdot \left(-3 \cdot \color{blue}{-3}\right)}} \]
      14. metadata-eval56.5%

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

        \[\leadsto x + \frac{y}{\sqrt{\left(z \cdot z\right) \cdot \color{blue}{\left(3 \cdot 3\right)}}} \]
      16. swap-sqr56.5%

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

        \[\leadsto x + \frac{y}{\color{blue}{\sqrt{z \cdot 3} \cdot \sqrt{z \cdot 3}}} \]
      18. add-sqr-sqrt25.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.9 \cdot 10^{-122}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 6.3 \cdot 10^{-15}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{-0.3333333333333333}{\frac{z}{y}}\\ \end{array} \]

Alternative 14: 77.6% accurate, 1.3× speedup?

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

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

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

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


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

    1. Initial program 98.6%

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

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

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

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

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

    if -3.59999999999999994e-122 < y < 1.14999999999999999e-14

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y - \frac{t}{y}}{z \cdot 3}} \]
    6. Simplified89.5%

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

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

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}} \]
      2. distribute-lft-out--64.5%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{-0.3333333333333333}{z} - \color{blue}{\frac{t}{y} \cdot \frac{-0.3333333333333333}{z}} \]
      10. distribute-rgt-out--64.5%

        \[\leadsto \color{blue}{\frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)} \]
    9. Simplified64.5%

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

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

        \[\leadsto \color{blue}{\frac{0.3333333333333333 \cdot t}{y \cdot z}} \]
      2. times-frac70.8%

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

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

    if 1.14999999999999999e-14 < y

    1. Initial program 96.8%

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{1 \cdot y}{\frac{z}{-0.3333333333333333}}} \]
      2. *-un-lft-identity91.0%

        \[\leadsto x + \frac{\color{blue}{y}}{\frac{z}{-0.3333333333333333}} \]
      3. add-sqr-sqrt48.3%

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

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

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

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

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

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

        \[\leadsto x + \frac{y}{\sqrt{\left(z \cdot \left(-3\right)\right) \cdot \left(z \cdot \color{blue}{-3}\right)}} \]
      10. metadata-eval56.5%

        \[\leadsto x + \frac{y}{\sqrt{\left(z \cdot \left(-3\right)\right) \cdot \left(z \cdot \color{blue}{\left(-3\right)}\right)}} \]
      11. swap-sqr56.5%

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

        \[\leadsto x + \frac{y}{\sqrt{\left(z \cdot z\right) \cdot \left(\color{blue}{-3} \cdot \left(-3\right)\right)}} \]
      13. metadata-eval56.5%

        \[\leadsto x + \frac{y}{\sqrt{\left(z \cdot z\right) \cdot \left(-3 \cdot \color{blue}{-3}\right)}} \]
      14. metadata-eval56.5%

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

        \[\leadsto x + \frac{y}{\sqrt{\left(z \cdot z\right) \cdot \color{blue}{\left(3 \cdot 3\right)}}} \]
      16. swap-sqr56.5%

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

        \[\leadsto x + \frac{y}{\color{blue}{\sqrt{z \cdot 3} \cdot \sqrt{z \cdot 3}}} \]
      18. add-sqr-sqrt25.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.6 \cdot 10^{-122}:\\ \;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{-14}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{-0.3333333333333333}{\frac{z}{y}}\\ \end{array} \]

Alternative 15: 47.4% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{+59}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 8.5 \cdot 10^{+56}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.20000000000000032e59 or 8.4999999999999998e56 < z

    1. Initial program 99.0%

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

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

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

    if -9.20000000000000032e59 < z < 8.4999999999999998e56

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}} \]
      2. distribute-lft-out--89.3%

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

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

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

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

        \[\leadsto y \cdot \frac{-0.3333333333333333}{z} - \frac{\color{blue}{\frac{-0.3333333333333333 \cdot t}{y}}}{z} \]
      7. *-commutative88.0%

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

        \[\leadsto y \cdot \frac{-0.3333333333333333}{z} - \color{blue}{\frac{t \cdot -0.3333333333333333}{y \cdot z}} \]
      9. times-frac88.0%

        \[\leadsto y \cdot \frac{-0.3333333333333333}{z} - \color{blue}{\frac{t}{y} \cdot \frac{-0.3333333333333333}{z}} \]
      10. distribute-rgt-out--89.4%

        \[\leadsto \color{blue}{\frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)} \]
    9. Simplified89.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.2 \cdot 10^{+59}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+56}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 16: 30.5% accurate, 15.0× speedup?

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

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

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

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

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

    \[\leadsto x \]

Developer target: 95.9% accurate, 1.0× speedup?

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

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

Reproduce

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

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

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