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

Percentage Accurate: 79.5% → 87.8%
Time: 14.1s
Alternatives: 8
Speedup: 0.2×

Specification

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

\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\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 8 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: 79.5% accurate, 1.0× speedup?

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

\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}

Alternative 1: 87.8% accurate, 0.2× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\ t_2 := \frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c}\\ \mathbf{if}\;t_1 \leq -4 \cdot 10^{-321}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\left(\left(t \cdot a\right) \cdot -4 + \frac{b}{z}\right) \cdot \frac{1}{c}\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{a \cdot -4}{\frac{c}{t}}\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
        (t_2 (/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* t a)))) (* z c))))
   (if (<= t_1 -4e-321)
     t_2
     (if (<= t_1 0.0)
       (* (+ (* (* t a) -4.0) (/ b z)) (/ 1.0 c))
       (if (<= t_1 INFINITY) t_2 (/ (* a -4.0) (/ c t)))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
	double t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c);
	double tmp;
	if (t_1 <= -4e-321) {
		tmp = t_2;
	} else if (t_1 <= 0.0) {
		tmp = (((t * a) * -4.0) + (b / z)) * (1.0 / c);
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = t_2;
	} else {
		tmp = (a * -4.0) / (c / t);
	}
	return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
	double t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c);
	double tmp;
	if (t_1 <= -4e-321) {
		tmp = t_2;
	} else if (t_1 <= 0.0) {
		tmp = (((t * a) * -4.0) + (b / z)) * (1.0 / c);
	} else if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = t_2;
	} else {
		tmp = (a * -4.0) / (c / t);
	}
	return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
def code(x, y, z, t, a, b, c):
	t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
	t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c)
	tmp = 0
	if t_1 <= -4e-321:
		tmp = t_2
	elif t_1 <= 0.0:
		tmp = (((t * a) * -4.0) + (b / z)) * (1.0 / c)
	elif t_1 <= math.inf:
		tmp = t_2
	else:
		tmp = (a * -4.0) / (c / t)
	return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
function code(x, y, z, t, a, b, c)
	t_1 = Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c))
	t_2 = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(t * a)))) / Float64(z * c))
	tmp = 0.0
	if (t_1 <= -4e-321)
		tmp = t_2;
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(Float64(Float64(t * a) * -4.0) + Float64(b / z)) * Float64(1.0 / c));
	elseif (t_1 <= Inf)
		tmp = t_2;
	else
		tmp = Float64(Float64(a * -4.0) / Float64(c / t));
	end
	return tmp
end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
	t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c);
	tmp = 0.0;
	if (t_1 <= -4e-321)
		tmp = t_2;
	elseif (t_1 <= 0.0)
		tmp = (((t * a) * -4.0) + (b / z)) * (1.0 / c);
	elseif (t_1 <= Inf)
		tmp = t_2;
	else
		tmp = (a * -4.0) / (c / t);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e-321], t$95$2, If[LessEqual[t$95$1, 0.0], N[(N[(N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$2, N[(N[(a * -4.0), $MachinePrecision] / N[(c / t), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\
t_2 := \frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c}\\
\mathbf{if}\;t_1 \leq -4 \cdot 10^{-321}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\left(\left(t \cdot a\right) \cdot -4 + \frac{b}{z}\right) \cdot \frac{1}{c}\\

\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;\frac{a \cdot -4}{\frac{c}{t}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -4.00193e-321 or -0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < +inf.0

    1. Initial program 88.6%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. associate-+l-88.6%

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y - \left(\left(\left(z \cdot 4\right) \cdot t\right) \cdot a - b\right)}}{z \cdot c} \]
      2. *-commutative88.6%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*88.2%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t} - b\right)}{z \cdot c} \]
      4. *-commutative88.2%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t - b\right)}{z \cdot c} \]
      5. associate-+l-88.2%

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
      6. *-commutative88.2%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right)} \cdot t\right) + b}{z \cdot c} \]
      7. associate-*r*88.6%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      8. *-commutative88.6%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      9. associate-*l*88.6%

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      10. associate-*l*89.9%

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

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing

    if -4.00193e-321 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -0.0

    1. Initial program 50.3%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. associate-+l-50.3%

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

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*53.6%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t} - b\right)}{z \cdot c} \]
      4. *-commutative53.6%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t - b\right)}{z \cdot c} \]
      5. associate-+l-53.6%

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
      6. *-commutative53.6%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right)} \cdot t\right) + b}{z \cdot c} \]
      7. associate-*r*50.3%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      8. *-commutative50.3%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      9. associate-*l*50.3%

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      10. associate-*l*54.8%

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{\left(z \cdot 4\right) \cdot \left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified54.8%

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-/r*99.8%

        \[\leadsto \color{blue}{\frac{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z}}{c}} \]
      2. div-inv99.7%

        \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z} \cdot \frac{1}{c}} \]
      3. fma-neg99.7%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x, 9 \cdot y, -\left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)} + b}{z} \cdot \frac{1}{c} \]
      4. associate-*r*95.2%

        \[\leadsto \frac{\mathsf{fma}\left(x, 9 \cdot y, -\color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z} \cdot \frac{1}{c} \]
      5. distribute-lft-neg-in95.2%

        \[\leadsto \frac{\mathsf{fma}\left(x, 9 \cdot y, \color{blue}{\left(-\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z} \cdot \frac{1}{c} \]
      6. *-commutative95.2%

        \[\leadsto \frac{\mathsf{fma}\left(x, 9 \cdot y, \color{blue}{a \cdot \left(-\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z} \cdot \frac{1}{c} \]
      7. *-commutative95.2%

        \[\leadsto \frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(-\color{blue}{t \cdot \left(z \cdot 4\right)}\right)\right) + b}{z} \cdot \frac{1}{c} \]
      8. distribute-rgt-neg-in95.2%

        \[\leadsto \frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \color{blue}{\left(t \cdot \left(-z \cdot 4\right)\right)}\right) + b}{z} \cdot \frac{1}{c} \]
      9. distribute-rgt-neg-in95.2%

        \[\leadsto \frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(t \cdot \color{blue}{\left(z \cdot \left(-4\right)\right)}\right)\right) + b}{z} \cdot \frac{1}{c} \]
      10. metadata-eval95.2%

        \[\leadsto \frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(t \cdot \left(z \cdot \color{blue}{-4}\right)\right)\right) + b}{z} \cdot \frac{1}{c} \]
    6. Applied egg-rr95.2%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z} \cdot \frac{1}{c}} \]
    7. Taylor expanded in x around 0 95.2%

      \[\leadsto \color{blue}{\frac{b + -4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{z}} \cdot \frac{1}{c} \]
    8. Taylor expanded in b around 0 99.7%

      \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot t\right) + \frac{b}{z}\right)} \cdot \frac{1}{c} \]

    if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c))

    1. Initial program 0.0%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. associate-+l-0.0%

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y - \left(\left(\left(z \cdot 4\right) \cdot t\right) \cdot a - b\right)}}{z \cdot c} \]
      2. *-commutative0.0%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*1.5%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t} - b\right)}{z \cdot c} \]
      4. *-commutative1.5%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t - b\right)}{z \cdot c} \]
      5. associate-+l-1.5%

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
      6. *-commutative1.5%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right)} \cdot t\right) + b}{z \cdot c} \]
      7. associate-*r*0.0%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      8. *-commutative0.0%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      9. associate-*l*0.0%

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      10. associate-*l*1.5%

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{\left(z \cdot 4\right) \cdot \left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified1.5%

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 47.5%

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    6. Step-by-step derivation
      1. *-commutative47.5%

        \[\leadsto \color{blue}{\frac{a \cdot t}{c} \cdot -4} \]
      2. associate-/l*68.3%

        \[\leadsto \color{blue}{\frac{a}{\frac{c}{t}}} \cdot -4 \]
      3. associate-*l/68.3%

        \[\leadsto \color{blue}{\frac{a \cdot -4}{\frac{c}{t}}} \]
    7. Simplified68.3%

      \[\leadsto \color{blue}{\frac{a \cdot -4}{\frac{c}{t}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification89.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \leq -4 \cdot 10^{-321}:\\ \;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c}\\ \mathbf{elif}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \leq 0:\\ \;\;\;\;\left(\left(t \cdot a\right) \cdot -4 + \frac{b}{z}\right) \cdot \frac{1}{c}\\ \mathbf{elif}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \leq \infty:\\ \;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{a \cdot -4}{\frac{c}{t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 71.5% accurate, 0.9× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -3.9 \cdot 10^{+102} \lor \neg \left(x \leq 2.6 \cdot 10^{-56}\right):\\ \;\;\;\;\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(t \cdot a\right) \cdot -4 + \frac{b}{z}\right) \cdot \frac{1}{c}\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (if (or (<= x -3.9e+102) (not (<= x 2.6e-56)))
   (/ (- (* 9.0 (* x y)) (* 4.0 (* a (* z t)))) (* z c))
   (* (+ (* (* t a) -4.0) (/ b z)) (/ 1.0 c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if ((x <= -3.9e+102) || !(x <= 2.6e-56)) {
		tmp = ((9.0 * (x * y)) - (4.0 * (a * (z * t)))) / (z * c);
	} else {
		tmp = (((t * a) * -4.0) + (b / z)) * (1.0 / c);
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if ((x <= (-3.9d+102)) .or. (.not. (x <= 2.6d-56))) then
        tmp = ((9.0d0 * (x * y)) - (4.0d0 * (a * (z * t)))) / (z * c)
    else
        tmp = (((t * a) * (-4.0d0)) + (b / z)) * (1.0d0 / c)
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if ((x <= -3.9e+102) || !(x <= 2.6e-56)) {
		tmp = ((9.0 * (x * y)) - (4.0 * (a * (z * t)))) / (z * c);
	} else {
		tmp = (((t * a) * -4.0) + (b / z)) * (1.0 / c);
	}
	return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
def code(x, y, z, t, a, b, c):
	tmp = 0
	if (x <= -3.9e+102) or not (x <= 2.6e-56):
		tmp = ((9.0 * (x * y)) - (4.0 * (a * (z * t)))) / (z * c)
	else:
		tmp = (((t * a) * -4.0) + (b / z)) * (1.0 / c)
	return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if ((x <= -3.9e+102) || !(x <= 2.6e-56))
		tmp = Float64(Float64(Float64(9.0 * Float64(x * y)) - Float64(4.0 * Float64(a * Float64(z * t)))) / Float64(z * c));
	else
		tmp = Float64(Float64(Float64(Float64(t * a) * -4.0) + Float64(b / z)) * Float64(1.0 / c));
	end
	return tmp
end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
	tmp = 0.0;
	if ((x <= -3.9e+102) || ~((x <= 2.6e-56)))
		tmp = ((9.0 * (x * y)) - (4.0 * (a * (z * t)))) / (z * c);
	else
		tmp = (((t * a) * -4.0) + (b / z)) * (1.0 / c);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[x, -3.9e+102], N[Not[LessEqual[x, 2.6e-56]], $MachinePrecision]], N[(N[(N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.9 \cdot 10^{+102} \lor \neg \left(x \leq 2.6 \cdot 10^{-56}\right):\\
\;\;\;\;\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{z \cdot c}\\

\mathbf{else}:\\
\;\;\;\;\left(\left(t \cdot a\right) \cdot -4 + \frac{b}{z}\right) \cdot \frac{1}{c}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.8999999999999998e102 or 2.59999999999999997e-56 < x

    1. Initial program 82.7%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. associate-+l-82.7%

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y - \left(\left(\left(z \cdot 4\right) \cdot t\right) \cdot a - b\right)}}{z \cdot c} \]
      2. *-commutative82.7%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*82.6%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t} - b\right)}{z \cdot c} \]
      4. *-commutative82.6%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t - b\right)}{z \cdot c} \]
      5. associate-+l-82.6%

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
      6. *-commutative82.6%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right)} \cdot t\right) + b}{z \cdot c} \]
      7. associate-*r*82.7%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      8. *-commutative82.7%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      9. associate-*l*82.7%

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      10. associate-*l*85.3%

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

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around 0 69.4%

      \[\leadsto \color{blue}{\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z}} \]

    if -3.8999999999999998e102 < x < 2.59999999999999997e-56

    1. Initial program 82.3%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. associate-+l-82.3%

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

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*82.3%

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

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t - b\right)}{z \cdot c} \]
      5. associate-+l-82.3%

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

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right)} \cdot t\right) + b}{z \cdot c} \]
      7. associate-*r*82.3%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      8. *-commutative82.3%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      9. associate-*l*82.3%

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      10. associate-*l*83.1%

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

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-/r*86.2%

        \[\leadsto \color{blue}{\frac{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z}}{c}} \]
      2. div-inv86.1%

        \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z} \cdot \frac{1}{c}} \]
      3. fma-neg86.1%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x, 9 \cdot y, -\left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)} + b}{z} \cdot \frac{1}{c} \]
      4. associate-*r*82.8%

        \[\leadsto \frac{\mathsf{fma}\left(x, 9 \cdot y, -\color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z} \cdot \frac{1}{c} \]
      5. distribute-lft-neg-in82.8%

        \[\leadsto \frac{\mathsf{fma}\left(x, 9 \cdot y, \color{blue}{\left(-\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z} \cdot \frac{1}{c} \]
      6. *-commutative82.8%

        \[\leadsto \frac{\mathsf{fma}\left(x, 9 \cdot y, \color{blue}{a \cdot \left(-\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z} \cdot \frac{1}{c} \]
      7. *-commutative82.8%

        \[\leadsto \frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(-\color{blue}{t \cdot \left(z \cdot 4\right)}\right)\right) + b}{z} \cdot \frac{1}{c} \]
      8. distribute-rgt-neg-in82.8%

        \[\leadsto \frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \color{blue}{\left(t \cdot \left(-z \cdot 4\right)\right)}\right) + b}{z} \cdot \frac{1}{c} \]
      9. distribute-rgt-neg-in82.8%

        \[\leadsto \frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(t \cdot \color{blue}{\left(z \cdot \left(-4\right)\right)}\right)\right) + b}{z} \cdot \frac{1}{c} \]
      10. metadata-eval82.8%

        \[\leadsto \frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(t \cdot \left(z \cdot \color{blue}{-4}\right)\right)\right) + b}{z} \cdot \frac{1}{c} \]
    6. Applied egg-rr82.8%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z} \cdot \frac{1}{c}} \]
    7. Taylor expanded in x around 0 72.0%

      \[\leadsto \color{blue}{\frac{b + -4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{z}} \cdot \frac{1}{c} \]
    8. Taylor expanded in b around 0 77.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.9 \cdot 10^{+102} \lor \neg \left(x \leq 2.6 \cdot 10^{-56}\right):\\ \;\;\;\;\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(t \cdot a\right) \cdot -4 + \frac{b}{z}\right) \cdot \frac{1}{c}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 50.2% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := 9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\ \mathbf{if}\;y \leq -1.5 \cdot 10^{-7}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -3.9 \cdot 10^{-227}:\\ \;\;\;\;\frac{a \cdot -4}{\frac{c}{t}}\\ \mathbf{elif}\;y \leq 2 \cdot 10^{-285}:\\ \;\;\;\;\frac{1}{\frac{z}{\frac{b}{c}}}\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-31}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c}\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{+111}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (* 9.0 (* (/ y c) (/ x z)))))
   (if (<= y -1.5e-7)
     t_1
     (if (<= y -3.9e-227)
       (/ (* a -4.0) (/ c t))
       (if (<= y 2e-285)
         (/ 1.0 (/ z (/ b c)))
         (if (<= y 1.25e-31)
           (* t (/ (* a -4.0) c))
           (if (<= y 1.3e+111) (/ b (* z c)) t_1)))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = 9.0 * ((y / c) * (x / z));
	double tmp;
	if (y <= -1.5e-7) {
		tmp = t_1;
	} else if (y <= -3.9e-227) {
		tmp = (a * -4.0) / (c / t);
	} else if (y <= 2e-285) {
		tmp = 1.0 / (z / (b / c));
	} else if (y <= 1.25e-31) {
		tmp = t * ((a * -4.0) / c);
	} else if (y <= 1.3e+111) {
		tmp = b / (z * c);
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 9.0d0 * ((y / c) * (x / z))
    if (y <= (-1.5d-7)) then
        tmp = t_1
    else if (y <= (-3.9d-227)) then
        tmp = (a * (-4.0d0)) / (c / t)
    else if (y <= 2d-285) then
        tmp = 1.0d0 / (z / (b / c))
    else if (y <= 1.25d-31) then
        tmp = t * ((a * (-4.0d0)) / c)
    else if (y <= 1.3d+111) then
        tmp = b / (z * c)
    else
        tmp = t_1
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = 9.0 * ((y / c) * (x / z));
	double tmp;
	if (y <= -1.5e-7) {
		tmp = t_1;
	} else if (y <= -3.9e-227) {
		tmp = (a * -4.0) / (c / t);
	} else if (y <= 2e-285) {
		tmp = 1.0 / (z / (b / c));
	} else if (y <= 1.25e-31) {
		tmp = t * ((a * -4.0) / c);
	} else if (y <= 1.3e+111) {
		tmp = b / (z * c);
	} else {
		tmp = t_1;
	}
	return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
def code(x, y, z, t, a, b, c):
	t_1 = 9.0 * ((y / c) * (x / z))
	tmp = 0
	if y <= -1.5e-7:
		tmp = t_1
	elif y <= -3.9e-227:
		tmp = (a * -4.0) / (c / t)
	elif y <= 2e-285:
		tmp = 1.0 / (z / (b / c))
	elif y <= 1.25e-31:
		tmp = t * ((a * -4.0) / c)
	elif y <= 1.3e+111:
		tmp = b / (z * c)
	else:
		tmp = t_1
	return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
function code(x, y, z, t, a, b, c)
	t_1 = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z)))
	tmp = 0.0
	if (y <= -1.5e-7)
		tmp = t_1;
	elseif (y <= -3.9e-227)
		tmp = Float64(Float64(a * -4.0) / Float64(c / t));
	elseif (y <= 2e-285)
		tmp = Float64(1.0 / Float64(z / Float64(b / c)));
	elseif (y <= 1.25e-31)
		tmp = Float64(t * Float64(Float64(a * -4.0) / c));
	elseif (y <= 1.3e+111)
		tmp = Float64(b / Float64(z * c));
	else
		tmp = t_1;
	end
	return tmp
end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = 9.0 * ((y / c) * (x / z));
	tmp = 0.0;
	if (y <= -1.5e-7)
		tmp = t_1;
	elseif (y <= -3.9e-227)
		tmp = (a * -4.0) / (c / t);
	elseif (y <= 2e-285)
		tmp = 1.0 / (z / (b / c));
	elseif (y <= 1.25e-31)
		tmp = t * ((a * -4.0) / c);
	elseif (y <= 1.3e+111)
		tmp = b / (z * c);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.5e-7], t$95$1, If[LessEqual[y, -3.9e-227], N[(N[(a * -4.0), $MachinePrecision] / N[(c / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e-285], N[(1.0 / N[(z / N[(b / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.25e-31], N[(t * N[(N[(a * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e+111], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\mathbf{if}\;y \leq -1.5 \cdot 10^{-7}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -3.9 \cdot 10^{-227}:\\
\;\;\;\;\frac{a \cdot -4}{\frac{c}{t}}\\

\mathbf{elif}\;y \leq 2 \cdot 10^{-285}:\\
\;\;\;\;\frac{1}{\frac{z}{\frac{b}{c}}}\\

\mathbf{elif}\;y \leq 1.25 \cdot 10^{-31}:\\
\;\;\;\;t \cdot \frac{a \cdot -4}{c}\\

\mathbf{elif}\;y \leq 1.3 \cdot 10^{+111}:\\
\;\;\;\;\frac{b}{z \cdot c}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.4999999999999999e-7 or 1.2999999999999999e111 < y

    1. Initial program 82.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. associate-+l-82.4%

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y - \left(\left(\left(z \cdot 4\right) \cdot t\right) \cdot a - b\right)}}{z \cdot c} \]
      2. *-commutative82.4%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*81.6%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t} - b\right)}{z \cdot c} \]
      4. *-commutative81.6%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t - b\right)}{z \cdot c} \]
      5. associate-+l-81.6%

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
      6. *-commutative81.6%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right)} \cdot t\right) + b}{z \cdot c} \]
      7. associate-*r*82.4%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      8. *-commutative82.4%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      9. associate-*l*82.4%

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      10. associate-*l*82.4%

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

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 44.1%

      \[\leadsto \color{blue}{9 \cdot \frac{x \cdot y}{c \cdot z}} \]
    6. Step-by-step derivation
      1. *-commutative44.1%

        \[\leadsto 9 \cdot \frac{x \cdot y}{\color{blue}{z \cdot c}} \]
      2. times-frac51.5%

        \[\leadsto 9 \cdot \color{blue}{\left(\frac{x}{z} \cdot \frac{y}{c}\right)} \]
    7. Simplified51.5%

      \[\leadsto \color{blue}{9 \cdot \left(\frac{x}{z} \cdot \frac{y}{c}\right)} \]

    if -1.4999999999999999e-7 < y < -3.8999999999999999e-227

    1. Initial program 85.5%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. associate-+l-85.5%

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y - \left(\left(\left(z \cdot 4\right) \cdot t\right) \cdot a - b\right)}}{z \cdot c} \]
      2. *-commutative85.5%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*81.0%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t} - b\right)}{z \cdot c} \]
      4. *-commutative81.0%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t - b\right)}{z \cdot c} \]
      5. associate-+l-81.0%

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
      6. *-commutative81.0%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right)} \cdot t\right) + b}{z \cdot c} \]
      7. associate-*r*85.5%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      8. *-commutative85.5%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      9. associate-*l*85.4%

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      10. associate-*l*85.6%

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{\left(z \cdot 4\right) \cdot \left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified85.6%

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 50.0%

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    6. Step-by-step derivation
      1. *-commutative50.0%

        \[\leadsto \color{blue}{\frac{a \cdot t}{c} \cdot -4} \]
      2. associate-/l*52.1%

        \[\leadsto \color{blue}{\frac{a}{\frac{c}{t}}} \cdot -4 \]
      3. associate-*l/52.1%

        \[\leadsto \color{blue}{\frac{a \cdot -4}{\frac{c}{t}}} \]
    7. Simplified52.1%

      \[\leadsto \color{blue}{\frac{a \cdot -4}{\frac{c}{t}}} \]

    if -3.8999999999999999e-227 < y < 2.00000000000000015e-285

    1. Initial program 88.7%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. associate-+l-88.7%

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y - \left(\left(\left(z \cdot 4\right) \cdot t\right) \cdot a - b\right)}}{z \cdot c} \]
      2. *-commutative88.7%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*88.9%

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

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t - b\right)}{z \cdot c} \]
      5. associate-+l-88.9%

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
      6. *-commutative88.9%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right)} \cdot t\right) + b}{z \cdot c} \]
      7. associate-*r*88.7%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      8. *-commutative88.7%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      9. associate-*l*88.6%

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      10. associate-*l*88.7%

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{\left(z \cdot 4\right) \cdot \left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified88.7%

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 49.2%

      \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
    6. Step-by-step derivation
      1. *-commutative49.2%

        \[\leadsto \frac{b}{\color{blue}{z \cdot c}} \]
    7. Simplified49.2%

      \[\leadsto \color{blue}{\frac{b}{z \cdot c}} \]
    8. Step-by-step derivation
      1. clear-num49.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot c}{b}}} \]
      2. inv-pow49.2%

        \[\leadsto \color{blue}{{\left(\frac{z \cdot c}{b}\right)}^{-1}} \]
    9. Applied egg-rr49.2%

      \[\leadsto \color{blue}{{\left(\frac{z \cdot c}{b}\right)}^{-1}} \]
    10. Step-by-step derivation
      1. unpow-149.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot c}{b}}} \]
      2. associate-/l*54.5%

        \[\leadsto \frac{1}{\color{blue}{\frac{z}{\frac{b}{c}}}} \]
    11. Simplified54.5%

      \[\leadsto \color{blue}{\frac{1}{\frac{z}{\frac{b}{c}}}} \]

    if 2.00000000000000015e-285 < y < 1.25e-31

    1. Initial program 74.1%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. associate-+l-74.1%

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y - \left(\left(\left(z \cdot 4\right) \cdot t\right) \cdot a - b\right)}}{z \cdot c} \]
      2. *-commutative74.1%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*79.8%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t} - b\right)}{z \cdot c} \]
      4. *-commutative79.8%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t - b\right)}{z \cdot c} \]
      5. associate-+l-79.8%

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
      6. *-commutative79.8%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right)} \cdot t\right) + b}{z \cdot c} \]
      7. associate-*r*74.1%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      8. *-commutative74.1%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      9. associate-*l*74.0%

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      10. associate-*l*81.9%

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

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 55.6%

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    6. Step-by-step derivation
      1. *-commutative55.6%

        \[\leadsto \color{blue}{\frac{a \cdot t}{c} \cdot -4} \]
      2. associate-/l*53.7%

        \[\leadsto \color{blue}{\frac{a}{\frac{c}{t}}} \cdot -4 \]
      3. associate-*l/53.7%

        \[\leadsto \color{blue}{\frac{a \cdot -4}{\frac{c}{t}}} \]
    7. Simplified53.7%

      \[\leadsto \color{blue}{\frac{a \cdot -4}{\frac{c}{t}}} \]
    8. Step-by-step derivation
      1. associate-/r/57.5%

        \[\leadsto \color{blue}{\frac{a \cdot -4}{c} \cdot t} \]
    9. Applied egg-rr57.5%

      \[\leadsto \color{blue}{\frac{a \cdot -4}{c} \cdot t} \]

    if 1.25e-31 < y < 1.2999999999999999e111

    1. Initial program 88.1%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. associate-+l-88.1%

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y - \left(\left(\left(z \cdot 4\right) \cdot t\right) \cdot a - b\right)}}{z \cdot c} \]
      2. *-commutative88.1%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*88.1%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t} - b\right)}{z \cdot c} \]
      4. *-commutative88.1%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t - b\right)}{z \cdot c} \]
      5. associate-+l-88.1%

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
      6. *-commutative88.1%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right)} \cdot t\right) + b}{z \cdot c} \]
      7. associate-*r*88.1%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      8. *-commutative88.1%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      9. associate-*l*88.1%

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      10. associate-*l*88.1%

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

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 54.2%

      \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
    6. Step-by-step derivation
      1. *-commutative54.2%

        \[\leadsto \frac{b}{\color{blue}{z \cdot c}} \]
    7. Simplified54.2%

      \[\leadsto \color{blue}{\frac{b}{z \cdot c}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification53.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.5 \cdot 10^{-7}:\\ \;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\ \mathbf{elif}\;y \leq -3.9 \cdot 10^{-227}:\\ \;\;\;\;\frac{a \cdot -4}{\frac{c}{t}}\\ \mathbf{elif}\;y \leq 2 \cdot 10^{-285}:\\ \;\;\;\;\frac{1}{\frac{z}{\frac{b}{c}}}\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-31}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c}\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{+111}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 50.2% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{-7}:\\ \;\;\;\;\frac{y}{\frac{c}{\frac{x}{\frac{z}{9}}}}\\ \mathbf{elif}\;y \leq -2.4 \cdot 10^{-224}:\\ \;\;\;\;\frac{a \cdot -4}{\frac{c}{t}}\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-285}:\\ \;\;\;\;\frac{1}{\frac{z}{\frac{b}{c}}}\\ \mathbf{elif}\;y \leq 1.6 \cdot 10^{-31}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c}\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{+110}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (if (<= y -1.7e-7)
   (/ y (/ c (/ x (/ z 9.0))))
   (if (<= y -2.4e-224)
     (/ (* a -4.0) (/ c t))
     (if (<= y 2.7e-285)
       (/ 1.0 (/ z (/ b c)))
       (if (<= y 1.6e-31)
         (* t (/ (* a -4.0) c))
         (if (<= y 2.1e+110) (/ b (* z c)) (* 9.0 (* (/ y c) (/ x z)))))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if (y <= -1.7e-7) {
		tmp = y / (c / (x / (z / 9.0)));
	} else if (y <= -2.4e-224) {
		tmp = (a * -4.0) / (c / t);
	} else if (y <= 2.7e-285) {
		tmp = 1.0 / (z / (b / c));
	} else if (y <= 1.6e-31) {
		tmp = t * ((a * -4.0) / c);
	} else if (y <= 2.1e+110) {
		tmp = b / (z * c);
	} else {
		tmp = 9.0 * ((y / c) * (x / z));
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (y <= (-1.7d-7)) then
        tmp = y / (c / (x / (z / 9.0d0)))
    else if (y <= (-2.4d-224)) then
        tmp = (a * (-4.0d0)) / (c / t)
    else if (y <= 2.7d-285) then
        tmp = 1.0d0 / (z / (b / c))
    else if (y <= 1.6d-31) then
        tmp = t * ((a * (-4.0d0)) / c)
    else if (y <= 2.1d+110) then
        tmp = b / (z * c)
    else
        tmp = 9.0d0 * ((y / c) * (x / z))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if (y <= -1.7e-7) {
		tmp = y / (c / (x / (z / 9.0)));
	} else if (y <= -2.4e-224) {
		tmp = (a * -4.0) / (c / t);
	} else if (y <= 2.7e-285) {
		tmp = 1.0 / (z / (b / c));
	} else if (y <= 1.6e-31) {
		tmp = t * ((a * -4.0) / c);
	} else if (y <= 2.1e+110) {
		tmp = b / (z * c);
	} else {
		tmp = 9.0 * ((y / c) * (x / z));
	}
	return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
def code(x, y, z, t, a, b, c):
	tmp = 0
	if y <= -1.7e-7:
		tmp = y / (c / (x / (z / 9.0)))
	elif y <= -2.4e-224:
		tmp = (a * -4.0) / (c / t)
	elif y <= 2.7e-285:
		tmp = 1.0 / (z / (b / c))
	elif y <= 1.6e-31:
		tmp = t * ((a * -4.0) / c)
	elif y <= 2.1e+110:
		tmp = b / (z * c)
	else:
		tmp = 9.0 * ((y / c) * (x / z))
	return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if (y <= -1.7e-7)
		tmp = Float64(y / Float64(c / Float64(x / Float64(z / 9.0))));
	elseif (y <= -2.4e-224)
		tmp = Float64(Float64(a * -4.0) / Float64(c / t));
	elseif (y <= 2.7e-285)
		tmp = Float64(1.0 / Float64(z / Float64(b / c)));
	elseif (y <= 1.6e-31)
		tmp = Float64(t * Float64(Float64(a * -4.0) / c));
	elseif (y <= 2.1e+110)
		tmp = Float64(b / Float64(z * c));
	else
		tmp = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z)));
	end
	return tmp
end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
	tmp = 0.0;
	if (y <= -1.7e-7)
		tmp = y / (c / (x / (z / 9.0)));
	elseif (y <= -2.4e-224)
		tmp = (a * -4.0) / (c / t);
	elseif (y <= 2.7e-285)
		tmp = 1.0 / (z / (b / c));
	elseif (y <= 1.6e-31)
		tmp = t * ((a * -4.0) / c);
	elseif (y <= 2.1e+110)
		tmp = b / (z * c);
	else
		tmp = 9.0 * ((y / c) * (x / z));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[y, -1.7e-7], N[(y / N[(c / N[(x / N[(z / 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.4e-224], N[(N[(a * -4.0), $MachinePrecision] / N[(c / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e-285], N[(1.0 / N[(z / N[(b / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.6e-31], N[(t * N[(N[(a * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+110], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{-7}:\\
\;\;\;\;\frac{y}{\frac{c}{\frac{x}{\frac{z}{9}}}}\\

\mathbf{elif}\;y \leq -2.4 \cdot 10^{-224}:\\
\;\;\;\;\frac{a \cdot -4}{\frac{c}{t}}\\

\mathbf{elif}\;y \leq 2.7 \cdot 10^{-285}:\\
\;\;\;\;\frac{1}{\frac{z}{\frac{b}{c}}}\\

\mathbf{elif}\;y \leq 1.6 \cdot 10^{-31}:\\
\;\;\;\;t \cdot \frac{a \cdot -4}{c}\\

\mathbf{elif}\;y \leq 2.1 \cdot 10^{+110}:\\
\;\;\;\;\frac{b}{z \cdot c}\\

\mathbf{else}:\\
\;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -1.69999999999999987e-7

    1. Initial program 84.9%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. associate-+l-84.9%

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y - \left(\left(\left(z \cdot 4\right) \cdot t\right) \cdot a - b\right)}}{z \cdot c} \]
      2. *-commutative84.9%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*85.1%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t} - b\right)}{z \cdot c} \]
      4. *-commutative85.1%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t - b\right)}{z \cdot c} \]
      5. associate-+l-85.1%

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
      6. *-commutative85.1%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right)} \cdot t\right) + b}{z \cdot c} \]
      7. associate-*r*84.9%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      8. *-commutative84.9%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      9. associate-*l*84.9%

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      10. associate-*l*85.0%

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{\left(z \cdot 4\right) \cdot \left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified85.0%

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-un-lft-identity85.0%

        \[\leadsto \frac{\color{blue}{1 \cdot \left(\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b\right)}}{z \cdot c} \]
      2. add-cube-cbrt84.5%

        \[\leadsto \frac{1 \cdot \left(\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b\right)}{\color{blue}{\left(\sqrt[3]{z \cdot c} \cdot \sqrt[3]{z \cdot c}\right) \cdot \sqrt[3]{z \cdot c}}} \]
      3. times-frac84.5%

        \[\leadsto \color{blue}{\frac{1}{\sqrt[3]{z \cdot c} \cdot \sqrt[3]{z \cdot c}} \cdot \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{\sqrt[3]{z \cdot c}}} \]
      4. pow284.5%

        \[\leadsto \frac{1}{\color{blue}{{\left(\sqrt[3]{z \cdot c}\right)}^{2}}} \cdot \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{\sqrt[3]{z \cdot c}} \]
    6. Applied egg-rr84.4%

      \[\leadsto \color{blue}{\frac{1}{{\left(\sqrt[3]{z \cdot c}\right)}^{2}} \cdot \frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{\sqrt[3]{z \cdot c}}} \]
    7. Step-by-step derivation
      1. associate-*l/84.5%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{\sqrt[3]{z \cdot c}}}{{\left(\sqrt[3]{z \cdot c}\right)}^{2}}} \]
      2. *-lft-identity84.5%

        \[\leadsto \frac{\color{blue}{\frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{\sqrt[3]{z \cdot c}}}}{{\left(\sqrt[3]{z \cdot c}\right)}^{2}} \]
      3. +-commutative84.5%

        \[\leadsto \frac{\frac{\color{blue}{b + \mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right)}}{\sqrt[3]{z \cdot c}}}{{\left(\sqrt[3]{z \cdot c}\right)}^{2}} \]
      4. fma-def84.5%

        \[\leadsto \frac{\frac{b + \color{blue}{\left(x \cdot \left(9 \cdot y\right) + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right)}}{\sqrt[3]{z \cdot c}}}{{\left(\sqrt[3]{z \cdot c}\right)}^{2}} \]
      5. associate-+r+84.5%

        \[\leadsto \frac{\frac{\color{blue}{\left(b + x \cdot \left(9 \cdot y\right)\right) + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)}}{\sqrt[3]{z \cdot c}}}{{\left(\sqrt[3]{z \cdot c}\right)}^{2}} \]
      6. +-commutative84.5%

        \[\leadsto \frac{\frac{\color{blue}{\left(x \cdot \left(9 \cdot y\right) + b\right)} + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)}{\sqrt[3]{z \cdot c}}}{{\left(\sqrt[3]{z \cdot c}\right)}^{2}} \]
      7. fma-def84.5%

        \[\leadsto \frac{\frac{\color{blue}{\mathsf{fma}\left(x, 9 \cdot y, b\right)} + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)}{\sqrt[3]{z \cdot c}}}{{\left(\sqrt[3]{z \cdot c}\right)}^{2}} \]
    8. Simplified84.5%

      \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(x, 9 \cdot y, b\right) + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)}{\sqrt[3]{z \cdot c}}}{{\left(\sqrt[3]{z \cdot c}\right)}^{2}}} \]
    9. Taylor expanded in a around 0 84.5%

      \[\leadsto \frac{\frac{\mathsf{fma}\left(x, 9 \cdot y, b\right) + \color{blue}{-4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}}{\sqrt[3]{z \cdot c}}}{{\left(\sqrt[3]{z \cdot c}\right)}^{2}} \]
    10. Step-by-step derivation
      1. associate-*r*84.5%

        \[\leadsto \frac{\frac{\mathsf{fma}\left(x, 9 \cdot y, b\right) + -4 \cdot \color{blue}{\left(\left(a \cdot t\right) \cdot z\right)}}{\sqrt[3]{z \cdot c}}}{{\left(\sqrt[3]{z \cdot c}\right)}^{2}} \]
      2. *-commutative84.5%

        \[\leadsto \frac{\frac{\mathsf{fma}\left(x, 9 \cdot y, b\right) + -4 \cdot \left(\color{blue}{\left(t \cdot a\right)} \cdot z\right)}{\sqrt[3]{z \cdot c}}}{{\left(\sqrt[3]{z \cdot c}\right)}^{2}} \]
      3. associate-*l*84.6%

        \[\leadsto \frac{\frac{\mathsf{fma}\left(x, 9 \cdot y, b\right) + -4 \cdot \color{blue}{\left(t \cdot \left(a \cdot z\right)\right)}}{\sqrt[3]{z \cdot c}}}{{\left(\sqrt[3]{z \cdot c}\right)}^{2}} \]
    11. Simplified84.6%

      \[\leadsto \frac{\frac{\mathsf{fma}\left(x, 9 \cdot y, b\right) + \color{blue}{-4 \cdot \left(t \cdot \left(a \cdot z\right)\right)}}{\sqrt[3]{z \cdot c}}}{{\left(\sqrt[3]{z \cdot c}\right)}^{2}} \]
    12. Taylor expanded in x around inf 38.1%

      \[\leadsto \color{blue}{9 \cdot \frac{x \cdot y}{c \cdot z}} \]
    13. Step-by-step derivation
      1. *-commutative38.1%

        \[\leadsto 9 \cdot \frac{x \cdot y}{\color{blue}{z \cdot c}} \]
      2. times-frac41.9%

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

        \[\leadsto \color{blue}{\left(9 \cdot \frac{x}{z}\right) \cdot \frac{y}{c}} \]
      4. associate-*r/41.8%

        \[\leadsto \color{blue}{\frac{9 \cdot x}{z}} \cdot \frac{y}{c} \]
      5. associate-/l*41.9%

        \[\leadsto \color{blue}{\frac{9}{\frac{z}{x}}} \cdot \frac{y}{c} \]
      6. associate-*r/36.9%

        \[\leadsto \color{blue}{\frac{\frac{9}{\frac{z}{x}} \cdot y}{c}} \]
      7. *-commutative36.9%

        \[\leadsto \frac{\color{blue}{y \cdot \frac{9}{\frac{z}{x}}}}{c} \]
      8. associate-/l*35.5%

        \[\leadsto \color{blue}{\frac{y}{\frac{c}{\frac{9}{\frac{z}{x}}}}} \]
      9. associate-/l*35.4%

        \[\leadsto \frac{y}{\frac{c}{\color{blue}{\frac{9 \cdot x}{z}}}} \]
      10. *-commutative35.4%

        \[\leadsto \frac{y}{\frac{c}{\frac{\color{blue}{x \cdot 9}}{z}}} \]
      11. associate-/l*35.4%

        \[\leadsto \frac{y}{\frac{c}{\color{blue}{\frac{x}{\frac{z}{9}}}}} \]
    14. Simplified35.4%

      \[\leadsto \color{blue}{\frac{y}{\frac{c}{\frac{x}{\frac{z}{9}}}}} \]

    if -1.69999999999999987e-7 < y < -2.40000000000000014e-224

    1. Initial program 85.5%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. associate-+l-85.5%

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y - \left(\left(\left(z \cdot 4\right) \cdot t\right) \cdot a - b\right)}}{z \cdot c} \]
      2. *-commutative85.5%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*81.0%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t} - b\right)}{z \cdot c} \]
      4. *-commutative81.0%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t - b\right)}{z \cdot c} \]
      5. associate-+l-81.0%

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
      6. *-commutative81.0%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right)} \cdot t\right) + b}{z \cdot c} \]
      7. associate-*r*85.5%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      8. *-commutative85.5%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      9. associate-*l*85.4%

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      10. associate-*l*85.6%

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{\left(z \cdot 4\right) \cdot \left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified85.6%

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 50.0%

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    6. Step-by-step derivation
      1. *-commutative50.0%

        \[\leadsto \color{blue}{\frac{a \cdot t}{c} \cdot -4} \]
      2. associate-/l*52.1%

        \[\leadsto \color{blue}{\frac{a}{\frac{c}{t}}} \cdot -4 \]
      3. associate-*l/52.1%

        \[\leadsto \color{blue}{\frac{a \cdot -4}{\frac{c}{t}}} \]
    7. Simplified52.1%

      \[\leadsto \color{blue}{\frac{a \cdot -4}{\frac{c}{t}}} \]

    if -2.40000000000000014e-224 < y < 2.6999999999999998e-285

    1. Initial program 88.7%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. associate-+l-88.7%

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y - \left(\left(\left(z \cdot 4\right) \cdot t\right) \cdot a - b\right)}}{z \cdot c} \]
      2. *-commutative88.7%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*88.9%

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

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t - b\right)}{z \cdot c} \]
      5. associate-+l-88.9%

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
      6. *-commutative88.9%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right)} \cdot t\right) + b}{z \cdot c} \]
      7. associate-*r*88.7%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      8. *-commutative88.7%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      9. associate-*l*88.6%

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      10. associate-*l*88.7%

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{\left(z \cdot 4\right) \cdot \left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified88.7%

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 49.2%

      \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
    6. Step-by-step derivation
      1. *-commutative49.2%

        \[\leadsto \frac{b}{\color{blue}{z \cdot c}} \]
    7. Simplified49.2%

      \[\leadsto \color{blue}{\frac{b}{z \cdot c}} \]
    8. Step-by-step derivation
      1. clear-num49.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot c}{b}}} \]
      2. inv-pow49.2%

        \[\leadsto \color{blue}{{\left(\frac{z \cdot c}{b}\right)}^{-1}} \]
    9. Applied egg-rr49.2%

      \[\leadsto \color{blue}{{\left(\frac{z \cdot c}{b}\right)}^{-1}} \]
    10. Step-by-step derivation
      1. unpow-149.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot c}{b}}} \]
      2. associate-/l*54.5%

        \[\leadsto \frac{1}{\color{blue}{\frac{z}{\frac{b}{c}}}} \]
    11. Simplified54.5%

      \[\leadsto \color{blue}{\frac{1}{\frac{z}{\frac{b}{c}}}} \]

    if 2.6999999999999998e-285 < y < 1.60000000000000009e-31

    1. Initial program 74.1%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. associate-+l-74.1%

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y - \left(\left(\left(z \cdot 4\right) \cdot t\right) \cdot a - b\right)}}{z \cdot c} \]
      2. *-commutative74.1%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*79.8%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t} - b\right)}{z \cdot c} \]
      4. *-commutative79.8%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t - b\right)}{z \cdot c} \]
      5. associate-+l-79.8%

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
      6. *-commutative79.8%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right)} \cdot t\right) + b}{z \cdot c} \]
      7. associate-*r*74.1%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      8. *-commutative74.1%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      9. associate-*l*74.0%

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      10. associate-*l*81.9%

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

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 55.6%

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    6. Step-by-step derivation
      1. *-commutative55.6%

        \[\leadsto \color{blue}{\frac{a \cdot t}{c} \cdot -4} \]
      2. associate-/l*53.7%

        \[\leadsto \color{blue}{\frac{a}{\frac{c}{t}}} \cdot -4 \]
      3. associate-*l/53.7%

        \[\leadsto \color{blue}{\frac{a \cdot -4}{\frac{c}{t}}} \]
    7. Simplified53.7%

      \[\leadsto \color{blue}{\frac{a \cdot -4}{\frac{c}{t}}} \]
    8. Step-by-step derivation
      1. associate-/r/57.5%

        \[\leadsto \color{blue}{\frac{a \cdot -4}{c} \cdot t} \]
    9. Applied egg-rr57.5%

      \[\leadsto \color{blue}{\frac{a \cdot -4}{c} \cdot t} \]

    if 1.60000000000000009e-31 < y < 2.10000000000000015e110

    1. Initial program 88.1%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. associate-+l-88.1%

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y - \left(\left(\left(z \cdot 4\right) \cdot t\right) \cdot a - b\right)}}{z \cdot c} \]
      2. *-commutative88.1%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*88.1%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t} - b\right)}{z \cdot c} \]
      4. *-commutative88.1%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t - b\right)}{z \cdot c} \]
      5. associate-+l-88.1%

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
      6. *-commutative88.1%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right)} \cdot t\right) + b}{z \cdot c} \]
      7. associate-*r*88.1%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      8. *-commutative88.1%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      9. associate-*l*88.1%

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      10. associate-*l*88.1%

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

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 54.2%

      \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
    6. Step-by-step derivation
      1. *-commutative54.2%

        \[\leadsto \frac{b}{\color{blue}{z \cdot c}} \]
    7. Simplified54.2%

      \[\leadsto \color{blue}{\frac{b}{z \cdot c}} \]

    if 2.10000000000000015e110 < y

    1. Initial program 77.8%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. associate-+l-77.8%

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y - \left(\left(\left(z \cdot 4\right) \cdot t\right) \cdot a - b\right)}}{z \cdot c} \]
      2. *-commutative77.8%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*75.4%

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

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t - b\right)}{z \cdot c} \]
      5. associate-+l-75.4%

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
      6. *-commutative75.4%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right)} \cdot t\right) + b}{z \cdot c} \]
      7. associate-*r*77.8%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      8. *-commutative77.8%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      9. associate-*l*77.8%

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      10. associate-*l*77.8%

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{\left(z \cdot 4\right) \cdot \left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified77.8%

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 54.8%

      \[\leadsto \color{blue}{9 \cdot \frac{x \cdot y}{c \cdot z}} \]
    6. Step-by-step derivation
      1. *-commutative54.8%

        \[\leadsto 9 \cdot \frac{x \cdot y}{\color{blue}{z \cdot c}} \]
      2. times-frac68.4%

        \[\leadsto 9 \cdot \color{blue}{\left(\frac{x}{z} \cdot \frac{y}{c}\right)} \]
    7. Simplified68.4%

      \[\leadsto \color{blue}{9 \cdot \left(\frac{x}{z} \cdot \frac{y}{c}\right)} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification51.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{-7}:\\ \;\;\;\;\frac{y}{\frac{c}{\frac{x}{\frac{z}{9}}}}\\ \mathbf{elif}\;y \leq -2.4 \cdot 10^{-224}:\\ \;\;\;\;\frac{a \cdot -4}{\frac{c}{t}}\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-285}:\\ \;\;\;\;\frac{1}{\frac{z}{\frac{b}{c}}}\\ \mathbf{elif}\;y \leq 1.6 \cdot 10^{-31}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c}\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{+110}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 68.4% accurate, 1.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -1.06 \cdot 10^{+265}:\\ \;\;\;\;\frac{x}{\frac{z}{9} \cdot \frac{c}{y}}\\ \mathbf{elif}\;x \leq 10^{+27}:\\ \;\;\;\;\left(\left(t \cdot a\right) \cdot -4 + \frac{b}{z}\right) \cdot \frac{1}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot 9}{z} \cdot \frac{y}{c}\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (if (<= x -1.06e+265)
   (/ x (* (/ z 9.0) (/ c y)))
   (if (<= x 1e+27)
     (* (+ (* (* t a) -4.0) (/ b z)) (/ 1.0 c))
     (* (/ (* x 9.0) z) (/ y c)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if (x <= -1.06e+265) {
		tmp = x / ((z / 9.0) * (c / y));
	} else if (x <= 1e+27) {
		tmp = (((t * a) * -4.0) + (b / z)) * (1.0 / c);
	} else {
		tmp = ((x * 9.0) / z) * (y / c);
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (x <= (-1.06d+265)) then
        tmp = x / ((z / 9.0d0) * (c / y))
    else if (x <= 1d+27) then
        tmp = (((t * a) * (-4.0d0)) + (b / z)) * (1.0d0 / c)
    else
        tmp = ((x * 9.0d0) / z) * (y / c)
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if (x <= -1.06e+265) {
		tmp = x / ((z / 9.0) * (c / y));
	} else if (x <= 1e+27) {
		tmp = (((t * a) * -4.0) + (b / z)) * (1.0 / c);
	} else {
		tmp = ((x * 9.0) / z) * (y / c);
	}
	return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
def code(x, y, z, t, a, b, c):
	tmp = 0
	if x <= -1.06e+265:
		tmp = x / ((z / 9.0) * (c / y))
	elif x <= 1e+27:
		tmp = (((t * a) * -4.0) + (b / z)) * (1.0 / c)
	else:
		tmp = ((x * 9.0) / z) * (y / c)
	return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if (x <= -1.06e+265)
		tmp = Float64(x / Float64(Float64(z / 9.0) * Float64(c / y)));
	elseif (x <= 1e+27)
		tmp = Float64(Float64(Float64(Float64(t * a) * -4.0) + Float64(b / z)) * Float64(1.0 / c));
	else
		tmp = Float64(Float64(Float64(x * 9.0) / z) * Float64(y / c));
	end
	return tmp
end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
	tmp = 0.0;
	if (x <= -1.06e+265)
		tmp = x / ((z / 9.0) * (c / y));
	elseif (x <= 1e+27)
		tmp = (((t * a) * -4.0) + (b / z)) * (1.0 / c);
	else
		tmp = ((x * 9.0) / z) * (y / c);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[x, -1.06e+265], N[(x / N[(N[(z / 9.0), $MachinePrecision] * N[(c / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1e+27], N[(N[(N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 9.0), $MachinePrecision] / z), $MachinePrecision] * N[(y / c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.06 \cdot 10^{+265}:\\
\;\;\;\;\frac{x}{\frac{z}{9} \cdot \frac{c}{y}}\\

\mathbf{elif}\;x \leq 10^{+27}:\\
\;\;\;\;\left(\left(t \cdot a\right) \cdot -4 + \frac{b}{z}\right) \cdot \frac{1}{c}\\

\mathbf{else}:\\
\;\;\;\;\frac{x \cdot 9}{z} \cdot \frac{y}{c}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.06000000000000003e265

    1. Initial program 82.6%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. associate-+l-82.6%

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y - \left(\left(\left(z \cdot 4\right) \cdot t\right) \cdot a - b\right)}}{z \cdot c} \]
      2. *-commutative82.6%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*82.6%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t} - b\right)}{z \cdot c} \]
      4. *-commutative82.6%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t - b\right)}{z \cdot c} \]
      5. associate-+l-82.6%

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
      6. *-commutative82.6%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right)} \cdot t\right) + b}{z \cdot c} \]
      7. associate-*r*82.6%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      8. *-commutative82.6%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      9. associate-*l*82.6%

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      10. associate-*l*82.6%

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{\left(z \cdot 4\right) \cdot \left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified82.6%

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 70.2%

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

        \[\leadsto \color{blue}{\frac{9 \cdot \left(x \cdot y\right)}{c \cdot z}} \]
      2. associate-*r*70.2%

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

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right)} \cdot y}{c \cdot z} \]
      4. associate-*r*70.2%

        \[\leadsto \frac{\color{blue}{x \cdot \left(9 \cdot y\right)}}{c \cdot z} \]
      5. *-commutative70.2%

        \[\leadsto \frac{x \cdot \left(9 \cdot y\right)}{\color{blue}{z \cdot c}} \]
      6. associate-/l*87.5%

        \[\leadsto \color{blue}{\frac{x}{\frac{z \cdot c}{9 \cdot y}}} \]
      7. times-frac87.6%

        \[\leadsto \frac{x}{\color{blue}{\frac{z}{9} \cdot \frac{c}{y}}} \]
    7. Simplified87.6%

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{9} \cdot \frac{c}{y}}} \]

    if -1.06000000000000003e265 < x < 1e27

    1. Initial program 81.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. associate-+l-81.4%

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y - \left(\left(\left(z \cdot 4\right) \cdot t\right) \cdot a - b\right)}}{z \cdot c} \]
      2. *-commutative81.4%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*81.4%

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

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t - b\right)}{z \cdot c} \]
      5. associate-+l-81.4%

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
      6. *-commutative81.4%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right)} \cdot t\right) + b}{z \cdot c} \]
      7. associate-*r*81.4%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      8. *-commutative81.4%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      9. associate-*l*81.4%

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      10. associate-*l*82.5%

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{\left(z \cdot 4\right) \cdot \left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified82.5%

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-/r*85.2%

        \[\leadsto \color{blue}{\frac{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z}}{c}} \]
      2. div-inv85.2%

        \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z} \cdot \frac{1}{c}} \]
      3. fma-neg85.7%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x, 9 \cdot y, -\left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)} + b}{z} \cdot \frac{1}{c} \]
      4. associate-*r*82.3%

        \[\leadsto \frac{\mathsf{fma}\left(x, 9 \cdot y, -\color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z} \cdot \frac{1}{c} \]
      5. distribute-lft-neg-in82.3%

        \[\leadsto \frac{\mathsf{fma}\left(x, 9 \cdot y, \color{blue}{\left(-\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z} \cdot \frac{1}{c} \]
      6. *-commutative82.3%

        \[\leadsto \frac{\mathsf{fma}\left(x, 9 \cdot y, \color{blue}{a \cdot \left(-\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z} \cdot \frac{1}{c} \]
      7. *-commutative82.3%

        \[\leadsto \frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(-\color{blue}{t \cdot \left(z \cdot 4\right)}\right)\right) + b}{z} \cdot \frac{1}{c} \]
      8. distribute-rgt-neg-in82.3%

        \[\leadsto \frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \color{blue}{\left(t \cdot \left(-z \cdot 4\right)\right)}\right) + b}{z} \cdot \frac{1}{c} \]
      9. distribute-rgt-neg-in82.3%

        \[\leadsto \frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(t \cdot \color{blue}{\left(z \cdot \left(-4\right)\right)}\right)\right) + b}{z} \cdot \frac{1}{c} \]
      10. metadata-eval82.3%

        \[\leadsto \frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(t \cdot \left(z \cdot \color{blue}{-4}\right)\right)\right) + b}{z} \cdot \frac{1}{c} \]
    6. Applied egg-rr82.3%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z} \cdot \frac{1}{c}} \]
    7. Taylor expanded in x around 0 69.1%

      \[\leadsto \color{blue}{\frac{b + -4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{z}} \cdot \frac{1}{c} \]
    8. Taylor expanded in b around 0 74.4%

      \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot t\right) + \frac{b}{z}\right)} \cdot \frac{1}{c} \]

    if 1e27 < x

    1. Initial program 87.1%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. associate-+l-87.1%

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y - \left(\left(\left(z \cdot 4\right) \cdot t\right) \cdot a - b\right)}}{z \cdot c} \]
      2. *-commutative87.1%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*86.9%

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

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t - b\right)}{z \cdot c} \]
      5. associate-+l-86.9%

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
      6. *-commutative86.9%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right)} \cdot t\right) + b}{z \cdot c} \]
      7. associate-*r*87.1%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      8. *-commutative87.1%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      9. associate-*l*87.0%

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      10. associate-*l*91.3%

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

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-un-lft-identity91.3%

        \[\leadsto \frac{\color{blue}{1 \cdot \left(\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b\right)}}{z \cdot c} \]
      2. add-cube-cbrt90.8%

        \[\leadsto \frac{1 \cdot \left(\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b\right)}{\color{blue}{\left(\sqrt[3]{z \cdot c} \cdot \sqrt[3]{z \cdot c}\right) \cdot \sqrt[3]{z \cdot c}}} \]
      3. times-frac90.7%

        \[\leadsto \color{blue}{\frac{1}{\sqrt[3]{z \cdot c} \cdot \sqrt[3]{z \cdot c}} \cdot \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{\sqrt[3]{z \cdot c}}} \]
      4. pow290.7%

        \[\leadsto \frac{1}{\color{blue}{{\left(\sqrt[3]{z \cdot c}\right)}^{2}}} \cdot \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{\sqrt[3]{z \cdot c}} \]
    6. Applied egg-rr86.6%

      \[\leadsto \color{blue}{\frac{1}{{\left(\sqrt[3]{z \cdot c}\right)}^{2}} \cdot \frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{\sqrt[3]{z \cdot c}}} \]
    7. Step-by-step derivation
      1. associate-*l/86.5%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{\sqrt[3]{z \cdot c}}}{{\left(\sqrt[3]{z \cdot c}\right)}^{2}}} \]
      2. *-lft-identity86.5%

        \[\leadsto \frac{\color{blue}{\frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{\sqrt[3]{z \cdot c}}}}{{\left(\sqrt[3]{z \cdot c}\right)}^{2}} \]
      3. +-commutative86.5%

        \[\leadsto \frac{\frac{\color{blue}{b + \mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right)}}{\sqrt[3]{z \cdot c}}}{{\left(\sqrt[3]{z \cdot c}\right)}^{2}} \]
      4. fma-def86.5%

        \[\leadsto \frac{\frac{b + \color{blue}{\left(x \cdot \left(9 \cdot y\right) + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right)}}{\sqrt[3]{z \cdot c}}}{{\left(\sqrt[3]{z \cdot c}\right)}^{2}} \]
      5. associate-+r+86.5%

        \[\leadsto \frac{\frac{\color{blue}{\left(b + x \cdot \left(9 \cdot y\right)\right) + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)}}{\sqrt[3]{z \cdot c}}}{{\left(\sqrt[3]{z \cdot c}\right)}^{2}} \]
      6. +-commutative86.5%

        \[\leadsto \frac{\frac{\color{blue}{\left(x \cdot \left(9 \cdot y\right) + b\right)} + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)}{\sqrt[3]{z \cdot c}}}{{\left(\sqrt[3]{z \cdot c}\right)}^{2}} \]
      7. fma-def86.5%

        \[\leadsto \frac{\frac{\color{blue}{\mathsf{fma}\left(x, 9 \cdot y, b\right)} + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)}{\sqrt[3]{z \cdot c}}}{{\left(\sqrt[3]{z \cdot c}\right)}^{2}} \]
    8. Simplified86.5%

      \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(x, 9 \cdot y, b\right) + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)}{\sqrt[3]{z \cdot c}}}{{\left(\sqrt[3]{z \cdot c}\right)}^{2}}} \]
    9. Taylor expanded in x around inf 51.6%

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

        \[\leadsto \color{blue}{\frac{9 \cdot \left(x \cdot y\right)}{c \cdot z}} \]
      2. associate-*r*51.6%

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

        \[\leadsto \frac{\left(9 \cdot x\right) \cdot y}{\color{blue}{z \cdot c}} \]
      4. times-frac53.7%

        \[\leadsto \color{blue}{\frac{9 \cdot x}{z} \cdot \frac{y}{c}} \]
    11. Simplified53.7%

      \[\leadsto \color{blue}{\frac{9 \cdot x}{z} \cdot \frac{y}{c}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification71.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.06 \cdot 10^{+265}:\\ \;\;\;\;\frac{x}{\frac{z}{9} \cdot \frac{c}{y}}\\ \mathbf{elif}\;x \leq 10^{+27}:\\ \;\;\;\;\left(\left(t \cdot a\right) \cdot -4 + \frac{b}{z}\right) \cdot \frac{1}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot 9}{z} \cdot \frac{y}{c}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 51.3% accurate, 1.7× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} \mathbf{if}\;b \leq -1.75 \cdot 10^{+80} \lor \neg \left(b \leq 5.2 \cdot 10^{-25}\right):\\ \;\;\;\;\frac{b}{c} \cdot \frac{1}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c}\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (if (or (<= b -1.75e+80) (not (<= b 5.2e-25)))
   (* (/ b c) (/ 1.0 z))
   (* t (/ (* a -4.0) c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if ((b <= -1.75e+80) || !(b <= 5.2e-25)) {
		tmp = (b / c) * (1.0 / z);
	} else {
		tmp = t * ((a * -4.0) / c);
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if ((b <= (-1.75d+80)) .or. (.not. (b <= 5.2d-25))) then
        tmp = (b / c) * (1.0d0 / z)
    else
        tmp = t * ((a * (-4.0d0)) / c)
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if ((b <= -1.75e+80) || !(b <= 5.2e-25)) {
		tmp = (b / c) * (1.0 / z);
	} else {
		tmp = t * ((a * -4.0) / c);
	}
	return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
def code(x, y, z, t, a, b, c):
	tmp = 0
	if (b <= -1.75e+80) or not (b <= 5.2e-25):
		tmp = (b / c) * (1.0 / z)
	else:
		tmp = t * ((a * -4.0) / c)
	return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if ((b <= -1.75e+80) || !(b <= 5.2e-25))
		tmp = Float64(Float64(b / c) * Float64(1.0 / z));
	else
		tmp = Float64(t * Float64(Float64(a * -4.0) / c));
	end
	return tmp
end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
	tmp = 0.0;
	if ((b <= -1.75e+80) || ~((b <= 5.2e-25)))
		tmp = (b / c) * (1.0 / z);
	else
		tmp = t * ((a * -4.0) / c);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -1.75e+80], N[Not[LessEqual[b, 5.2e-25]], $MachinePrecision]], N[(N[(b / c), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(a * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.75 \cdot 10^{+80} \lor \neg \left(b \leq 5.2 \cdot 10^{-25}\right):\\
\;\;\;\;\frac{b}{c} \cdot \frac{1}{z}\\

\mathbf{else}:\\
\;\;\;\;t \cdot \frac{a \cdot -4}{c}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.74999999999999997e80 or 5.2e-25 < b

    1. Initial program 85.5%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. associate-+l-85.5%

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y - \left(\left(\left(z \cdot 4\right) \cdot t\right) \cdot a - b\right)}}{z \cdot c} \]
      2. *-commutative85.5%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*86.3%

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

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t - b\right)}{z \cdot c} \]
      5. associate-+l-86.3%

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

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right)} \cdot t\right) + b}{z \cdot c} \]
      7. associate-*r*85.5%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      8. *-commutative85.5%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      9. associate-*l*85.6%

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      10. associate-*l*88.0%

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{\left(z \cdot 4\right) \cdot \left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified88.0%

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-un-lft-identity88.0%

        \[\leadsto \frac{\color{blue}{1 \cdot \left(\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b\right)}}{z \cdot c} \]
      2. times-frac83.4%

        \[\leadsto \color{blue}{\frac{1}{z} \cdot \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{c}} \]
      3. fma-neg84.2%

        \[\leadsto \frac{1}{z} \cdot \frac{\color{blue}{\mathsf{fma}\left(x, 9 \cdot y, -\left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)} + b}{c} \]
      4. associate-*r*82.6%

        \[\leadsto \frac{1}{z} \cdot \frac{\mathsf{fma}\left(x, 9 \cdot y, -\color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{c} \]
      5. distribute-lft-neg-in82.6%

        \[\leadsto \frac{1}{z} \cdot \frac{\mathsf{fma}\left(x, 9 \cdot y, \color{blue}{\left(-\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{c} \]
      6. *-commutative82.6%

        \[\leadsto \frac{1}{z} \cdot \frac{\mathsf{fma}\left(x, 9 \cdot y, \color{blue}{a \cdot \left(-\left(z \cdot 4\right) \cdot t\right)}\right) + b}{c} \]
      7. *-commutative82.6%

        \[\leadsto \frac{1}{z} \cdot \frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(-\color{blue}{t \cdot \left(z \cdot 4\right)}\right)\right) + b}{c} \]
      8. distribute-rgt-neg-in82.6%

        \[\leadsto \frac{1}{z} \cdot \frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \color{blue}{\left(t \cdot \left(-z \cdot 4\right)\right)}\right) + b}{c} \]
      9. distribute-rgt-neg-in82.6%

        \[\leadsto \frac{1}{z} \cdot \frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(t \cdot \color{blue}{\left(z \cdot \left(-4\right)\right)}\right)\right) + b}{c} \]
      10. metadata-eval82.6%

        \[\leadsto \frac{1}{z} \cdot \frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(t \cdot \left(z \cdot \color{blue}{-4}\right)\right)\right) + b}{c} \]
    6. Applied egg-rr82.6%

      \[\leadsto \color{blue}{\frac{1}{z} \cdot \frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{c}} \]
    7. Taylor expanded in b around inf 61.8%

      \[\leadsto \frac{1}{z} \cdot \color{blue}{\frac{b}{c}} \]

    if -1.74999999999999997e80 < b < 5.2e-25

    1. Initial program 79.8%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. associate-+l-79.8%

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y - \left(\left(\left(z \cdot 4\right) \cdot t\right) \cdot a - b\right)}}{z \cdot c} \]
      2. *-commutative79.8%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*79.0%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t} - b\right)}{z \cdot c} \]
      4. *-commutative79.0%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t - b\right)}{z \cdot c} \]
      5. associate-+l-79.0%

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
      6. *-commutative79.0%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right)} \cdot t\right) + b}{z \cdot c} \]
      7. associate-*r*79.8%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      8. *-commutative79.8%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      9. associate-*l*79.8%

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      10. associate-*l*80.5%

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{\left(z \cdot 4\right) \cdot \left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified80.5%

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 46.9%

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    6. Step-by-step derivation
      1. *-commutative46.9%

        \[\leadsto \color{blue}{\frac{a \cdot t}{c} \cdot -4} \]
      2. associate-/l*49.0%

        \[\leadsto \color{blue}{\frac{a}{\frac{c}{t}}} \cdot -4 \]
      3. associate-*l/49.1%

        \[\leadsto \color{blue}{\frac{a \cdot -4}{\frac{c}{t}}} \]
    7. Simplified49.1%

      \[\leadsto \color{blue}{\frac{a \cdot -4}{\frac{c}{t}}} \]
    8. Step-by-step derivation
      1. associate-/r/50.0%

        \[\leadsto \color{blue}{\frac{a \cdot -4}{c} \cdot t} \]
    9. Applied egg-rr50.0%

      \[\leadsto \color{blue}{\frac{a \cdot -4}{c} \cdot t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification55.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.75 \cdot 10^{+80} \lor \neg \left(b \leq 5.2 \cdot 10^{-25}\right):\\ \;\;\;\;\frac{b}{c} \cdot \frac{1}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 51.2% accurate, 1.7× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} \mathbf{if}\;b \leq -2.8 \cdot 10^{+80}:\\ \;\;\;\;\frac{b}{c} \cdot \frac{1}{z}\\ \mathbf{elif}\;b \leq 2 \cdot 10^{-24}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{z}{\frac{b}{c}}}\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (if (<= b -2.8e+80)
   (* (/ b c) (/ 1.0 z))
   (if (<= b 2e-24) (* t (/ (* a -4.0) c)) (/ 1.0 (/ z (/ b c))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if (b <= -2.8e+80) {
		tmp = (b / c) * (1.0 / z);
	} else if (b <= 2e-24) {
		tmp = t * ((a * -4.0) / c);
	} else {
		tmp = 1.0 / (z / (b / c));
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-2.8d+80)) then
        tmp = (b / c) * (1.0d0 / z)
    else if (b <= 2d-24) then
        tmp = t * ((a * (-4.0d0)) / c)
    else
        tmp = 1.0d0 / (z / (b / c))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if (b <= -2.8e+80) {
		tmp = (b / c) * (1.0 / z);
	} else if (b <= 2e-24) {
		tmp = t * ((a * -4.0) / c);
	} else {
		tmp = 1.0 / (z / (b / c));
	}
	return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
def code(x, y, z, t, a, b, c):
	tmp = 0
	if b <= -2.8e+80:
		tmp = (b / c) * (1.0 / z)
	elif b <= 2e-24:
		tmp = t * ((a * -4.0) / c)
	else:
		tmp = 1.0 / (z / (b / c))
	return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if (b <= -2.8e+80)
		tmp = Float64(Float64(b / c) * Float64(1.0 / z));
	elseif (b <= 2e-24)
		tmp = Float64(t * Float64(Float64(a * -4.0) / c));
	else
		tmp = Float64(1.0 / Float64(z / Float64(b / c)));
	end
	return tmp
end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
	tmp = 0.0;
	if (b <= -2.8e+80)
		tmp = (b / c) * (1.0 / z);
	elseif (b <= 2e-24)
		tmp = t * ((a * -4.0) / c);
	else
		tmp = 1.0 / (z / (b / c));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -2.8e+80], N[(N[(b / c), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2e-24], N[(t * N[(N[(a * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(z / N[(b / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.8 \cdot 10^{+80}:\\
\;\;\;\;\frac{b}{c} \cdot \frac{1}{z}\\

\mathbf{elif}\;b \leq 2 \cdot 10^{-24}:\\
\;\;\;\;t \cdot \frac{a \cdot -4}{c}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{z}{\frac{b}{c}}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.79999999999999984e80

    1. Initial program 86.3%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. associate-+l-86.3%

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

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*89.6%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t} - b\right)}{z \cdot c} \]
      4. *-commutative89.6%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t - b\right)}{z \cdot c} \]
      5. associate-+l-89.6%

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

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right)} \cdot t\right) + b}{z \cdot c} \]
      7. associate-*r*86.3%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      8. *-commutative86.3%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      9. associate-*l*86.3%

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      10. associate-*l*88.0%

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{\left(z \cdot 4\right) \cdot \left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified88.0%

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-un-lft-identity88.0%

        \[\leadsto \frac{\color{blue}{1 \cdot \left(\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b\right)}}{z \cdot c} \]
      2. times-frac86.5%

        \[\leadsto \color{blue}{\frac{1}{z} \cdot \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{c}} \]
      3. fma-neg88.3%

        \[\leadsto \frac{1}{z} \cdot \frac{\color{blue}{\mathsf{fma}\left(x, 9 \cdot y, -\left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)} + b}{c} \]
      4. associate-*r*86.5%

        \[\leadsto \frac{1}{z} \cdot \frac{\mathsf{fma}\left(x, 9 \cdot y, -\color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{c} \]
      5. distribute-lft-neg-in86.5%

        \[\leadsto \frac{1}{z} \cdot \frac{\mathsf{fma}\left(x, 9 \cdot y, \color{blue}{\left(-\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{c} \]
      6. *-commutative86.5%

        \[\leadsto \frac{1}{z} \cdot \frac{\mathsf{fma}\left(x, 9 \cdot y, \color{blue}{a \cdot \left(-\left(z \cdot 4\right) \cdot t\right)}\right) + b}{c} \]
      7. *-commutative86.5%

        \[\leadsto \frac{1}{z} \cdot \frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(-\color{blue}{t \cdot \left(z \cdot 4\right)}\right)\right) + b}{c} \]
      8. distribute-rgt-neg-in86.5%

        \[\leadsto \frac{1}{z} \cdot \frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \color{blue}{\left(t \cdot \left(-z \cdot 4\right)\right)}\right) + b}{c} \]
      9. distribute-rgt-neg-in86.5%

        \[\leadsto \frac{1}{z} \cdot \frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(t \cdot \color{blue}{\left(z \cdot \left(-4\right)\right)}\right)\right) + b}{c} \]
      10. metadata-eval86.5%

        \[\leadsto \frac{1}{z} \cdot \frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(t \cdot \left(z \cdot \color{blue}{-4}\right)\right)\right) + b}{c} \]
    6. Applied egg-rr86.5%

      \[\leadsto \color{blue}{\frac{1}{z} \cdot \frac{\mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{c}} \]
    7. Taylor expanded in b around inf 62.3%

      \[\leadsto \frac{1}{z} \cdot \color{blue}{\frac{b}{c}} \]

    if -2.79999999999999984e80 < b < 1.99999999999999985e-24

    1. Initial program 79.8%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. associate-+l-79.8%

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y - \left(\left(\left(z \cdot 4\right) \cdot t\right) \cdot a - b\right)}}{z \cdot c} \]
      2. *-commutative79.8%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*79.0%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t} - b\right)}{z \cdot c} \]
      4. *-commutative79.0%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t - b\right)}{z \cdot c} \]
      5. associate-+l-79.0%

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
      6. *-commutative79.0%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right)} \cdot t\right) + b}{z \cdot c} \]
      7. associate-*r*79.8%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      8. *-commutative79.8%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      9. associate-*l*79.8%

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      10. associate-*l*80.5%

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{\left(z \cdot 4\right) \cdot \left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified80.5%

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 46.9%

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    6. Step-by-step derivation
      1. *-commutative46.9%

        \[\leadsto \color{blue}{\frac{a \cdot t}{c} \cdot -4} \]
      2. associate-/l*49.0%

        \[\leadsto \color{blue}{\frac{a}{\frac{c}{t}}} \cdot -4 \]
      3. associate-*l/49.1%

        \[\leadsto \color{blue}{\frac{a \cdot -4}{\frac{c}{t}}} \]
    7. Simplified49.1%

      \[\leadsto \color{blue}{\frac{a \cdot -4}{\frac{c}{t}}} \]
    8. Step-by-step derivation
      1. associate-/r/50.0%

        \[\leadsto \color{blue}{\frac{a \cdot -4}{c} \cdot t} \]
    9. Applied egg-rr50.0%

      \[\leadsto \color{blue}{\frac{a \cdot -4}{c} \cdot t} \]

    if 1.99999999999999985e-24 < b

    1. Initial program 84.8%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. associate-+l-84.8%

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y - \left(\left(\left(z \cdot 4\right) \cdot t\right) \cdot a - b\right)}}{z \cdot c} \]
      2. *-commutative84.8%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*83.3%

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

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t - b\right)}{z \cdot c} \]
      5. associate-+l-83.3%

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

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right)} \cdot t\right) + b}{z \cdot c} \]
      7. associate-*r*84.8%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
      8. *-commutative84.8%

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      9. associate-*l*84.9%

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      10. associate-*l*87.9%

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

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 59.8%

      \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
    6. Step-by-step derivation
      1. *-commutative59.8%

        \[\leadsto \frac{b}{\color{blue}{z \cdot c}} \]
    7. Simplified59.8%

      \[\leadsto \color{blue}{\frac{b}{z \cdot c}} \]
    8. Step-by-step derivation
      1. clear-num59.8%

        \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot c}{b}}} \]
      2. inv-pow59.8%

        \[\leadsto \color{blue}{{\left(\frac{z \cdot c}{b}\right)}^{-1}} \]
    9. Applied egg-rr59.8%

      \[\leadsto \color{blue}{{\left(\frac{z \cdot c}{b}\right)}^{-1}} \]
    10. Step-by-step derivation
      1. unpow-159.8%

        \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot c}{b}}} \]
      2. associate-/l*61.3%

        \[\leadsto \frac{1}{\color{blue}{\frac{z}{\frac{b}{c}}}} \]
    11. Simplified61.3%

      \[\leadsto \color{blue}{\frac{1}{\frac{z}{\frac{b}{c}}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification55.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.8 \cdot 10^{+80}:\\ \;\;\;\;\frac{b}{c} \cdot \frac{1}{z}\\ \mathbf{elif}\;b \leq 2 \cdot 10^{-24}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{z}{\frac{b}{c}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 35.4% accurate, 3.8× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \frac{b}{z \cdot c} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c) :precision binary64 (/ b (* z c)))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
	return b / (z * c);
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = b / (z * c)
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	return b / (z * c);
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
def code(x, y, z, t, a, b, c):
	return b / (z * c)
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
function code(x, y, z, t, a, b, c)
	return Float64(b / Float64(z * c))
end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp = code(x, y, z, t, a, b, c)
	tmp = b / (z * c);
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{b}{z \cdot c}
\end{array}
Derivation
  1. Initial program 82.5%

    \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
  2. Step-by-step derivation
    1. associate-+l-82.5%

      \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y - \left(\left(\left(z \cdot 4\right) \cdot t\right) \cdot a - b\right)}}{z \cdot c} \]
    2. *-commutative82.5%

      \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
    3. associate-*r*82.4%

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

      \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t - b\right)}{z \cdot c} \]
    5. associate-+l-82.4%

      \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
    6. *-commutative82.4%

      \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right)} \cdot t\right) + b}{z \cdot c} \]
    7. associate-*r*82.5%

      \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]
    8. *-commutative82.5%

      \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
    9. associate-*l*82.5%

      \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    10. associate-*l*84.0%

      \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{\left(z \cdot 4\right) \cdot \left(t \cdot a\right)}\right) + b}{z \cdot c} \]
  3. Simplified84.0%

    \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
  4. Add Preprocessing
  5. Taylor expanded in b around inf 37.8%

    \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
  6. Step-by-step derivation
    1. *-commutative37.8%

      \[\leadsto \frac{b}{\color{blue}{z \cdot c}} \]
  7. Simplified37.8%

    \[\leadsto \color{blue}{\frac{b}{z \cdot c}} \]
  8. Final simplification37.8%

    \[\leadsto \frac{b}{z \cdot c} \]
  9. Add Preprocessing

Developer target: 80.2% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{b}{c \cdot z}\\ t_2 := 4 \cdot \frac{a \cdot t}{c}\\ t_3 := \left(x \cdot 9\right) \cdot y\\ t_4 := \left(t_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\ t_5 := \frac{t_4}{z \cdot c}\\ t_6 := \frac{\left(t_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\ \mathbf{if}\;t_5 < -1.100156740804105 \cdot 10^{-171}:\\ \;\;\;\;t_6\\ \mathbf{elif}\;t_5 < 0:\\ \;\;\;\;\frac{\frac{t_4}{z}}{c}\\ \mathbf{elif}\;t_5 < 1.1708877911747488 \cdot 10^{-53}:\\ \;\;\;\;t_6\\ \mathbf{elif}\;t_5 < 2.876823679546137 \cdot 10^{+130}:\\ \;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t_1\right) - t_2\\ \mathbf{elif}\;t_5 < 1.3838515042456319 \cdot 10^{+158}:\\ \;\;\;\;t_6\\ \mathbf{else}:\\ \;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t_1\right) - t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (/ b (* c z)))
        (t_2 (* 4.0 (/ (* a t) c)))
        (t_3 (* (* x 9.0) y))
        (t_4 (+ (- t_3 (* (* (* z 4.0) t) a)) b))
        (t_5 (/ t_4 (* z c)))
        (t_6 (/ (+ (- t_3 (* (* z 4.0) (* t a))) b) (* z c))))
   (if (< t_5 -1.100156740804105e-171)
     t_6
     (if (< t_5 0.0)
       (/ (/ t_4 z) c)
       (if (< t_5 1.1708877911747488e-53)
         t_6
         (if (< t_5 2.876823679546137e+130)
           (- (+ (* (* 9.0 (/ y c)) (/ x z)) t_1) t_2)
           (if (< t_5 1.3838515042456319e+158)
             t_6
             (- (+ (* 9.0 (* (/ y (* c z)) x)) t_1) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = b / (c * z);
	double t_2 = 4.0 * ((a * t) / c);
	double t_3 = (x * 9.0) * y;
	double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
	double t_5 = t_4 / (z * c);
	double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
	double tmp;
	if (t_5 < -1.100156740804105e-171) {
		tmp = t_6;
	} else if (t_5 < 0.0) {
		tmp = (t_4 / z) / c;
	} else if (t_5 < 1.1708877911747488e-53) {
		tmp = t_6;
	} else if (t_5 < 2.876823679546137e+130) {
		tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
	} else if (t_5 < 1.3838515042456319e+158) {
		tmp = t_6;
	} else {
		tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: t_5
    real(8) :: t_6
    real(8) :: tmp
    t_1 = b / (c * z)
    t_2 = 4.0d0 * ((a * t) / c)
    t_3 = (x * 9.0d0) * y
    t_4 = (t_3 - (((z * 4.0d0) * t) * a)) + b
    t_5 = t_4 / (z * c)
    t_6 = ((t_3 - ((z * 4.0d0) * (t * a))) + b) / (z * c)
    if (t_5 < (-1.100156740804105d-171)) then
        tmp = t_6
    else if (t_5 < 0.0d0) then
        tmp = (t_4 / z) / c
    else if (t_5 < 1.1708877911747488d-53) then
        tmp = t_6
    else if (t_5 < 2.876823679546137d+130) then
        tmp = (((9.0d0 * (y / c)) * (x / z)) + t_1) - t_2
    else if (t_5 < 1.3838515042456319d+158) then
        tmp = t_6
    else
        tmp = ((9.0d0 * ((y / (c * z)) * x)) + t_1) - t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = b / (c * z);
	double t_2 = 4.0 * ((a * t) / c);
	double t_3 = (x * 9.0) * y;
	double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
	double t_5 = t_4 / (z * c);
	double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
	double tmp;
	if (t_5 < -1.100156740804105e-171) {
		tmp = t_6;
	} else if (t_5 < 0.0) {
		tmp = (t_4 / z) / c;
	} else if (t_5 < 1.1708877911747488e-53) {
		tmp = t_6;
	} else if (t_5 < 2.876823679546137e+130) {
		tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
	} else if (t_5 < 1.3838515042456319e+158) {
		tmp = t_6;
	} else {
		tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	t_1 = b / (c * z)
	t_2 = 4.0 * ((a * t) / c)
	t_3 = (x * 9.0) * y
	t_4 = (t_3 - (((z * 4.0) * t) * a)) + b
	t_5 = t_4 / (z * c)
	t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c)
	tmp = 0
	if t_5 < -1.100156740804105e-171:
		tmp = t_6
	elif t_5 < 0.0:
		tmp = (t_4 / z) / c
	elif t_5 < 1.1708877911747488e-53:
		tmp = t_6
	elif t_5 < 2.876823679546137e+130:
		tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2
	elif t_5 < 1.3838515042456319e+158:
		tmp = t_6
	else:
		tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2
	return tmp
function code(x, y, z, t, a, b, c)
	t_1 = Float64(b / Float64(c * z))
	t_2 = Float64(4.0 * Float64(Float64(a * t) / c))
	t_3 = Float64(Float64(x * 9.0) * y)
	t_4 = Float64(Float64(t_3 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b)
	t_5 = Float64(t_4 / Float64(z * c))
	t_6 = Float64(Float64(Float64(t_3 - Float64(Float64(z * 4.0) * Float64(t * a))) + b) / Float64(z * c))
	tmp = 0.0
	if (t_5 < -1.100156740804105e-171)
		tmp = t_6;
	elseif (t_5 < 0.0)
		tmp = Float64(Float64(t_4 / z) / c);
	elseif (t_5 < 1.1708877911747488e-53)
		tmp = t_6;
	elseif (t_5 < 2.876823679546137e+130)
		tmp = Float64(Float64(Float64(Float64(9.0 * Float64(y / c)) * Float64(x / z)) + t_1) - t_2);
	elseif (t_5 < 1.3838515042456319e+158)
		tmp = t_6;
	else
		tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / Float64(c * z)) * x)) + t_1) - t_2);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = b / (c * z);
	t_2 = 4.0 * ((a * t) / c);
	t_3 = (x * 9.0) * y;
	t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
	t_5 = t_4 / (z * c);
	t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
	tmp = 0.0;
	if (t_5 < -1.100156740804105e-171)
		tmp = t_6;
	elseif (t_5 < 0.0)
		tmp = (t_4 / z) / c;
	elseif (t_5 < 1.1708877911747488e-53)
		tmp = t_6;
	elseif (t_5 < 2.876823679546137e+130)
		tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
	elseif (t_5 < 1.3838515042456319e+158)
		tmp = t_6;
	else
		tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$5, -1.100156740804105e-171], t$95$6, If[Less[t$95$5, 0.0], N[(N[(t$95$4 / z), $MachinePrecision] / c), $MachinePrecision], If[Less[t$95$5, 1.1708877911747488e-53], t$95$6, If[Less[t$95$5, 2.876823679546137e+130], N[(N[(N[(N[(9.0 * N[(y / c), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[Less[t$95$5, 1.3838515042456319e+158], t$95$6, N[(N[(N[(9.0 * N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{b}{c \cdot z}\\
t_2 := 4 \cdot \frac{a \cdot t}{c}\\
t_3 := \left(x \cdot 9\right) \cdot y\\
t_4 := \left(t_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\
t_5 := \frac{t_4}{z \cdot c}\\
t_6 := \frac{\left(t_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\
\mathbf{if}\;t_5 < -1.100156740804105 \cdot 10^{-171}:\\
\;\;\;\;t_6\\

\mathbf{elif}\;t_5 < 0:\\
\;\;\;\;\frac{\frac{t_4}{z}}{c}\\

\mathbf{elif}\;t_5 < 1.1708877911747488 \cdot 10^{-53}:\\
\;\;\;\;t_6\\

\mathbf{elif}\;t_5 < 2.876823679546137 \cdot 10^{+130}:\\
\;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t_1\right) - t_2\\

\mathbf{elif}\;t_5 < 1.3838515042456319 \cdot 10^{+158}:\\
\;\;\;\;t_6\\

\mathbf{else}:\\
\;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t_1\right) - t_2\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024010 
(FPCore (x y z t a b c)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, J"
  :precision binary64

  :herbie-target
  (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) -1.100156740804105e-171) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 0.0) (/ (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.1708877911747488e-53) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 2.876823679546137e+130) (- (+ (* (* 9.0 (/ y c)) (/ x z)) (/ b (* c z))) (* 4.0 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.3838515042456319e+158) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (- (+ (* 9.0 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4.0 (/ (* a t) c))))))))

  (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))