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

Percentage Accurate: 95.7% → 97.5%
Time: 10.7s
Alternatives: 16
Speedup: 1.4×

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.7% accurate, 1.0× speedup?

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

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

Alternative 1: 97.5% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 91.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-91.1%

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

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

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

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

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

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

        \[\leadsto x - \left(\frac{y}{z \cdot 3} + \frac{\color{blue}{-0.3333333333333333} \cdot \frac{t}{z}}{y}\right) \]
    3. Simplified94.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 90.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. +-commutative90.9%

        \[\leadsto x - \color{blue}{\left(0.3333333333333333 \cdot \frac{y}{z} + -0.3333333333333333 \cdot \frac{t}{y \cdot z}\right)} \]
      2. metadata-eval90.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/93.9%

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

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

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

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

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

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

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

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

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

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

    if 1.9999999999999999e-94 < (*.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. *-commutative99.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 97.5% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 91.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-91.1%

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

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

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

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

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

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

        \[\leadsto x - \left(\frac{y}{z \cdot 3} + \frac{\color{blue}{-0.3333333333333333} \cdot \frac{t}{z}}{y}\right) \]
    3. Simplified94.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 90.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. +-commutative90.9%

        \[\leadsto x - \color{blue}{\left(0.3333333333333333 \cdot \frac{y}{z} + -0.3333333333333333 \cdot \frac{t}{y \cdot z}\right)} \]
      2. metadata-eval90.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/93.9%

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

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

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

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

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

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

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

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

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

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

    if 1.9999999999999999e-94 < (*.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} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.8%

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

Alternative 3: 79.9% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z 3) < -4.00000000000000027e-63 or 8.00000000000000024e40 < (*.f64 z 3)

    1. Initial program 98.8%

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

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

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

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

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

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

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

        \[\leadsto x - \left(\frac{y}{z \cdot 3} + \frac{\color{blue}{-0.3333333333333333} \cdot \frac{t}{z}}{y}\right) \]
    3. Simplified98.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 98.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. +-commutative98.6%

        \[\leadsto x - \color{blue}{\left(0.3333333333333333 \cdot \frac{y}{z} + -0.3333333333333333 \cdot \frac{t}{y \cdot z}\right)} \]
      2. metadata-eval98.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/98.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-inv98.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.00000000000000027e-63 < (*.f64 z 3) < 8.00000000000000024e40

    1. Initial program 88.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-88.3%

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

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

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

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

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

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

        \[\leadsto x - \left(\frac{y}{z \cdot 3} + \frac{\color{blue}{-0.3333333333333333} \cdot \frac{t}{z}}{y}\right) \]
    3. Simplified92.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 88.3%

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

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

        \[\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/91.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 63.3% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;y \leq -6.6 \cdot 10^{-14}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq -1.96 \cdot 10^{-29} \lor \neg \left(y \leq 4.7 \cdot 10^{+66}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.7000000000000001e38 or -6.5999999999999996e-14 < y < -1.95999999999999988e-29 or 4.7000000000000002e66 < 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.5%

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

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

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

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

        \[\leadsto x - \left(\frac{y}{z \cdot 3} + \frac{\color{blue}{-0.3333333333333333} \cdot \frac{t}{z}}{y}\right) \]
    3. Simplified92.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 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.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-inv92.4%

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

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

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

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

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

        \[\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*99.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(y \cdot -0.3333333333333333\right) \cdot \frac{1}{z}} \]
      5. /-rgt-identity70.3%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{y \cdot 1}{z}}}{-3} \]
      10. *-rgt-identity70.5%

        \[\leadsto \frac{\frac{\color{blue}{y}}{z}}{-3} \]
      11. associate-/r*70.5%

        \[\leadsto \color{blue}{\frac{y}{z \cdot -3}} \]
    13. Simplified70.5%

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

    if -3.7000000000000001e38 < y < -6.5999999999999996e-14

    1. Initial program 99.6%

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

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

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

    if -1.95999999999999988e-29 < y < 4.7000000000000002e66

    1. Initial program 89.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-89.6%

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

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

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

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

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

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

        \[\leadsto x - \left(\frac{y}{z \cdot 3} + \frac{\color{blue}{-0.3333333333333333} \cdot \frac{t}{z}}{y}\right) \]
    3. Simplified97.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 89.4%

      \[\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. +-commutative89.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{0.3333333333333333}{y}}{\frac{z}{t}}} \]
    9. Simplified63.5%

      \[\leadsto \color{blue}{\frac{\frac{0.3333333333333333}{y}}{\frac{z}{t}}} \]
    10. Step-by-step derivation
      1. div-inv63.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.7 \cdot 10^{+38}:\\ \;\;\;\;\frac{y}{z \cdot -3}\\ \mathbf{elif}\;y \leq -6.6 \cdot 10^{-14}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -1.96 \cdot 10^{-29} \lor \neg \left(y \leq 4.7 \cdot 10^{+66}\right):\\ \;\;\;\;\frac{y}{z \cdot -3}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.3333333333333333}{y} \cdot \frac{t}{z}\\ \end{array} \]

Alternative 5: 91.7% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.5e-26 or 4.7000000000000002e66 < y

    1. Initial program 98.5%

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

        \[\leadsto \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*93.0%

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

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

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

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

        \[\leadsto x - \left(\frac{y}{z \cdot 3} + \frac{\color{blue}{-0.3333333333333333} \cdot \frac{t}{z}}{y}\right) \]
    3. Simplified93.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 98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.5e-26 < y < 4.7000000000000002e66

    1. Initial program 89.1%

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

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

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

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

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

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

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

Alternative 6: 77.8% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{-74} \lor \neg \left(y \leq 3.25 \cdot 10^{-74}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.40000000000000021e-74 or 3.2500000000000001e-74 < y

    1. Initial program 97.6%

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

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

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

    if -4.40000000000000021e-74 < y < 3.2500000000000001e-74

    1. Initial program 87.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-87.0%

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

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

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

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

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

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

        \[\leadsto x - \left(\frac{y}{z \cdot 3} + \frac{\color{blue}{-0.3333333333333333} \cdot \frac{t}{z}}{y}\right) \]
    3. Simplified97.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 86.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. +-commutative86.9%

        \[\leadsto x - \color{blue}{\left(0.3333333333333333 \cdot \frac{y}{z} + -0.3333333333333333 \cdot \frac{t}{y \cdot z}\right)} \]
      2. metadata-eval86.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/97.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-inv97.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{0.3333333333333333}{y}}{\frac{z}{t}}} \]
    10. Step-by-step derivation
      1. div-inv70.3%

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{y} \cdot \frac{1}{\frac{z}{t}}} \]
      2. clear-num70.4%

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

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

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

Alternative 7: 77.8% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.5 \cdot 10^{-74} \lor \neg \left(y \leq 1.72 \cdot 10^{-75}\right):\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.50000000000000015e-74 or 1.72e-75 < y

    1. Initial program 97.6%

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

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

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

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

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

    if -3.50000000000000015e-74 < y < 1.72e-75

    1. Initial program 87.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-87.0%

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

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

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

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

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

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

        \[\leadsto x - \left(\frac{y}{z \cdot 3} + \frac{\color{blue}{-0.3333333333333333} \cdot \frac{t}{z}}{y}\right) \]
    3. Simplified97.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 86.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. +-commutative86.9%

        \[\leadsto x - \color{blue}{\left(0.3333333333333333 \cdot \frac{y}{z} + -0.3333333333333333 \cdot \frac{t}{y \cdot z}\right)} \]
      2. metadata-eval86.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/97.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-inv97.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{0.3333333333333333}{y}}{\frac{z}{t}}} \]
    10. Step-by-step derivation
      1. div-inv70.3%

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{y} \cdot \frac{1}{\frac{z}{t}}} \]
      2. clear-num70.4%

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

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

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

Alternative 8: 77.8% accurate, 1.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.99999999999999998e-74 or 9.9999999999999996e-76 < 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*94.0%

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

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

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

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

        \[\leadsto x - \left(\frac{y}{z \cdot 3} + \frac{\color{blue}{-0.3333333333333333} \cdot \frac{t}{z}}{y}\right) \]
    3. Simplified93.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 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/93.9%

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

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

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

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

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

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

        \[\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*99.2%

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

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

        \[\leadsto x - \left(\frac{y}{z \cdot 3} - \color{blue}{\frac{\frac{t}{y} \cdot 1}{z \cdot 3}}\right) \]
      14. *-rgt-identity99.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}} \]
    7. Taylor expanded in y around inf 86.1%

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

    if -4.99999999999999998e-74 < y < 9.9999999999999996e-76

    1. Initial program 87.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-87.0%

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

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

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

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

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

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

        \[\leadsto x - \left(\frac{y}{z \cdot 3} + \frac{\color{blue}{-0.3333333333333333} \cdot \frac{t}{z}}{y}\right) \]
    3. Simplified97.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 86.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. +-commutative86.9%

        \[\leadsto x - \color{blue}{\left(0.3333333333333333 \cdot \frac{y}{z} + -0.3333333333333333 \cdot \frac{t}{y \cdot z}\right)} \]
      2. metadata-eval86.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/97.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-inv97.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{0.3333333333333333}{y}}{\frac{z}{t}}} \]
    10. Step-by-step derivation
      1. div-inv70.3%

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{y} \cdot \frac{1}{\frac{z}{t}}} \]
      2. clear-num70.4%

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

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

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

Alternative 9: 77.7% accurate, 1.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.99999999999999983e-74 or 2.4500000000000001e-74 < 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*94.0%

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

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

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

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

        \[\leadsto x - \left(\frac{y}{z \cdot 3} + \frac{\color{blue}{-0.3333333333333333} \cdot \frac{t}{z}}{y}\right) \]
    3. Simplified93.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 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/93.9%

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

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

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

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

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

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

        \[\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*99.2%

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

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

        \[\leadsto x - \left(\frac{y}{z \cdot 3} - \color{blue}{\frac{\frac{t}{y} \cdot 1}{z \cdot 3}}\right) \]
      14. *-rgt-identity99.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}} \]
    7. Taylor expanded in y around inf 86.1%

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

    if -3.99999999999999983e-74 < y < 2.4500000000000001e-74

    1. Initial program 87.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-87.0%

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

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

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

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

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

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

        \[\leadsto x - \left(\frac{y}{z \cdot 3} + \frac{\color{blue}{-0.3333333333333333} \cdot \frac{t}{z}}{y}\right) \]
    3. Simplified97.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 86.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. +-commutative86.9%

        \[\leadsto x - \color{blue}{\left(0.3333333333333333 \cdot \frac{y}{z} + -0.3333333333333333 \cdot \frac{t}{y \cdot z}\right)} \]
      2. metadata-eval86.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/97.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-inv97.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 77.8% accurate, 1.3× speedup?

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

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

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

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


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

    1. Initial program 97.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-97.0%

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

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

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

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

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

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

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

      \[\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 inf 88.5%

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

    if -4.40000000000000021e-74 < y < 7.2000000000000001e-75

    1. Initial program 87.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-87.0%

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

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

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

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

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

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

        \[\leadsto x - \left(\frac{y}{z \cdot 3} + \frac{\color{blue}{-0.3333333333333333} \cdot \frac{t}{z}}{y}\right) \]
    3. Simplified97.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 86.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. +-commutative86.9%

        \[\leadsto x - \color{blue}{\left(0.3333333333333333 \cdot \frac{y}{z} + -0.3333333333333333 \cdot \frac{t}{y \cdot z}\right)} \]
      2. metadata-eval86.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/97.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-inv97.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{0.3333333333333333}{y}}{\frac{z}{t}}} \]
    10. Step-by-step derivation
      1. div-inv70.3%

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{y} \cdot \frac{1}{\frac{z}{t}}} \]
      2. clear-num70.4%

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

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

    if 7.2000000000000001e-75 < y

    1. Initial program 98.3%

      \[\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 83.0%

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

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

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

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

Alternative 11: 95.7% accurate, 1.4× speedup?

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

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

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

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

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

Alternative 12: 95.7% accurate, 1.4× speedup?

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

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

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

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

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

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

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

Alternative 13: 95.8% accurate, 1.4× speedup?

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

\\
x + \frac{\frac{t}{y} - y}{z \cdot 3}
\end{array}
Derivation
  1. Initial program 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*95.3%

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

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

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

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

      \[\leadsto x - \left(\frac{y}{z \cdot 3} + \frac{\color{blue}{-0.3333333333333333} \cdot \frac{t}{z}}{y}\right) \]
  3. Simplified95.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 93.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. +-commutative93.6%

      \[\leadsto x - \color{blue}{\left(0.3333333333333333 \cdot \frac{y}{z} + -0.3333333333333333 \cdot \frac{t}{y \cdot z}\right)} \]
    2. metadata-eval93.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/95.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-inv95.1%

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

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

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

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

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

      \[\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*96.2%

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

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

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

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

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

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

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

Alternative 14: 47.2% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.25 \cdot 10^{+136}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.25e136 or 1.06e-10 < z

    1. Initial program 99.1%

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

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

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

    if -2.25e136 < z < 1.06e-10

    1. Initial program 90.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-90.2%

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

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

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

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

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

        \[\leadsto x - \left(\frac{y}{z \cdot 3} + \frac{\color{blue}{-0.3333333333333333} \cdot \frac{t}{z}}{y}\right) \]
    3. Simplified93.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 90.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. +-commutative90.1%

        \[\leadsto x - \color{blue}{\left(0.3333333333333333 \cdot \frac{y}{z} + -0.3333333333333333 \cdot \frac{t}{y \cdot z}\right)} \]
      2. metadata-eval90.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/93.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-inv93.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \left(\frac{y}{z \cdot 3} - \color{blue}{\frac{\frac{t}{y} \cdot 1}{z \cdot 3}}\right) \]
      14. *-rgt-identity99.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 y around inf 47.6%

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

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

Alternative 15: 47.3% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+136}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.0999999999999999e136 or 1.2e-5 < z

    1. Initial program 99.1%

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

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

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

    if -2.0999999999999999e136 < z < 1.2e-5

    1. Initial program 90.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-90.2%

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

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

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

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

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

        \[\leadsto x - \left(\frac{y}{z \cdot 3} + \frac{\color{blue}{-0.3333333333333333} \cdot \frac{t}{z}}{y}\right) \]
    3. Simplified93.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 90.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. +-commutative90.1%

        \[\leadsto x - \color{blue}{\left(0.3333333333333333 \cdot \frac{y}{z} + -0.3333333333333333 \cdot \frac{t}{y \cdot z}\right)} \]
      2. metadata-eval90.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/93.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-inv93.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \left(\frac{y}{z \cdot 3} - \color{blue}{\frac{\frac{t}{y} \cdot 1}{z \cdot 3}}\right) \]
      14. *-rgt-identity99.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 y around inf 59.6%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{y \cdot -0.3333333333333333}}{z} \]
      3. *-rgt-identity47.6%

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

        \[\leadsto \color{blue}{\left(y \cdot -0.3333333333333333\right) \cdot \frac{1}{z}} \]
      5. /-rgt-identity47.6%

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

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

        \[\leadsto \frac{y}{\color{blue}{-3}} \cdot \frac{1}{z} \]
      8. associate-*l/47.7%

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

        \[\leadsto \frac{\color{blue}{\frac{y \cdot 1}{z}}}{-3} \]
      10. *-rgt-identity47.7%

        \[\leadsto \frac{\frac{\color{blue}{y}}{z}}{-3} \]
      11. associate-/r*47.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{+136}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-5}:\\ \;\;\;\;\frac{y}{z \cdot -3}\\ \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 93.8%

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

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

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

    \[\leadsto x \]

Developer target: 96.1% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2023308 
(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))))