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

Percentage Accurate: 79.1% → 88.9%
Time: 19.7s
Alternatives: 17
Speedup: 0.7×

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 17 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.1% 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: 88.9% accurate, 0.1× speedup?

\[\begin{array}{l} c_m = \left|c\right| \\ c_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ c_s \cdot \begin{array}{l} \mathbf{if}\;c_m \leq 2.7 \cdot 10^{-61}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, 9 \cdot y, z \cdot \left(\left(-4 \cdot t\right) \cdot a\right)\right) + b}{c_m \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-4, \frac{a}{\frac{c_m}{t}}, \mathsf{fma}\left(9, \frac{x}{c_m} \cdot \frac{y}{z}, \frac{b}{c_m \cdot z}\right)\right)\\ \end{array} \end{array} \]
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (*
  c_s
  (if (<= c_m 2.7e-61)
    (/ (+ (fma x (* 9.0 y) (* z (* (* -4.0 t) a))) b) (* c_m z))
    (fma
     -4.0
     (/ a (/ c_m t))
     (fma 9.0 (* (/ x c_m) (/ y z)) (/ b (* c_m z)))))))
c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double tmp;
	if (c_m <= 2.7e-61) {
		tmp = (fma(x, (9.0 * y), (z * ((-4.0 * t) * a))) + b) / (c_m * z);
	} else {
		tmp = fma(-4.0, (a / (c_m / t)), fma(9.0, ((x / c_m) * (y / z)), (b / (c_m * z))));
	}
	return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0, c)
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
function code(c_s, x, y, z, t, a, b, c_m)
	tmp = 0.0
	if (c_m <= 2.7e-61)
		tmp = Float64(Float64(fma(x, Float64(9.0 * y), Float64(z * Float64(Float64(-4.0 * t) * a))) + b) / Float64(c_m * z));
	else
		tmp = fma(-4.0, Float64(a / Float64(c_m / t)), fma(9.0, Float64(Float64(x / c_m) * Float64(y / z)), Float64(b / Float64(c_m * z))));
	end
	return Float64(c_s * tmp)
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[c$95$m, 2.7e-61], N[(N[(N[(x * N[(9.0 * y), $MachinePrecision] + N[(z * N[(N[(-4.0 * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(a / N[(c$95$m / t), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(x / c$95$m), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;c_m \leq 2.7 \cdot 10^{-61}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, 9 \cdot y, z \cdot \left(\left(-4 \cdot t\right) \cdot a\right)\right) + b}{c_m \cdot z}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-4, \frac{a}{\frac{c_m}{t}}, \mathsf{fma}\left(9, \frac{x}{c_m} \cdot \frac{y}{z}, \frac{b}{c_m \cdot z}\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < 2.69999999999999993e-61

    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*80.7%

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

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

        \[\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} \]
    3. Simplified84.8%

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

    if 2.69999999999999993e-61 < c

    1. Initial program 73.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-73.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. *-commutative73.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*74.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. *-commutative74.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-74.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. *-commutative74.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*73.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. *-commutative73.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*73.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*73.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. Simplified73.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 x around 0 81.0%

      \[\leadsto \color{blue}{\left(9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right) - 4 \cdot \frac{a \cdot t}{c}} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv81.0%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-4, \frac{a}{\frac{c}{t}}, \color{blue}{\mathsf{fma}\left(9, \frac{x \cdot y}{c \cdot z}, \frac{b}{c \cdot z}\right)}\right) \]
      7. times-frac84.0%

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(-4, \frac{a}{\frac{c}{t}}, \mathsf{fma}\left(9, \frac{x}{c} \cdot \frac{y}{z}, \frac{b}{z \cdot c}\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification84.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq 2.7 \cdot 10^{-61}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, 9 \cdot y, z \cdot \left(\left(-4 \cdot t\right) \cdot a\right)\right) + b}{c \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-4, \frac{a}{\frac{c}{t}}, \mathsf{fma}\left(9, \frac{x}{c} \cdot \frac{y}{z}, \frac{b}{c \cdot z}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 86.7% accurate, 0.2× speedup?

\[\begin{array}{l} c_m = \left|c\right| \\ c_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ c_s \cdot \begin{array}{l} \mathbf{if}\;c_m \leq 7.4 \cdot 10^{-31}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, 9 \cdot y, z \cdot \left(\left(-4 \cdot t\right) \cdot a\right)\right) + b}{c_m \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{b}{c_m \cdot z} + 9 \cdot \frac{x \cdot y}{c_m \cdot z}\right) - 4 \cdot \frac{t \cdot a}{c_m}\\ \end{array} \end{array} \]
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (*
  c_s
  (if (<= c_m 7.4e-31)
    (/ (+ (fma x (* 9.0 y) (* z (* (* -4.0 t) a))) b) (* c_m z))
    (-
     (+ (/ b (* c_m z)) (* 9.0 (/ (* x y) (* c_m z))))
     (* 4.0 (/ (* t a) c_m))))))
c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double tmp;
	if (c_m <= 7.4e-31) {
		tmp = (fma(x, (9.0 * y), (z * ((-4.0 * t) * a))) + b) / (c_m * z);
	} else {
		tmp = ((b / (c_m * z)) + (9.0 * ((x * y) / (c_m * z)))) - (4.0 * ((t * a) / c_m));
	}
	return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0, c)
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
function code(c_s, x, y, z, t, a, b, c_m)
	tmp = 0.0
	if (c_m <= 7.4e-31)
		tmp = Float64(Float64(fma(x, Float64(9.0 * y), Float64(z * Float64(Float64(-4.0 * t) * a))) + b) / Float64(c_m * z));
	else
		tmp = Float64(Float64(Float64(b / Float64(c_m * z)) + Float64(9.0 * Float64(Float64(x * y) / Float64(c_m * z)))) - Float64(4.0 * Float64(Float64(t * a) / c_m)));
	end
	return Float64(c_s * tmp)
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[c$95$m, 7.4e-31], N[(N[(N[(x * N[(9.0 * y), $MachinePrecision] + N[(z * N[(N[(-4.0 * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;c_m \leq 7.4 \cdot 10^{-31}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, 9 \cdot y, z \cdot \left(\left(-4 \cdot t\right) \cdot a\right)\right) + b}{c_m \cdot z}\\

\mathbf{else}:\\
\;\;\;\;\left(\frac{b}{c_m \cdot z} + 9 \cdot \frac{x \cdot y}{c_m \cdot z}\right) - 4 \cdot \frac{t \cdot a}{c_m}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < 7.3999999999999996e-31

    1. Initial program 81.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-81.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. *-commutative81.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*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} \]
    3. Simplified84.9%

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

    if 7.3999999999999996e-31 < c

    1. Initial program 72.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-72.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. *-commutative72.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*73.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. *-commutative73.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-73.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. *-commutative73.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*72.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. *-commutative72.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*72.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*72.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. Simplified72.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 x around 0 80.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq 7.4 \cdot 10^{-31}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, 9 \cdot y, z \cdot \left(\left(-4 \cdot t\right) \cdot a\right)\right) + b}{c \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{b}{c \cdot z} + 9 \cdot \frac{x \cdot y}{c \cdot z}\right) - 4 \cdot \frac{t \cdot a}{c}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 87.5% accurate, 0.2× speedup?

\[\begin{array}{l} c_m = \left|c\right| \\ c_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ \begin{array}{l} t_1 := \frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{c_m \cdot z}\\ t_2 := \frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{c_m \cdot z}\\ c_s \cdot \begin{array}{l} \mathbf{if}\;t_1 \leq -5 \cdot 10^{-287}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\frac{1}{z} \cdot \frac{-4 \cdot \left(a \cdot \left(z \cdot t\right)\right) + 9 \cdot \left(x \cdot y\right)}{c_m}\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\ \end{array} \end{array} \end{array} \]
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (let* ((t_1 (/ (+ b (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* c_m z)))
        (t_2 (/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* t a)))) (* c_m z))))
   (*
    c_s
    (if (<= t_1 -5e-287)
      t_2
      (if (<= t_1 0.0)
        (* (/ 1.0 z) (/ (+ (* -4.0 (* a (* z t))) (* 9.0 (* x y))) c_m))
        (if (<= t_1 INFINITY) t_2 (* -4.0 (* t (/ a c_m)))))))))
c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z);
	double t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z);
	double tmp;
	if (t_1 <= -5e-287) {
		tmp = t_2;
	} else if (t_1 <= 0.0) {
		tmp = (1.0 / z) * (((-4.0 * (a * (z * t))) + (9.0 * (x * y))) / c_m);
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = t_2;
	} else {
		tmp = -4.0 * (t * (a / c_m));
	}
	return c_s * tmp;
}
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z);
	double t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z);
	double tmp;
	if (t_1 <= -5e-287) {
		tmp = t_2;
	} else if (t_1 <= 0.0) {
		tmp = (1.0 / z) * (((-4.0 * (a * (z * t))) + (9.0 * (x * y))) / c_m);
	} else if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = t_2;
	} else {
		tmp = -4.0 * (t * (a / c_m));
	}
	return c_s * tmp;
}
c_m = math.fabs(c)
c_s = math.copysign(1.0, c)
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
def code(c_s, x, y, z, t, a, b, c_m):
	t_1 = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z)
	t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z)
	tmp = 0
	if t_1 <= -5e-287:
		tmp = t_2
	elif t_1 <= 0.0:
		tmp = (1.0 / z) * (((-4.0 * (a * (z * t))) + (9.0 * (x * y))) / c_m)
	elif t_1 <= math.inf:
		tmp = t_2
	else:
		tmp = -4.0 * (t * (a / c_m))
	return c_s * tmp
c_m = abs(c)
c_s = copysign(1.0, c)
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
function code(c_s, x, y, z, t, a, b, c_m)
	t_1 = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(c_m * z))
	t_2 = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(t * a)))) / Float64(c_m * z))
	tmp = 0.0
	if (t_1 <= -5e-287)
		tmp = t_2;
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(1.0 / z) * Float64(Float64(Float64(-4.0 * Float64(a * Float64(z * t))) + Float64(9.0 * Float64(x * y))) / c_m));
	elseif (t_1 <= Inf)
		tmp = t_2;
	else
		tmp = Float64(-4.0 * Float64(t * Float64(a / c_m)));
	end
	return Float64(c_s * tmp)
end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
	t_1 = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z);
	t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z);
	tmp = 0.0;
	if (t_1 <= -5e-287)
		tmp = t_2;
	elseif (t_1 <= 0.0)
		tmp = (1.0 / z) * (((-4.0 * (a * (z * t))) + (9.0 * (x * y))) / c_m);
	elseif (t_1 <= Inf)
		tmp = t_2;
	else
		tmp = -4.0 * (t * (a / c_m));
	end
	tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(b + N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $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[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -5e-287], t$95$2, If[LessEqual[t$95$1, 0.0], N[(N[(1.0 / z), $MachinePrecision] * N[(N[(N[(-4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$2, N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := \frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{c_m \cdot z}\\
t_2 := \frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{c_m \cdot z}\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;t_1 \leq -5 \cdot 10^{-287}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{1}{z} \cdot \frac{-4 \cdot \left(a \cdot \left(z \cdot t\right)\right) + 9 \cdot \left(x \cdot y\right)}{c_m}\\

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

\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\


\end{array}
\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)) < -5.00000000000000025e-287 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 87.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-87.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. *-commutative87.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*87.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. *-commutative87.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-87.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. *-commutative87.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.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. *-commutative87.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*87.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*89.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. Simplified89.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

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

    1. Initial program 45.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-45.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. *-commutative45.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*44.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. *-commutative44.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-44.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. *-commutative44.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*45.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. *-commutative45.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*45.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*45.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. Simplified45.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. Applied egg-rr99.6%

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

      \[\leadsto \frac{1}{z} \cdot \color{blue}{\frac{-4 \cdot \left(a \cdot \left(t \cdot z\right)\right) + 9 \cdot \left(x \cdot y\right)}{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*0.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. *-commutative0.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-0.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. *-commutative0.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*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*0.2%

        \[\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. Simplified0.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 c}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 59.4%

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

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

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

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

        \[\leadsto \color{blue}{\left(\frac{a}{c} \cdot t\right)} \cdot -4 \]
    9. Applied egg-rr75.1%

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

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

Alternative 4: 50.5% accurate, 0.6× speedup?

\[\begin{array}{l} c_m = \left|c\right| \\ c_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ \begin{array}{l} t_1 := -4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\ t_2 := 9 \cdot \left(y \cdot \frac{\frac{x}{z}}{c_m}\right)\\ c_s \cdot \begin{array}{l} \mathbf{if}\;a \leq -2.15 \cdot 10^{-39}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.95 \cdot 10^{-177}:\\ \;\;\;\;\frac{\frac{b}{c_m}}{z}\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-126}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{-17}:\\ \;\;\;\;\frac{b}{c_m \cdot z}\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{+113}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \end{array} \]
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (let* ((t_1 (* -4.0 (* t (/ a c_m)))) (t_2 (* 9.0 (* y (/ (/ x z) c_m)))))
   (*
    c_s
    (if (<= a -2.15e-39)
      t_1
      (if (<= a 1.95e-177)
        (/ (/ b c_m) z)
        (if (<= a 1.7e-126)
          t_2
          (if (<= a 2.3e-17)
            (/ b (* c_m z))
            (if (<= a 3.4e+113) t_2 t_1))))))))
c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = -4.0 * (t * (a / c_m));
	double t_2 = 9.0 * (y * ((x / z) / c_m));
	double tmp;
	if (a <= -2.15e-39) {
		tmp = t_1;
	} else if (a <= 1.95e-177) {
		tmp = (b / c_m) / z;
	} else if (a <= 1.7e-126) {
		tmp = t_2;
	} else if (a <= 2.3e-17) {
		tmp = b / (c_m * z);
	} else if (a <= 3.4e+113) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
    real(8), intent (in) :: c_s
    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_m
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (-4.0d0) * (t * (a / c_m))
    t_2 = 9.0d0 * (y * ((x / z) / c_m))
    if (a <= (-2.15d-39)) then
        tmp = t_1
    else if (a <= 1.95d-177) then
        tmp = (b / c_m) / z
    else if (a <= 1.7d-126) then
        tmp = t_2
    else if (a <= 2.3d-17) then
        tmp = b / (c_m * z)
    else if (a <= 3.4d+113) then
        tmp = t_2
    else
        tmp = t_1
    end if
    code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = -4.0 * (t * (a / c_m));
	double t_2 = 9.0 * (y * ((x / z) / c_m));
	double tmp;
	if (a <= -2.15e-39) {
		tmp = t_1;
	} else if (a <= 1.95e-177) {
		tmp = (b / c_m) / z;
	} else if (a <= 1.7e-126) {
		tmp = t_2;
	} else if (a <= 2.3e-17) {
		tmp = b / (c_m * z);
	} else if (a <= 3.4e+113) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return c_s * tmp;
}
c_m = math.fabs(c)
c_s = math.copysign(1.0, c)
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
def code(c_s, x, y, z, t, a, b, c_m):
	t_1 = -4.0 * (t * (a / c_m))
	t_2 = 9.0 * (y * ((x / z) / c_m))
	tmp = 0
	if a <= -2.15e-39:
		tmp = t_1
	elif a <= 1.95e-177:
		tmp = (b / c_m) / z
	elif a <= 1.7e-126:
		tmp = t_2
	elif a <= 2.3e-17:
		tmp = b / (c_m * z)
	elif a <= 3.4e+113:
		tmp = t_2
	else:
		tmp = t_1
	return c_s * tmp
c_m = abs(c)
c_s = copysign(1.0, c)
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
function code(c_s, x, y, z, t, a, b, c_m)
	t_1 = Float64(-4.0 * Float64(t * Float64(a / c_m)))
	t_2 = Float64(9.0 * Float64(y * Float64(Float64(x / z) / c_m)))
	tmp = 0.0
	if (a <= -2.15e-39)
		tmp = t_1;
	elseif (a <= 1.95e-177)
		tmp = Float64(Float64(b / c_m) / z);
	elseif (a <= 1.7e-126)
		tmp = t_2;
	elseif (a <= 2.3e-17)
		tmp = Float64(b / Float64(c_m * z));
	elseif (a <= 3.4e+113)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return Float64(c_s * tmp)
end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
	t_1 = -4.0 * (t * (a / c_m));
	t_2 = 9.0 * (y * ((x / z) / c_m));
	tmp = 0.0;
	if (a <= -2.15e-39)
		tmp = t_1;
	elseif (a <= 1.95e-177)
		tmp = (b / c_m) / z;
	elseif (a <= 1.7e-126)
		tmp = t_2;
	elseif (a <= 2.3e-17)
		tmp = b / (c_m * z);
	elseif (a <= 3.4e+113)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(y * N[(N[(x / z), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[a, -2.15e-39], t$95$1, If[LessEqual[a, 1.95e-177], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 1.7e-126], t$95$2, If[LessEqual[a, 2.3e-17], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.4e+113], t$95$2, t$95$1]]]]]), $MachinePrecision]]]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\
t_2 := 9 \cdot \left(y \cdot \frac{\frac{x}{z}}{c_m}\right)\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq -2.15 \cdot 10^{-39}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.95 \cdot 10^{-177}:\\
\;\;\;\;\frac{\frac{b}{c_m}}{z}\\

\mathbf{elif}\;a \leq 1.7 \cdot 10^{-126}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 2.3 \cdot 10^{-17}:\\
\;\;\;\;\frac{b}{c_m \cdot z}\\

\mathbf{elif}\;a \leq 3.4 \cdot 10^{+113}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.15e-39 or 3.40000000000000019e113 < a

    1. Initial program 77.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-77.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. *-commutative77.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*70.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. *-commutative70.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-70.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. *-commutative70.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*77.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. *-commutative77.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*77.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*74.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. Simplified74.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.5%

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

        \[\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 \]
    7. Simplified52.1%

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

        \[\leadsto \color{blue}{\left(\frac{a}{c} \cdot t\right)} \cdot -4 \]
    9. Applied egg-rr54.0%

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

    if -2.15e-39 < a < 1.95000000000000007e-177

    1. Initial program 81.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-81.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. *-commutative81.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*90.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. *-commutative90.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-90.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. *-commutative90.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*81.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. *-commutative81.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*81.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*90.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. Simplified90.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. Applied egg-rr81.9%

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

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

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

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

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

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

    if 1.95000000000000007e-177 < a < 1.7e-126 or 2.30000000000000009e-17 < a < 3.40000000000000019e113

    1. Initial program 70.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-70.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. *-commutative70.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*70.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. *-commutative70.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-70.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. *-commutative70.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*70.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. *-commutative70.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*70.2%

        \[\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*69.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. Simplified69.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 35.4%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{9}{\frac{z}{y}}} \cdot \frac{x}{c} \]
      2. clear-num42.3%

        \[\leadsto \frac{9}{\frac{z}{y}} \cdot \color{blue}{\frac{1}{\frac{c}{x}}} \]
      3. frac-times42.4%

        \[\leadsto \color{blue}{\frac{9 \cdot 1}{\frac{z}{y} \cdot \frac{c}{x}}} \]
      4. metadata-eval42.4%

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

      \[\leadsto \color{blue}{\frac{9}{\frac{z}{y} \cdot \frac{c}{x}}} \]
    10. Taylor expanded in z around 0 35.4%

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

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

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

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

        \[\leadsto 9 \cdot \color{blue}{\left(y \cdot \frac{\frac{x}{z}}{c}\right)} \]
    12. Simplified38.0%

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

    if 1.7e-126 < a < 2.30000000000000009e-17

    1. Initial program 91.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-91.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. *-commutative91.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*91.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. *-commutative91.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-91.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. *-commutative91.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*91.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. *-commutative91.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*91.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*91.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. Simplified91.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 38.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.15 \cdot 10^{-39}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \mathbf{elif}\;a \leq 1.95 \cdot 10^{-177}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-126}:\\ \;\;\;\;9 \cdot \left(y \cdot \frac{\frac{x}{z}}{c}\right)\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{-17}:\\ \;\;\;\;\frac{b}{c \cdot z}\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{+113}:\\ \;\;\;\;9 \cdot \left(y \cdot \frac{\frac{x}{z}}{c}\right)\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 50.4% accurate, 0.6× speedup?

\[\begin{array}{l} c_m = \left|c\right| \\ c_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ \begin{array}{l} t_1 := -4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\ t_2 := 9 \cdot \frac{y}{\frac{c_m}{\frac{x}{z}}}\\ c_s \cdot \begin{array}{l} \mathbf{if}\;a \leq -3.8 \cdot 10^{-42}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{-207}:\\ \;\;\;\;\frac{\frac{b}{c_m}}{z}\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-126}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-17}:\\ \;\;\;\;\frac{b}{c_m \cdot z}\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{+113}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \end{array} \]
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (let* ((t_1 (* -4.0 (* t (/ a c_m)))) (t_2 (* 9.0 (/ y (/ c_m (/ x z))))))
   (*
    c_s
    (if (<= a -3.8e-42)
      t_1
      (if (<= a 4.2e-207)
        (/ (/ b c_m) z)
        (if (<= a 3.8e-126)
          t_2
          (if (<= a 5.5e-17)
            (/ b (* c_m z))
            (if (<= a 3.4e+113) t_2 t_1))))))))
c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = -4.0 * (t * (a / c_m));
	double t_2 = 9.0 * (y / (c_m / (x / z)));
	double tmp;
	if (a <= -3.8e-42) {
		tmp = t_1;
	} else if (a <= 4.2e-207) {
		tmp = (b / c_m) / z;
	} else if (a <= 3.8e-126) {
		tmp = t_2;
	} else if (a <= 5.5e-17) {
		tmp = b / (c_m * z);
	} else if (a <= 3.4e+113) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
    real(8), intent (in) :: c_s
    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_m
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (-4.0d0) * (t * (a / c_m))
    t_2 = 9.0d0 * (y / (c_m / (x / z)))
    if (a <= (-3.8d-42)) then
        tmp = t_1
    else if (a <= 4.2d-207) then
        tmp = (b / c_m) / z
    else if (a <= 3.8d-126) then
        tmp = t_2
    else if (a <= 5.5d-17) then
        tmp = b / (c_m * z)
    else if (a <= 3.4d+113) then
        tmp = t_2
    else
        tmp = t_1
    end if
    code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = -4.0 * (t * (a / c_m));
	double t_2 = 9.0 * (y / (c_m / (x / z)));
	double tmp;
	if (a <= -3.8e-42) {
		tmp = t_1;
	} else if (a <= 4.2e-207) {
		tmp = (b / c_m) / z;
	} else if (a <= 3.8e-126) {
		tmp = t_2;
	} else if (a <= 5.5e-17) {
		tmp = b / (c_m * z);
	} else if (a <= 3.4e+113) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return c_s * tmp;
}
c_m = math.fabs(c)
c_s = math.copysign(1.0, c)
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
def code(c_s, x, y, z, t, a, b, c_m):
	t_1 = -4.0 * (t * (a / c_m))
	t_2 = 9.0 * (y / (c_m / (x / z)))
	tmp = 0
	if a <= -3.8e-42:
		tmp = t_1
	elif a <= 4.2e-207:
		tmp = (b / c_m) / z
	elif a <= 3.8e-126:
		tmp = t_2
	elif a <= 5.5e-17:
		tmp = b / (c_m * z)
	elif a <= 3.4e+113:
		tmp = t_2
	else:
		tmp = t_1
	return c_s * tmp
c_m = abs(c)
c_s = copysign(1.0, c)
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
function code(c_s, x, y, z, t, a, b, c_m)
	t_1 = Float64(-4.0 * Float64(t * Float64(a / c_m)))
	t_2 = Float64(9.0 * Float64(y / Float64(c_m / Float64(x / z))))
	tmp = 0.0
	if (a <= -3.8e-42)
		tmp = t_1;
	elseif (a <= 4.2e-207)
		tmp = Float64(Float64(b / c_m) / z);
	elseif (a <= 3.8e-126)
		tmp = t_2;
	elseif (a <= 5.5e-17)
		tmp = Float64(b / Float64(c_m * z));
	elseif (a <= 3.4e+113)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return Float64(c_s * tmp)
end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
	t_1 = -4.0 * (t * (a / c_m));
	t_2 = 9.0 * (y / (c_m / (x / z)));
	tmp = 0.0;
	if (a <= -3.8e-42)
		tmp = t_1;
	elseif (a <= 4.2e-207)
		tmp = (b / c_m) / z;
	elseif (a <= 3.8e-126)
		tmp = t_2;
	elseif (a <= 5.5e-17)
		tmp = b / (c_m * z);
	elseif (a <= 3.4e+113)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(y / N[(c$95$m / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[a, -3.8e-42], t$95$1, If[LessEqual[a, 4.2e-207], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 3.8e-126], t$95$2, If[LessEqual[a, 5.5e-17], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.4e+113], t$95$2, t$95$1]]]]]), $MachinePrecision]]]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\
t_2 := 9 \cdot \frac{y}{\frac{c_m}{\frac{x}{z}}}\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq -3.8 \cdot 10^{-42}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 4.2 \cdot 10^{-207}:\\
\;\;\;\;\frac{\frac{b}{c_m}}{z}\\

\mathbf{elif}\;a \leq 3.8 \cdot 10^{-126}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 5.5 \cdot 10^{-17}:\\
\;\;\;\;\frac{b}{c_m \cdot z}\\

\mathbf{elif}\;a \leq 3.4 \cdot 10^{+113}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -3.80000000000000017e-42 or 3.40000000000000019e113 < a

    1. Initial program 77.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-77.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. *-commutative77.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*70.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. *-commutative70.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-70.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. *-commutative70.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*77.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. *-commutative77.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*77.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*74.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. Simplified74.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.5%

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

        \[\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 \]
    7. Simplified52.1%

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

        \[\leadsto \color{blue}{\left(\frac{a}{c} \cdot t\right)} \cdot -4 \]
    9. Applied egg-rr54.0%

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

    if -3.80000000000000017e-42 < a < 4.20000000000000007e-207

    1. Initial program 82.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-82.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. *-commutative82.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*91.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. *-commutative91.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-91.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. *-commutative91.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*82.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. *-commutative82.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*82.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.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. Simplified91.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. Applied egg-rr83.4%

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

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

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

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

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

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

    if 4.20000000000000007e-207 < a < 3.7999999999999999e-126 or 5.50000000000000001e-17 < a < 3.40000000000000019e113

    1. Initial program 72.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-72.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. *-commutative72.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*72.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. *-commutative72.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-72.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. *-commutative72.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*72.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. *-commutative72.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*72.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*71.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. Simplified71.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. Applied egg-rr76.1%

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

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

        \[\leadsto 9 \cdot \frac{\color{blue}{y \cdot x}}{c \cdot z} \]
      2. *-commutative34.8%

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

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

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

        \[\leadsto 9 \cdot \frac{y}{\color{blue}{\frac{c}{\frac{x}{z}}}} \]
    8. Simplified38.8%

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

    if 3.7999999999999999e-126 < a < 5.50000000000000001e-17

    1. Initial program 91.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-91.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. *-commutative91.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*91.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. *-commutative91.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-91.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. *-commutative91.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*91.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. *-commutative91.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*91.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*91.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. Simplified91.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 38.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.8 \cdot 10^{-42}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{-207}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-126}:\\ \;\;\;\;9 \cdot \frac{y}{\frac{c}{\frac{x}{z}}}\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-17}:\\ \;\;\;\;\frac{b}{c \cdot z}\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{+113}:\\ \;\;\;\;9 \cdot \frac{y}{\frac{c}{\frac{x}{z}}}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 50.4% accurate, 0.6× speedup?

\[\begin{array}{l} c_m = \left|c\right| \\ c_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ \begin{array}{l} t_1 := -4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\ c_s \cdot \begin{array}{l} \mathbf{if}\;a \leq -4.1 \cdot 10^{-39}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{-171}:\\ \;\;\;\;\frac{\frac{b}{c_m}}{z}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{-126}:\\ \;\;\;\;9 \cdot \frac{x \cdot y}{c_m \cdot z}\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-17}:\\ \;\;\;\;\frac{b}{c_m \cdot z}\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{+113}:\\ \;\;\;\;9 \cdot \frac{y}{\frac{c_m}{\frac{x}{z}}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \end{array} \]
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (let* ((t_1 (* -4.0 (* t (/ a c_m)))))
   (*
    c_s
    (if (<= a -4.1e-39)
      t_1
      (if (<= a 3.1e-171)
        (/ (/ b c_m) z)
        (if (<= a 1.35e-126)
          (* 9.0 (/ (* x y) (* c_m z)))
          (if (<= a 1.7e-17)
            (/ b (* c_m z))
            (if (<= a 3.4e+113) (* 9.0 (/ y (/ c_m (/ x z)))) t_1))))))))
c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = -4.0 * (t * (a / c_m));
	double tmp;
	if (a <= -4.1e-39) {
		tmp = t_1;
	} else if (a <= 3.1e-171) {
		tmp = (b / c_m) / z;
	} else if (a <= 1.35e-126) {
		tmp = 9.0 * ((x * y) / (c_m * z));
	} else if (a <= 1.7e-17) {
		tmp = b / (c_m * z);
	} else if (a <= 3.4e+113) {
		tmp = 9.0 * (y / (c_m / (x / z)));
	} else {
		tmp = t_1;
	}
	return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
    real(8), intent (in) :: c_s
    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_m
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (-4.0d0) * (t * (a / c_m))
    if (a <= (-4.1d-39)) then
        tmp = t_1
    else if (a <= 3.1d-171) then
        tmp = (b / c_m) / z
    else if (a <= 1.35d-126) then
        tmp = 9.0d0 * ((x * y) / (c_m * z))
    else if (a <= 1.7d-17) then
        tmp = b / (c_m * z)
    else if (a <= 3.4d+113) then
        tmp = 9.0d0 * (y / (c_m / (x / z)))
    else
        tmp = t_1
    end if
    code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = -4.0 * (t * (a / c_m));
	double tmp;
	if (a <= -4.1e-39) {
		tmp = t_1;
	} else if (a <= 3.1e-171) {
		tmp = (b / c_m) / z;
	} else if (a <= 1.35e-126) {
		tmp = 9.0 * ((x * y) / (c_m * z));
	} else if (a <= 1.7e-17) {
		tmp = b / (c_m * z);
	} else if (a <= 3.4e+113) {
		tmp = 9.0 * (y / (c_m / (x / z)));
	} else {
		tmp = t_1;
	}
	return c_s * tmp;
}
c_m = math.fabs(c)
c_s = math.copysign(1.0, c)
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
def code(c_s, x, y, z, t, a, b, c_m):
	t_1 = -4.0 * (t * (a / c_m))
	tmp = 0
	if a <= -4.1e-39:
		tmp = t_1
	elif a <= 3.1e-171:
		tmp = (b / c_m) / z
	elif a <= 1.35e-126:
		tmp = 9.0 * ((x * y) / (c_m * z))
	elif a <= 1.7e-17:
		tmp = b / (c_m * z)
	elif a <= 3.4e+113:
		tmp = 9.0 * (y / (c_m / (x / z)))
	else:
		tmp = t_1
	return c_s * tmp
c_m = abs(c)
c_s = copysign(1.0, c)
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
function code(c_s, x, y, z, t, a, b, c_m)
	t_1 = Float64(-4.0 * Float64(t * Float64(a / c_m)))
	tmp = 0.0
	if (a <= -4.1e-39)
		tmp = t_1;
	elseif (a <= 3.1e-171)
		tmp = Float64(Float64(b / c_m) / z);
	elseif (a <= 1.35e-126)
		tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(c_m * z)));
	elseif (a <= 1.7e-17)
		tmp = Float64(b / Float64(c_m * z));
	elseif (a <= 3.4e+113)
		tmp = Float64(9.0 * Float64(y / Float64(c_m / Float64(x / z))));
	else
		tmp = t_1;
	end
	return Float64(c_s * tmp)
end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
	t_1 = -4.0 * (t * (a / c_m));
	tmp = 0.0;
	if (a <= -4.1e-39)
		tmp = t_1;
	elseif (a <= 3.1e-171)
		tmp = (b / c_m) / z;
	elseif (a <= 1.35e-126)
		tmp = 9.0 * ((x * y) / (c_m * z));
	elseif (a <= 1.7e-17)
		tmp = b / (c_m * z);
	elseif (a <= 3.4e+113)
		tmp = 9.0 * (y / (c_m / (x / z)));
	else
		tmp = t_1;
	end
	tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[a, -4.1e-39], t$95$1, If[LessEqual[a, 3.1e-171], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 1.35e-126], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.7e-17], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.4e+113], N[(9.0 * N[(y / N[(c$95$m / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]), $MachinePrecision]]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq -4.1 \cdot 10^{-39}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 3.1 \cdot 10^{-171}:\\
\;\;\;\;\frac{\frac{b}{c_m}}{z}\\

\mathbf{elif}\;a \leq 1.35 \cdot 10^{-126}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{c_m \cdot z}\\

\mathbf{elif}\;a \leq 1.7 \cdot 10^{-17}:\\
\;\;\;\;\frac{b}{c_m \cdot z}\\

\mathbf{elif}\;a \leq 3.4 \cdot 10^{+113}:\\
\;\;\;\;9 \cdot \frac{y}{\frac{c_m}{\frac{x}{z}}}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -4.1e-39 or 3.40000000000000019e113 < a

    1. Initial program 77.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-77.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. *-commutative77.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*70.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. *-commutative70.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-70.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. *-commutative70.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*77.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. *-commutative77.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*77.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*74.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. Simplified74.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.5%

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

        \[\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 \]
    7. Simplified52.1%

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

        \[\leadsto \color{blue}{\left(\frac{a}{c} \cdot t\right)} \cdot -4 \]
    9. Applied egg-rr54.0%

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

    if -4.1e-39 < a < 3.1e-171

    1. Initial program 81.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-81.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. *-commutative81.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*89.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. *-commutative89.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-89.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. *-commutative89.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*81.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. *-commutative81.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*81.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*89.2%

        \[\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.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 c}} \]
    4. Add Preprocessing
    5. Applied egg-rr81.2%

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

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

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

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

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

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

    if 3.1e-171 < a < 1.34999999999999998e-126

    1. Initial program 78.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-78.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. *-commutative78.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*78.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. *-commutative78.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-78.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. *-commutative78.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*78.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. *-commutative78.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*78.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*76.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. Simplified76.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 x around inf 55.9%

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

    if 1.34999999999999998e-126 < a < 1.6999999999999999e-17

    1. Initial program 91.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-91.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. *-commutative91.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*91.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. *-commutative91.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-91.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. *-commutative91.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*91.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. *-commutative91.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*91.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*91.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. Simplified91.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 38.3%

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

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

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

    if 1.6999999999999999e-17 < a < 3.40000000000000019e113

    1. Initial program 67.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-67.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. *-commutative67.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*67.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. *-commutative67.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-67.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. *-commutative67.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*67.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. *-commutative67.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*67.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*67.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. Simplified67.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. Applied egg-rr71.7%

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

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

        \[\leadsto 9 \cdot \frac{\color{blue}{y \cdot x}}{c \cdot z} \]
      2. *-commutative28.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.1 \cdot 10^{-39}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{-171}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{-126}:\\ \;\;\;\;9 \cdot \frac{x \cdot y}{c \cdot z}\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-17}:\\ \;\;\;\;\frac{b}{c \cdot z}\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{+113}:\\ \;\;\;\;9 \cdot \frac{y}{\frac{c}{\frac{x}{z}}}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 50.4% accurate, 0.6× speedup?

\[\begin{array}{l} c_m = \left|c\right| \\ c_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ \begin{array}{l} t_1 := -4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\ c_s \cdot \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{-35}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-178}:\\ \;\;\;\;\frac{\frac{b}{c_m}}{z}\\ \mathbf{elif}\;a \leq 1.75 \cdot 10^{-127}:\\ \;\;\;\;\frac{x}{c_m} \cdot \frac{9 \cdot y}{z}\\ \mathbf{elif}\;a \leq 4 \cdot 10^{-17}:\\ \;\;\;\;\frac{b}{c_m \cdot z}\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{+113}:\\ \;\;\;\;9 \cdot \frac{y}{\frac{c_m}{\frac{x}{z}}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \end{array} \]
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (let* ((t_1 (* -4.0 (* t (/ a c_m)))))
   (*
    c_s
    (if (<= a -2.3e-35)
      t_1
      (if (<= a 3.8e-178)
        (/ (/ b c_m) z)
        (if (<= a 1.75e-127)
          (* (/ x c_m) (/ (* 9.0 y) z))
          (if (<= a 4e-17)
            (/ b (* c_m z))
            (if (<= a 3.5e+113) (* 9.0 (/ y (/ c_m (/ x z)))) t_1))))))))
c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = -4.0 * (t * (a / c_m));
	double tmp;
	if (a <= -2.3e-35) {
		tmp = t_1;
	} else if (a <= 3.8e-178) {
		tmp = (b / c_m) / z;
	} else if (a <= 1.75e-127) {
		tmp = (x / c_m) * ((9.0 * y) / z);
	} else if (a <= 4e-17) {
		tmp = b / (c_m * z);
	} else if (a <= 3.5e+113) {
		tmp = 9.0 * (y / (c_m / (x / z)));
	} else {
		tmp = t_1;
	}
	return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
    real(8), intent (in) :: c_s
    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_m
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (-4.0d0) * (t * (a / c_m))
    if (a <= (-2.3d-35)) then
        tmp = t_1
    else if (a <= 3.8d-178) then
        tmp = (b / c_m) / z
    else if (a <= 1.75d-127) then
        tmp = (x / c_m) * ((9.0d0 * y) / z)
    else if (a <= 4d-17) then
        tmp = b / (c_m * z)
    else if (a <= 3.5d+113) then
        tmp = 9.0d0 * (y / (c_m / (x / z)))
    else
        tmp = t_1
    end if
    code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = -4.0 * (t * (a / c_m));
	double tmp;
	if (a <= -2.3e-35) {
		tmp = t_1;
	} else if (a <= 3.8e-178) {
		tmp = (b / c_m) / z;
	} else if (a <= 1.75e-127) {
		tmp = (x / c_m) * ((9.0 * y) / z);
	} else if (a <= 4e-17) {
		tmp = b / (c_m * z);
	} else if (a <= 3.5e+113) {
		tmp = 9.0 * (y / (c_m / (x / z)));
	} else {
		tmp = t_1;
	}
	return c_s * tmp;
}
c_m = math.fabs(c)
c_s = math.copysign(1.0, c)
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
def code(c_s, x, y, z, t, a, b, c_m):
	t_1 = -4.0 * (t * (a / c_m))
	tmp = 0
	if a <= -2.3e-35:
		tmp = t_1
	elif a <= 3.8e-178:
		tmp = (b / c_m) / z
	elif a <= 1.75e-127:
		tmp = (x / c_m) * ((9.0 * y) / z)
	elif a <= 4e-17:
		tmp = b / (c_m * z)
	elif a <= 3.5e+113:
		tmp = 9.0 * (y / (c_m / (x / z)))
	else:
		tmp = t_1
	return c_s * tmp
c_m = abs(c)
c_s = copysign(1.0, c)
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
function code(c_s, x, y, z, t, a, b, c_m)
	t_1 = Float64(-4.0 * Float64(t * Float64(a / c_m)))
	tmp = 0.0
	if (a <= -2.3e-35)
		tmp = t_1;
	elseif (a <= 3.8e-178)
		tmp = Float64(Float64(b / c_m) / z);
	elseif (a <= 1.75e-127)
		tmp = Float64(Float64(x / c_m) * Float64(Float64(9.0 * y) / z));
	elseif (a <= 4e-17)
		tmp = Float64(b / Float64(c_m * z));
	elseif (a <= 3.5e+113)
		tmp = Float64(9.0 * Float64(y / Float64(c_m / Float64(x / z))));
	else
		tmp = t_1;
	end
	return Float64(c_s * tmp)
end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
	t_1 = -4.0 * (t * (a / c_m));
	tmp = 0.0;
	if (a <= -2.3e-35)
		tmp = t_1;
	elseif (a <= 3.8e-178)
		tmp = (b / c_m) / z;
	elseif (a <= 1.75e-127)
		tmp = (x / c_m) * ((9.0 * y) / z);
	elseif (a <= 4e-17)
		tmp = b / (c_m * z);
	elseif (a <= 3.5e+113)
		tmp = 9.0 * (y / (c_m / (x / z)));
	else
		tmp = t_1;
	end
	tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[a, -2.3e-35], t$95$1, If[LessEqual[a, 3.8e-178], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 1.75e-127], N[(N[(x / c$95$m), $MachinePrecision] * N[(N[(9.0 * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4e-17], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.5e+113], N[(9.0 * N[(y / N[(c$95$m / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]), $MachinePrecision]]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq -2.3 \cdot 10^{-35}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 3.8 \cdot 10^{-178}:\\
\;\;\;\;\frac{\frac{b}{c_m}}{z}\\

\mathbf{elif}\;a \leq 1.75 \cdot 10^{-127}:\\
\;\;\;\;\frac{x}{c_m} \cdot \frac{9 \cdot y}{z}\\

\mathbf{elif}\;a \leq 4 \cdot 10^{-17}:\\
\;\;\;\;\frac{b}{c_m \cdot z}\\

\mathbf{elif}\;a \leq 3.5 \cdot 10^{+113}:\\
\;\;\;\;9 \cdot \frac{y}{\frac{c_m}{\frac{x}{z}}}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -2.2999999999999999e-35 or 3.5000000000000001e113 < a

    1. Initial program 77.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-77.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. *-commutative77.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*70.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. *-commutative70.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-70.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. *-commutative70.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*77.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. *-commutative77.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*77.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*74.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. Simplified74.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.5%

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

        \[\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 \]
    7. Simplified52.1%

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

        \[\leadsto \color{blue}{\left(\frac{a}{c} \cdot t\right)} \cdot -4 \]
    9. Applied egg-rr54.0%

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

    if -2.2999999999999999e-35 < a < 3.80000000000000015e-178

    1. Initial program 81.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-81.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. *-commutative81.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*90.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. *-commutative90.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-90.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. *-commutative90.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*81.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. *-commutative81.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*81.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*90.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. Simplified90.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. Applied egg-rr81.9%

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

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

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

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

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

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

    if 3.80000000000000015e-178 < a < 1.74999999999999995e-127

    1. Initial program 74.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-74.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. *-commutative74.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*74.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. *-commutative74.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-74.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. *-commutative74.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.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. *-commutative74.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*75.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*73.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. Simplified73.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 x around inf 48.9%

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

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

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

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

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

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

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

    if 1.74999999999999995e-127 < a < 4.00000000000000029e-17

    1. Initial program 91.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-91.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. *-commutative91.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*91.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. *-commutative91.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-91.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. *-commutative91.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*91.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. *-commutative91.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*91.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*91.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. Simplified91.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 38.3%

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

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

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

    if 4.00000000000000029e-17 < a < 3.5000000000000001e113

    1. Initial program 67.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-67.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. *-commutative67.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*67.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. *-commutative67.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-67.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. *-commutative67.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*67.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. *-commutative67.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*67.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*67.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. Simplified67.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. Applied egg-rr71.7%

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

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

        \[\leadsto 9 \cdot \frac{\color{blue}{y \cdot x}}{c \cdot z} \]
      2. *-commutative28.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{-35}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-178}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;a \leq 1.75 \cdot 10^{-127}:\\ \;\;\;\;\frac{x}{c} \cdot \frac{9 \cdot y}{z}\\ \mathbf{elif}\;a \leq 4 \cdot 10^{-17}:\\ \;\;\;\;\frac{b}{c \cdot z}\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{+113}:\\ \;\;\;\;9 \cdot \frac{y}{\frac{c}{\frac{x}{z}}}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 86.5% accurate, 0.7× speedup?

\[\begin{array}{l} c_m = \left|c\right| \\ c_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ c_s \cdot \begin{array}{l} \mathbf{if}\;c_m \leq 6.5 \cdot 10^{-65}:\\ \;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{c_m \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{b}{c_m \cdot z} + 9 \cdot \frac{x \cdot y}{c_m \cdot z}\right) - 4 \cdot \frac{t \cdot a}{c_m}\\ \end{array} \end{array} \]
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (*
  c_s
  (if (<= c_m 6.5e-65)
    (/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* t a)))) (* c_m z))
    (-
     (+ (/ b (* c_m z)) (* 9.0 (/ (* x y) (* c_m z))))
     (* 4.0 (/ (* t a) c_m))))))
c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double tmp;
	if (c_m <= 6.5e-65) {
		tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z);
	} else {
		tmp = ((b / (c_m * z)) + (9.0 * ((x * y) / (c_m * z)))) - (4.0 * ((t * a) / c_m));
	}
	return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
    real(8), intent (in) :: c_s
    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_m
    real(8) :: tmp
    if (c_m <= 6.5d-65) then
        tmp = (b + ((x * (9.0d0 * y)) - ((z * 4.0d0) * (t * a)))) / (c_m * z)
    else
        tmp = ((b / (c_m * z)) + (9.0d0 * ((x * y) / (c_m * z)))) - (4.0d0 * ((t * a) / c_m))
    end if
    code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double tmp;
	if (c_m <= 6.5e-65) {
		tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z);
	} else {
		tmp = ((b / (c_m * z)) + (9.0 * ((x * y) / (c_m * z)))) - (4.0 * ((t * a) / c_m));
	}
	return c_s * tmp;
}
c_m = math.fabs(c)
c_s = math.copysign(1.0, c)
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
def code(c_s, x, y, z, t, a, b, c_m):
	tmp = 0
	if c_m <= 6.5e-65:
		tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z)
	else:
		tmp = ((b / (c_m * z)) + (9.0 * ((x * y) / (c_m * z)))) - (4.0 * ((t * a) / c_m))
	return c_s * tmp
c_m = abs(c)
c_s = copysign(1.0, c)
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
function code(c_s, x, y, z, t, a, b, c_m)
	tmp = 0.0
	if (c_m <= 6.5e-65)
		tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(t * a)))) / Float64(c_m * z));
	else
		tmp = Float64(Float64(Float64(b / Float64(c_m * z)) + Float64(9.0 * Float64(Float64(x * y) / Float64(c_m * z)))) - Float64(4.0 * Float64(Float64(t * a) / c_m)));
	end
	return Float64(c_s * tmp)
end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
	tmp = 0.0;
	if (c_m <= 6.5e-65)
		tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (c_m * z);
	else
		tmp = ((b / (c_m * z)) + (9.0 * ((x * y) / (c_m * z)))) - (4.0 * ((t * a) / c_m));
	end
	tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[c$95$m, 6.5e-65], 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[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;c_m \leq 6.5 \cdot 10^{-65}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{c_m \cdot z}\\

\mathbf{else}:\\
\;\;\;\;\left(\frac{b}{c_m \cdot z} + 9 \cdot \frac{x \cdot y}{c_m \cdot z}\right) - 4 \cdot \frac{t \cdot a}{c_m}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < 6.5e-65

    1. Initial program 81.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-81.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. *-commutative81.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*80.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. *-commutative80.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-80.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. *-commutative80.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*81.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. *-commutative81.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*81.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.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. Simplified83.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

    if 6.5e-65 < c

    1. Initial program 73.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-73.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. *-commutative73.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*74.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. *-commutative74.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-74.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. *-commutative74.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*73.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. *-commutative73.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*73.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*73.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. Simplified73.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 0 81.2%

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

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

Alternative 9: 49.2% accurate, 0.7× speedup?

\[\begin{array}{l} c_m = \left|c\right| \\ c_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ \begin{array}{l} t_1 := -4 \cdot \left(a \cdot \frac{t}{c_m}\right)\\ c_s \cdot \begin{array}{l} \mathbf{if}\;a \leq -2.9 \cdot 10^{-39}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{-20}:\\ \;\;\;\;\frac{b}{c_m \cdot z}\\ \mathbf{elif}\;a \leq 5 \cdot 10^{+82} \lor \neg \left(a \leq 1.6 \cdot 10^{+114}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b}{c_m}}{z}\\ \end{array} \end{array} \end{array} \]
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (let* ((t_1 (* -4.0 (* a (/ t c_m)))))
   (*
    c_s
    (if (<= a -2.9e-39)
      t_1
      (if (<= a 4.4e-20)
        (/ b (* c_m z))
        (if (or (<= a 5e+82) (not (<= a 1.6e+114))) t_1 (/ (/ b c_m) z)))))))
c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = -4.0 * (a * (t / c_m));
	double tmp;
	if (a <= -2.9e-39) {
		tmp = t_1;
	} else if (a <= 4.4e-20) {
		tmp = b / (c_m * z);
	} else if ((a <= 5e+82) || !(a <= 1.6e+114)) {
		tmp = t_1;
	} else {
		tmp = (b / c_m) / z;
	}
	return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
    real(8), intent (in) :: c_s
    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_m
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (-4.0d0) * (a * (t / c_m))
    if (a <= (-2.9d-39)) then
        tmp = t_1
    else if (a <= 4.4d-20) then
        tmp = b / (c_m * z)
    else if ((a <= 5d+82) .or. (.not. (a <= 1.6d+114))) then
        tmp = t_1
    else
        tmp = (b / c_m) / z
    end if
    code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = -4.0 * (a * (t / c_m));
	double tmp;
	if (a <= -2.9e-39) {
		tmp = t_1;
	} else if (a <= 4.4e-20) {
		tmp = b / (c_m * z);
	} else if ((a <= 5e+82) || !(a <= 1.6e+114)) {
		tmp = t_1;
	} else {
		tmp = (b / c_m) / z;
	}
	return c_s * tmp;
}
c_m = math.fabs(c)
c_s = math.copysign(1.0, c)
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
def code(c_s, x, y, z, t, a, b, c_m):
	t_1 = -4.0 * (a * (t / c_m))
	tmp = 0
	if a <= -2.9e-39:
		tmp = t_1
	elif a <= 4.4e-20:
		tmp = b / (c_m * z)
	elif (a <= 5e+82) or not (a <= 1.6e+114):
		tmp = t_1
	else:
		tmp = (b / c_m) / z
	return c_s * tmp
c_m = abs(c)
c_s = copysign(1.0, c)
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
function code(c_s, x, y, z, t, a, b, c_m)
	t_1 = Float64(-4.0 * Float64(a * Float64(t / c_m)))
	tmp = 0.0
	if (a <= -2.9e-39)
		tmp = t_1;
	elseif (a <= 4.4e-20)
		tmp = Float64(b / Float64(c_m * z));
	elseif ((a <= 5e+82) || !(a <= 1.6e+114))
		tmp = t_1;
	else
		tmp = Float64(Float64(b / c_m) / z);
	end
	return Float64(c_s * tmp)
end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
	t_1 = -4.0 * (a * (t / c_m));
	tmp = 0.0;
	if (a <= -2.9e-39)
		tmp = t_1;
	elseif (a <= 4.4e-20)
		tmp = b / (c_m * z);
	elseif ((a <= 5e+82) || ~((a <= 1.6e+114)))
		tmp = t_1;
	else
		tmp = (b / c_m) / z;
	end
	tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(-4.0 * N[(a * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[a, -2.9e-39], t$95$1, If[LessEqual[a, 4.4e-20], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 5e+82], N[Not[LessEqual[a, 1.6e+114]], $MachinePrecision]], t$95$1, N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(a \cdot \frac{t}{c_m}\right)\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq -2.9 \cdot 10^{-39}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 4.4 \cdot 10^{-20}:\\
\;\;\;\;\frac{b}{c_m \cdot z}\\

\mathbf{elif}\;a \leq 5 \cdot 10^{+82} \lor \neg \left(a \leq 1.6 \cdot 10^{+114}\right):\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c_m}}{z}\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.89999999999999988e-39 or 4.39999999999999982e-20 < a < 5.00000000000000015e82 or 1.6e114 < a

    1. Initial program 75.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-75.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. *-commutative75.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*69.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. *-commutative69.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-69.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. *-commutative69.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*75.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. *-commutative75.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*75.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*72.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. Simplified72.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 46.1%

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    6. Step-by-step derivation
      1. expm1-log1p-u27.3%

        \[\leadsto -4 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{a \cdot t}{c}\right)\right)} \]
      2. expm1-udef17.9%

        \[\leadsto -4 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{a \cdot t}{c}\right)} - 1\right)} \]
      3. associate-/l*19.8%

        \[\leadsto -4 \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{a}{\frac{c}{t}}}\right)} - 1\right) \]
    7. Applied egg-rr19.8%

      \[\leadsto -4 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{a}{\frac{c}{t}}\right)} - 1\right)} \]
    8. Step-by-step derivation
      1. expm1-def27.0%

        \[\leadsto -4 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{a}{\frac{c}{t}}\right)\right)} \]
      2. expm1-log1p52.2%

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

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

        \[\leadsto -4 \cdot \color{blue}{\left(a \cdot \frac{t}{c}\right)} \]
    9. Simplified52.5%

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

    if -2.89999999999999988e-39 < a < 4.39999999999999982e-20

    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*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*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*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 49.3%

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

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

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

    if 5.00000000000000015e82 < a < 1.6e114

    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*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*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*86.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. Simplified86.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. Applied egg-rr86.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.9 \cdot 10^{-39}:\\ \;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{-20}:\\ \;\;\;\;\frac{b}{c \cdot z}\\ \mathbf{elif}\;a \leq 5 \cdot 10^{+82} \lor \neg \left(a \leq 1.6 \cdot 10^{+114}\right):\\ \;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 49.3% accurate, 0.7× speedup?

\[\begin{array}{l} c_m = \left|c\right| \\ c_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ \begin{array}{l} t_1 := -4 \cdot \left(a \cdot \frac{t}{c_m}\right)\\ c_s \cdot \begin{array}{l} \mathbf{if}\;a \leq -1.35 \cdot 10^{-38}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1550000:\\ \;\;\;\;b \cdot \frac{1}{c_m \cdot z}\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{+81} \lor \neg \left(a \leq 9.5 \cdot 10^{+113}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b}{c_m}}{z}\\ \end{array} \end{array} \end{array} \]
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (let* ((t_1 (* -4.0 (* a (/ t c_m)))))
   (*
    c_s
    (if (<= a -1.35e-38)
      t_1
      (if (<= a 1550000.0)
        (* b (/ 1.0 (* c_m z)))
        (if (or (<= a 6.6e+81) (not (<= a 9.5e+113))) t_1 (/ (/ b c_m) z)))))))
c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = -4.0 * (a * (t / c_m));
	double tmp;
	if (a <= -1.35e-38) {
		tmp = t_1;
	} else if (a <= 1550000.0) {
		tmp = b * (1.0 / (c_m * z));
	} else if ((a <= 6.6e+81) || !(a <= 9.5e+113)) {
		tmp = t_1;
	} else {
		tmp = (b / c_m) / z;
	}
	return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
    real(8), intent (in) :: c_s
    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_m
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (-4.0d0) * (a * (t / c_m))
    if (a <= (-1.35d-38)) then
        tmp = t_1
    else if (a <= 1550000.0d0) then
        tmp = b * (1.0d0 / (c_m * z))
    else if ((a <= 6.6d+81) .or. (.not. (a <= 9.5d+113))) then
        tmp = t_1
    else
        tmp = (b / c_m) / z
    end if
    code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = -4.0 * (a * (t / c_m));
	double tmp;
	if (a <= -1.35e-38) {
		tmp = t_1;
	} else if (a <= 1550000.0) {
		tmp = b * (1.0 / (c_m * z));
	} else if ((a <= 6.6e+81) || !(a <= 9.5e+113)) {
		tmp = t_1;
	} else {
		tmp = (b / c_m) / z;
	}
	return c_s * tmp;
}
c_m = math.fabs(c)
c_s = math.copysign(1.0, c)
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
def code(c_s, x, y, z, t, a, b, c_m):
	t_1 = -4.0 * (a * (t / c_m))
	tmp = 0
	if a <= -1.35e-38:
		tmp = t_1
	elif a <= 1550000.0:
		tmp = b * (1.0 / (c_m * z))
	elif (a <= 6.6e+81) or not (a <= 9.5e+113):
		tmp = t_1
	else:
		tmp = (b / c_m) / z
	return c_s * tmp
c_m = abs(c)
c_s = copysign(1.0, c)
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
function code(c_s, x, y, z, t, a, b, c_m)
	t_1 = Float64(-4.0 * Float64(a * Float64(t / c_m)))
	tmp = 0.0
	if (a <= -1.35e-38)
		tmp = t_1;
	elseif (a <= 1550000.0)
		tmp = Float64(b * Float64(1.0 / Float64(c_m * z)));
	elseif ((a <= 6.6e+81) || !(a <= 9.5e+113))
		tmp = t_1;
	else
		tmp = Float64(Float64(b / c_m) / z);
	end
	return Float64(c_s * tmp)
end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
	t_1 = -4.0 * (a * (t / c_m));
	tmp = 0.0;
	if (a <= -1.35e-38)
		tmp = t_1;
	elseif (a <= 1550000.0)
		tmp = b * (1.0 / (c_m * z));
	elseif ((a <= 6.6e+81) || ~((a <= 9.5e+113)))
		tmp = t_1;
	else
		tmp = (b / c_m) / z;
	end
	tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(-4.0 * N[(a * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[a, -1.35e-38], t$95$1, If[LessEqual[a, 1550000.0], N[(b * N[(1.0 / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 6.6e+81], N[Not[LessEqual[a, 9.5e+113]], $MachinePrecision]], t$95$1, N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(a \cdot \frac{t}{c_m}\right)\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq -1.35 \cdot 10^{-38}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1550000:\\
\;\;\;\;b \cdot \frac{1}{c_m \cdot z}\\

\mathbf{elif}\;a \leq 6.6 \cdot 10^{+81} \lor \neg \left(a \leq 9.5 \cdot 10^{+113}\right):\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c_m}}{z}\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.35000000000000003e-38 or 1.55e6 < a < 6.6e81 or 9.5000000000000001e113 < a

    1. Initial program 75.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-75.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. *-commutative75.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*69.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. *-commutative69.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-69.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. *-commutative69.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*75.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. *-commutative75.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*75.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*73.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. Simplified73.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 z around inf 47.0%

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

        \[\leadsto -4 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{a \cdot t}{c}\right)\right)} \]
      2. expm1-udef19.3%

        \[\leadsto -4 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{a \cdot t}{c}\right)} - 1\right)} \]
      3. associate-/l*21.4%

        \[\leadsto -4 \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{a}{\frac{c}{t}}}\right)} - 1\right) \]
    7. Applied egg-rr21.4%

      \[\leadsto -4 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{a}{\frac{c}{t}}\right)} - 1\right)} \]
    8. Step-by-step derivation
      1. expm1-def29.1%

        \[\leadsto -4 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{a}{\frac{c}{t}}\right)\right)} \]
      2. expm1-log1p53.5%

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

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

        \[\leadsto -4 \cdot \color{blue}{\left(a \cdot \frac{t}{c}\right)} \]
    9. Simplified53.9%

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

    if -1.35000000000000003e-38 < a < 1.55e6

    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*86.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. *-commutative86.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-86.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. *-commutative86.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*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*86.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. Simplified86.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 b around inf 46.4%

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

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

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

        \[\leadsto \color{blue}{b \cdot \frac{1}{z \cdot c}} \]
    9. Applied egg-rr46.4%

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

    if 6.6e81 < a < 9.5000000000000001e113

    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*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*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*86.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. Simplified86.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. Applied egg-rr86.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.35 \cdot 10^{-38}:\\ \;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\ \mathbf{elif}\;a \leq 1550000:\\ \;\;\;\;b \cdot \frac{1}{c \cdot z}\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{+81} \lor \neg \left(a \leq 9.5 \cdot 10^{+113}\right):\\ \;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 71.0% accurate, 0.8× speedup?

\[\begin{array}{l} c_m = \left|c\right| \\ c_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ c_s \cdot \begin{array}{l} \mathbf{if}\;x \cdot 9 \leq -2 \cdot 10^{+147}:\\ \;\;\;\;\frac{x}{c_m} \cdot \frac{9 \cdot y}{z}\\ \mathbf{elif}\;x \cdot 9 \leq 5 \cdot 10^{-51}:\\ \;\;\;\;\frac{-4 \cdot \left(t \cdot a\right) + \frac{b}{z}}{c_m}\\ \mathbf{else}:\\ \;\;\;\;9 \cdot \frac{y}{\frac{c_m}{\frac{x}{z}}}\\ \end{array} \end{array} \]
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (*
  c_s
  (if (<= (* x 9.0) -2e+147)
    (* (/ x c_m) (/ (* 9.0 y) z))
    (if (<= (* x 9.0) 5e-51)
      (/ (+ (* -4.0 (* t a)) (/ b z)) c_m)
      (* 9.0 (/ y (/ c_m (/ x z))))))))
c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double tmp;
	if ((x * 9.0) <= -2e+147) {
		tmp = (x / c_m) * ((9.0 * y) / z);
	} else if ((x * 9.0) <= 5e-51) {
		tmp = ((-4.0 * (t * a)) + (b / z)) / c_m;
	} else {
		tmp = 9.0 * (y / (c_m / (x / z)));
	}
	return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
    real(8), intent (in) :: c_s
    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_m
    real(8) :: tmp
    if ((x * 9.0d0) <= (-2d+147)) then
        tmp = (x / c_m) * ((9.0d0 * y) / z)
    else if ((x * 9.0d0) <= 5d-51) then
        tmp = (((-4.0d0) * (t * a)) + (b / z)) / c_m
    else
        tmp = 9.0d0 * (y / (c_m / (x / z)))
    end if
    code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double tmp;
	if ((x * 9.0) <= -2e+147) {
		tmp = (x / c_m) * ((9.0 * y) / z);
	} else if ((x * 9.0) <= 5e-51) {
		tmp = ((-4.0 * (t * a)) + (b / z)) / c_m;
	} else {
		tmp = 9.0 * (y / (c_m / (x / z)));
	}
	return c_s * tmp;
}
c_m = math.fabs(c)
c_s = math.copysign(1.0, c)
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
def code(c_s, x, y, z, t, a, b, c_m):
	tmp = 0
	if (x * 9.0) <= -2e+147:
		tmp = (x / c_m) * ((9.0 * y) / z)
	elif (x * 9.0) <= 5e-51:
		tmp = ((-4.0 * (t * a)) + (b / z)) / c_m
	else:
		tmp = 9.0 * (y / (c_m / (x / z)))
	return c_s * tmp
c_m = abs(c)
c_s = copysign(1.0, c)
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
function code(c_s, x, y, z, t, a, b, c_m)
	tmp = 0.0
	if (Float64(x * 9.0) <= -2e+147)
		tmp = Float64(Float64(x / c_m) * Float64(Float64(9.0 * y) / z));
	elseif (Float64(x * 9.0) <= 5e-51)
		tmp = Float64(Float64(Float64(-4.0 * Float64(t * a)) + Float64(b / z)) / c_m);
	else
		tmp = Float64(9.0 * Float64(y / Float64(c_m / Float64(x / z))));
	end
	return Float64(c_s * tmp)
end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
	tmp = 0.0;
	if ((x * 9.0) <= -2e+147)
		tmp = (x / c_m) * ((9.0 * y) / z);
	elseif ((x * 9.0) <= 5e-51)
		tmp = ((-4.0 * (t * a)) + (b / z)) / c_m;
	else
		tmp = 9.0 * (y / (c_m / (x / z)));
	end
	tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[N[(x * 9.0), $MachinePrecision], -2e+147], N[(N[(x / c$95$m), $MachinePrecision] * N[(N[(9.0 * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * 9.0), $MachinePrecision], 5e-51], N[(N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(9.0 * N[(y / N[(c$95$m / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;x \cdot 9 \leq -2 \cdot 10^{+147}:\\
\;\;\;\;\frac{x}{c_m} \cdot \frac{9 \cdot y}{z}\\

\mathbf{elif}\;x \cdot 9 \leq 5 \cdot 10^{-51}:\\
\;\;\;\;\frac{-4 \cdot \left(t \cdot a\right) + \frac{b}{z}}{c_m}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x 9) < -2e147

    1. Initial program 72.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-72.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. *-commutative72.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*74.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. *-commutative74.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-74.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. *-commutative74.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*72.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. *-commutative72.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*72.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*75.2%

        \[\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. Simplified75.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 c}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 56.1%

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

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

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

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

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

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

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

    if -2e147 < (*.f64 x 9) < 5.00000000000000004e-51

    1. Initial program 84.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-84.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. *-commutative84.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*84.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. *-commutative84.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-84.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. *-commutative84.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*84.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. *-commutative84.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*84.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*86.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. Simplified86.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 x around 0 70.3%

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

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c} + \frac{b}{c \cdot z}} \]
    7. Taylor expanded in c around 0 74.6%

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

    if 5.00000000000000004e-51 < (*.f64 x 9)

    1. Initial program 68.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-68.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. *-commutative68.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*67.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. *-commutative67.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-67.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. *-commutative67.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*68.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. *-commutative68.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*68.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*68.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. Simplified68.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. Applied egg-rr77.3%

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

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

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

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

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

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

        \[\leadsto 9 \cdot \frac{y}{\color{blue}{\frac{c}{\frac{x}{z}}}} \]
    8. Simplified44.4%

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

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

Alternative 12: 75.4% accurate, 0.9× speedup?

\[\begin{array}{l} c_m = \left|c\right| \\ c_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ c_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{-100} \lor \neg \left(z \leq 8.8 \cdot 10^{+18}\right):\\ \;\;\;\;\frac{-4 \cdot \left(t \cdot a\right) + \frac{b}{z}}{c_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{b + y \cdot \left(x \cdot 9\right)}{c_m \cdot z}\\ \end{array} \end{array} \]
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (*
  c_s
  (if (or (<= z -2e-100) (not (<= z 8.8e+18)))
    (/ (+ (* -4.0 (* t a)) (/ b z)) c_m)
    (/ (+ b (* y (* x 9.0))) (* c_m z)))))
c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double tmp;
	if ((z <= -2e-100) || !(z <= 8.8e+18)) {
		tmp = ((-4.0 * (t * a)) + (b / z)) / c_m;
	} else {
		tmp = (b + (y * (x * 9.0))) / (c_m * z);
	}
	return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
    real(8), intent (in) :: c_s
    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_m
    real(8) :: tmp
    if ((z <= (-2d-100)) .or. (.not. (z <= 8.8d+18))) then
        tmp = (((-4.0d0) * (t * a)) + (b / z)) / c_m
    else
        tmp = (b + (y * (x * 9.0d0))) / (c_m * z)
    end if
    code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double tmp;
	if ((z <= -2e-100) || !(z <= 8.8e+18)) {
		tmp = ((-4.0 * (t * a)) + (b / z)) / c_m;
	} else {
		tmp = (b + (y * (x * 9.0))) / (c_m * z);
	}
	return c_s * tmp;
}
c_m = math.fabs(c)
c_s = math.copysign(1.0, c)
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
def code(c_s, x, y, z, t, a, b, c_m):
	tmp = 0
	if (z <= -2e-100) or not (z <= 8.8e+18):
		tmp = ((-4.0 * (t * a)) + (b / z)) / c_m
	else:
		tmp = (b + (y * (x * 9.0))) / (c_m * z)
	return c_s * tmp
c_m = abs(c)
c_s = copysign(1.0, c)
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
function code(c_s, x, y, z, t, a, b, c_m)
	tmp = 0.0
	if ((z <= -2e-100) || !(z <= 8.8e+18))
		tmp = Float64(Float64(Float64(-4.0 * Float64(t * a)) + Float64(b / z)) / c_m);
	else
		tmp = Float64(Float64(b + Float64(y * Float64(x * 9.0))) / Float64(c_m * z));
	end
	return Float64(c_s * tmp)
end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
	tmp = 0.0;
	if ((z <= -2e-100) || ~((z <= 8.8e+18)))
		tmp = ((-4.0 * (t * a)) + (b / z)) / c_m;
	else
		tmp = (b + (y * (x * 9.0))) / (c_m * z);
	end
	tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[Or[LessEqual[z, -2e-100], N[Not[LessEqual[z, 8.8e+18]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(b + N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{-100} \lor \neg \left(z \leq 8.8 \cdot 10^{+18}\right):\\
\;\;\;\;\frac{-4 \cdot \left(t \cdot a\right) + \frac{b}{z}}{c_m}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2e-100 or 8.8e18 < z

    1. Initial program 64.2%

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

        \[\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. *-commutative64.2%

        \[\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*64.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. *-commutative64.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-64.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. *-commutative64.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*64.2%

        \[\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. *-commutative64.2%

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

        \[\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*68.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. Simplified68.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 x around 0 53.3%

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

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c} + \frac{b}{c \cdot z}} \]
    7. Taylor expanded in c around 0 71.7%

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

    if -2e-100 < z < 8.8e18

    1. Initial program 95.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-95.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. *-commutative95.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*95.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. *-commutative95.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-95.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. *-commutative95.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*95.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. *-commutative95.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*95.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*93.2%

        \[\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. Simplified93.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 c}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 84.4%

      \[\leadsto \frac{\color{blue}{9 \cdot \left(x \cdot y\right)} + b}{z \cdot c} \]
    6. Step-by-step derivation
      1. associate-*r*84.4%

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

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

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

Alternative 13: 74.5% accurate, 0.9× speedup?

\[\begin{array}{l} c_m = \left|c\right| \\ c_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ c_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{-100}:\\ \;\;\;\;\frac{b}{c_m \cdot z} + -4 \cdot \frac{a}{\frac{c_m}{t}}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+18}:\\ \;\;\;\;\frac{b + y \cdot \left(x \cdot 9\right)}{c_m \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{-4 \cdot \left(t \cdot a\right) + \frac{b}{z}}{c_m}\\ \end{array} \end{array} \]
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (*
  c_s
  (if (<= z -1.75e-100)
    (+ (/ b (* c_m z)) (* -4.0 (/ a (/ c_m t))))
    (if (<= z 1.3e+18)
      (/ (+ b (* y (* x 9.0))) (* c_m z))
      (/ (+ (* -4.0 (* t a)) (/ b z)) c_m)))))
c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double tmp;
	if (z <= -1.75e-100) {
		tmp = (b / (c_m * z)) + (-4.0 * (a / (c_m / t)));
	} else if (z <= 1.3e+18) {
		tmp = (b + (y * (x * 9.0))) / (c_m * z);
	} else {
		tmp = ((-4.0 * (t * a)) + (b / z)) / c_m;
	}
	return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
    real(8), intent (in) :: c_s
    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_m
    real(8) :: tmp
    if (z <= (-1.75d-100)) then
        tmp = (b / (c_m * z)) + ((-4.0d0) * (a / (c_m / t)))
    else if (z <= 1.3d+18) then
        tmp = (b + (y * (x * 9.0d0))) / (c_m * z)
    else
        tmp = (((-4.0d0) * (t * a)) + (b / z)) / c_m
    end if
    code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double tmp;
	if (z <= -1.75e-100) {
		tmp = (b / (c_m * z)) + (-4.0 * (a / (c_m / t)));
	} else if (z <= 1.3e+18) {
		tmp = (b + (y * (x * 9.0))) / (c_m * z);
	} else {
		tmp = ((-4.0 * (t * a)) + (b / z)) / c_m;
	}
	return c_s * tmp;
}
c_m = math.fabs(c)
c_s = math.copysign(1.0, c)
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
def code(c_s, x, y, z, t, a, b, c_m):
	tmp = 0
	if z <= -1.75e-100:
		tmp = (b / (c_m * z)) + (-4.0 * (a / (c_m / t)))
	elif z <= 1.3e+18:
		tmp = (b + (y * (x * 9.0))) / (c_m * z)
	else:
		tmp = ((-4.0 * (t * a)) + (b / z)) / c_m
	return c_s * tmp
c_m = abs(c)
c_s = copysign(1.0, c)
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
function code(c_s, x, y, z, t, a, b, c_m)
	tmp = 0.0
	if (z <= -1.75e-100)
		tmp = Float64(Float64(b / Float64(c_m * z)) + Float64(-4.0 * Float64(a / Float64(c_m / t))));
	elseif (z <= 1.3e+18)
		tmp = Float64(Float64(b + Float64(y * Float64(x * 9.0))) / Float64(c_m * z));
	else
		tmp = Float64(Float64(Float64(-4.0 * Float64(t * a)) + Float64(b / z)) / c_m);
	end
	return Float64(c_s * tmp)
end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
	tmp = 0.0;
	if (z <= -1.75e-100)
		tmp = (b / (c_m * z)) + (-4.0 * (a / (c_m / t)));
	elseif (z <= 1.3e+18)
		tmp = (b + (y * (x * 9.0))) / (c_m * z);
	else
		tmp = ((-4.0 * (t * a)) + (b / z)) / c_m;
	end
	tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[z, -1.75e-100], N[(N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(a / N[(c$95$m / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e+18], N[(N[(b + N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{-100}:\\
\;\;\;\;\frac{b}{c_m \cdot z} + -4 \cdot \frac{a}{\frac{c_m}{t}}\\

\mathbf{elif}\;z \leq 1.3 \cdot 10^{+18}:\\
\;\;\;\;\frac{b + y \cdot \left(x \cdot 9\right)}{c_m \cdot z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.75e-100

    1. Initial program 73.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-73.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. *-commutative73.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*70.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. *-commutative70.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-70.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. *-commutative70.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*73.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. *-commutative73.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*73.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*76.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. Simplified76.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 x around 0 56.6%

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

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c} + \frac{b}{c \cdot z}} \]
    7. Step-by-step derivation
      1. *-un-lft-identity64.8%

        \[\leadsto -4 \cdot \color{blue}{\left(1 \cdot \frac{a \cdot t}{c}\right)} + \frac{b}{c \cdot z} \]
      2. associate-/l*69.6%

        \[\leadsto -4 \cdot \left(1 \cdot \color{blue}{\frac{a}{\frac{c}{t}}}\right) + \frac{b}{c \cdot z} \]
    8. Applied egg-rr69.6%

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

    if -1.75e-100 < z < 1.3e18

    1. Initial program 95.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-95.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. *-commutative95.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*95.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. *-commutative95.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-95.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. *-commutative95.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*95.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. *-commutative95.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*95.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*93.2%

        \[\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. Simplified93.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 c}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 84.4%

      \[\leadsto \frac{\color{blue}{9 \cdot \left(x \cdot y\right)} + b}{z \cdot c} \]
    6. Step-by-step derivation
      1. associate-*r*84.4%

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

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

    if 1.3e18 < z

    1. Initial program 52.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-52.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. *-commutative52.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*55.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. *-commutative55.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-55.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. *-commutative55.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*52.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. *-commutative52.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*52.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*59.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. Simplified59.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 0 49.2%

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

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c} + \frac{b}{c \cdot z}} \]
    7. Taylor expanded in c around 0 77.2%

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

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

Alternative 14: 50.1% accurate, 1.1× speedup?

\[\begin{array}{l} c_m = \left|c\right| \\ c_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ c_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{-67}:\\ \;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c_m}\right)\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+46}:\\ \;\;\;\;b \cdot \frac{1}{c_m \cdot z}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\ \end{array} \end{array} \]
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (*
  c_s
  (if (<= z -1.35e-67)
    (* -4.0 (* a (/ t c_m)))
    (if (<= z 3.6e+46) (* b (/ 1.0 (* c_m z))) (* -4.0 (* t (/ a c_m)))))))
c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double tmp;
	if (z <= -1.35e-67) {
		tmp = -4.0 * (a * (t / c_m));
	} else if (z <= 3.6e+46) {
		tmp = b * (1.0 / (c_m * z));
	} else {
		tmp = -4.0 * (t * (a / c_m));
	}
	return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
    real(8), intent (in) :: c_s
    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_m
    real(8) :: tmp
    if (z <= (-1.35d-67)) then
        tmp = (-4.0d0) * (a * (t / c_m))
    else if (z <= 3.6d+46) then
        tmp = b * (1.0d0 / (c_m * z))
    else
        tmp = (-4.0d0) * (t * (a / c_m))
    end if
    code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double tmp;
	if (z <= -1.35e-67) {
		tmp = -4.0 * (a * (t / c_m));
	} else if (z <= 3.6e+46) {
		tmp = b * (1.0 / (c_m * z));
	} else {
		tmp = -4.0 * (t * (a / c_m));
	}
	return c_s * tmp;
}
c_m = math.fabs(c)
c_s = math.copysign(1.0, c)
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
def code(c_s, x, y, z, t, a, b, c_m):
	tmp = 0
	if z <= -1.35e-67:
		tmp = -4.0 * (a * (t / c_m))
	elif z <= 3.6e+46:
		tmp = b * (1.0 / (c_m * z))
	else:
		tmp = -4.0 * (t * (a / c_m))
	return c_s * tmp
c_m = abs(c)
c_s = copysign(1.0, c)
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
function code(c_s, x, y, z, t, a, b, c_m)
	tmp = 0.0
	if (z <= -1.35e-67)
		tmp = Float64(-4.0 * Float64(a * Float64(t / c_m)));
	elseif (z <= 3.6e+46)
		tmp = Float64(b * Float64(1.0 / Float64(c_m * z)));
	else
		tmp = Float64(-4.0 * Float64(t * Float64(a / c_m)));
	end
	return Float64(c_s * tmp)
end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
	tmp = 0.0;
	if (z <= -1.35e-67)
		tmp = -4.0 * (a * (t / c_m));
	elseif (z <= 3.6e+46)
		tmp = b * (1.0 / (c_m * z));
	else
		tmp = -4.0 * (t * (a / c_m));
	end
	tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[z, -1.35e-67], N[(-4.0 * N[(a * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e+46], N[(b * N[(1.0 / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{-67}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c_m}\right)\\

\mathbf{elif}\;z \leq 3.6 \cdot 10^{+46}:\\
\;\;\;\;b \cdot \frac{1}{c_m \cdot z}\\

\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.35000000000000008e-67

    1. Initial program 71.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-71.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. *-commutative71.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*68.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. *-commutative68.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-68.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. *-commutative68.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*71.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. *-commutative71.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*71.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*74.2%

        \[\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. Simplified74.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 c}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 42.6%

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

        \[\leadsto -4 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{a \cdot t}{c}\right)\right)} \]
      2. expm1-udef25.4%

        \[\leadsto -4 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{a \cdot t}{c}\right)} - 1\right)} \]
      3. associate-/l*27.9%

        \[\leadsto -4 \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{a}{\frac{c}{t}}}\right)} - 1\right) \]
    7. Applied egg-rr27.9%

      \[\leadsto -4 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{a}{\frac{c}{t}}\right)} - 1\right)} \]
    8. Step-by-step derivation
      1. expm1-def31.6%

        \[\leadsto -4 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{a}{\frac{c}{t}}\right)\right)} \]
      2. expm1-log1p49.4%

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

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

        \[\leadsto -4 \cdot \color{blue}{\left(a \cdot \frac{t}{c}\right)} \]
    9. Simplified49.4%

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

    if -1.35000000000000008e-67 < z < 3.5999999999999999e46

    1. Initial program 94.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-94.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. *-commutative94.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*94.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. *-commutative94.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-94.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. *-commutative94.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*94.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. *-commutative94.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*94.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*92.2%

        \[\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. Simplified92.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 c}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 51.4%

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

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

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

        \[\leadsto \color{blue}{b \cdot \frac{1}{z \cdot c}} \]
    9. Applied egg-rr51.6%

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

    if 3.5999999999999999e46 < z

    1. Initial program 52.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-52.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. *-commutative52.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*55.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. *-commutative55.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-55.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. *-commutative55.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*52.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. *-commutative52.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*52.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*59.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. Simplified59.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 56.9%

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

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

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

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

        \[\leadsto \color{blue}{\left(\frac{a}{c} \cdot t\right)} \cdot -4 \]
    9. Applied egg-rr62.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{-67}:\\ \;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+46}:\\ \;\;\;\;b \cdot \frac{1}{c \cdot z}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 50.1% accurate, 1.1× speedup?

\[\begin{array}{l} c_m = \left|c\right| \\ c_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ c_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{-67}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c_m}{t}}\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{+46}:\\ \;\;\;\;b \cdot \frac{1}{c_m \cdot z}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\ \end{array} \end{array} \]
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (*
  c_s
  (if (<= z -1.15e-67)
    (* -4.0 (/ a (/ c_m t)))
    (if (<= z 4.3e+46) (* b (/ 1.0 (* c_m z))) (* -4.0 (* t (/ a c_m)))))))
c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double tmp;
	if (z <= -1.15e-67) {
		tmp = -4.0 * (a / (c_m / t));
	} else if (z <= 4.3e+46) {
		tmp = b * (1.0 / (c_m * z));
	} else {
		tmp = -4.0 * (t * (a / c_m));
	}
	return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
    real(8), intent (in) :: c_s
    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_m
    real(8) :: tmp
    if (z <= (-1.15d-67)) then
        tmp = (-4.0d0) * (a / (c_m / t))
    else if (z <= 4.3d+46) then
        tmp = b * (1.0d0 / (c_m * z))
    else
        tmp = (-4.0d0) * (t * (a / c_m))
    end if
    code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double tmp;
	if (z <= -1.15e-67) {
		tmp = -4.0 * (a / (c_m / t));
	} else if (z <= 4.3e+46) {
		tmp = b * (1.0 / (c_m * z));
	} else {
		tmp = -4.0 * (t * (a / c_m));
	}
	return c_s * tmp;
}
c_m = math.fabs(c)
c_s = math.copysign(1.0, c)
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
def code(c_s, x, y, z, t, a, b, c_m):
	tmp = 0
	if z <= -1.15e-67:
		tmp = -4.0 * (a / (c_m / t))
	elif z <= 4.3e+46:
		tmp = b * (1.0 / (c_m * z))
	else:
		tmp = -4.0 * (t * (a / c_m))
	return c_s * tmp
c_m = abs(c)
c_s = copysign(1.0, c)
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
function code(c_s, x, y, z, t, a, b, c_m)
	tmp = 0.0
	if (z <= -1.15e-67)
		tmp = Float64(-4.0 * Float64(a / Float64(c_m / t)));
	elseif (z <= 4.3e+46)
		tmp = Float64(b * Float64(1.0 / Float64(c_m * z)));
	else
		tmp = Float64(-4.0 * Float64(t * Float64(a / c_m)));
	end
	return Float64(c_s * tmp)
end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
	tmp = 0.0;
	if (z <= -1.15e-67)
		tmp = -4.0 * (a / (c_m / t));
	elseif (z <= 4.3e+46)
		tmp = b * (1.0 / (c_m * z));
	else
		tmp = -4.0 * (t * (a / c_m));
	end
	tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[z, -1.15e-67], N[(-4.0 * N[(a / N[(c$95$m / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.3e+46], N[(b * N[(1.0 / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{-67}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c_m}{t}}\\

\mathbf{elif}\;z \leq 4.3 \cdot 10^{+46}:\\
\;\;\;\;b \cdot \frac{1}{c_m \cdot z}\\

\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.15e-67

    1. Initial program 71.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-71.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. *-commutative71.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*68.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. *-commutative68.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-68.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. *-commutative68.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*71.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. *-commutative71.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*71.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*74.2%

        \[\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. Simplified74.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 c}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 42.6%

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

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

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

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

    if -1.15e-67 < z < 4.30000000000000005e46

    1. Initial program 94.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-94.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. *-commutative94.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*94.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. *-commutative94.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-94.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. *-commutative94.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*94.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. *-commutative94.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*94.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*92.2%

        \[\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. Simplified92.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 c}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 51.4%

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

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

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

        \[\leadsto \color{blue}{b \cdot \frac{1}{z \cdot c}} \]
    9. Applied egg-rr51.6%

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

    if 4.30000000000000005e46 < z

    1. Initial program 52.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-52.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. *-commutative52.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*55.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. *-commutative55.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-55.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. *-commutative55.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*52.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. *-commutative52.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*52.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*59.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. Simplified59.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 56.9%

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

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

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

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

        \[\leadsto \color{blue}{\left(\frac{a}{c} \cdot t\right)} \cdot -4 \]
    9. Applied egg-rr62.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{-67}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{+46}:\\ \;\;\;\;b \cdot \frac{1}{c \cdot z}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 35.0% accurate, 3.8× speedup?

\[\begin{array}{l} c_m = \left|c\right| \\ c_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ c_s \cdot \frac{b}{c_m \cdot z} \end{array} \]
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m) :precision binary64 (* c_s (/ b (* c_m z))))
c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	return c_s * (b / (c_m * z));
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
    real(8), intent (in) :: c_s
    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_m
    code = c_s * (b / (c_m * z))
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	return c_s * (b / (c_m * z));
}
c_m = math.fabs(c)
c_s = math.copysign(1.0, c)
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
def code(c_s, x, y, z, t, a, b, c_m):
	return c_s * (b / (c_m * z))
c_m = abs(c)
c_s = copysign(1.0, c)
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
function code(c_s, x, y, z, t, a, b, c_m)
	return Float64(c_s * Float64(b / Float64(c_m * z)))
end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp = code(c_s, x, y, z, t, a, b, c_m)
	tmp = c_s * (b / (c_m * z));
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c_s \cdot \frac{b}{c_m \cdot z}
\end{array}
Derivation
  1. Initial program 78.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-78.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. *-commutative78.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*78.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. *-commutative78.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-78.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. *-commutative78.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*78.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. *-commutative78.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*78.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*80.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. Simplified80.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 39.0%

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

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

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

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

Alternative 17: 34.5% accurate, 3.8× speedup?

\[\begin{array}{l} c_m = \left|c\right| \\ c_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ c_s \cdot \frac{\frac{b}{c_m}}{z} \end{array} \]
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m) :precision binary64 (* c_s (/ (/ b c_m) z)))
c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	return c_s * ((b / c_m) / z);
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
    real(8), intent (in) :: c_s
    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_m
    code = c_s * ((b / c_m) / z)
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	return c_s * ((b / c_m) / z);
}
c_m = math.fabs(c)
c_s = math.copysign(1.0, c)
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
def code(c_s, x, y, z, t, a, b, c_m):
	return c_s * ((b / c_m) / z)
c_m = abs(c)
c_s = copysign(1.0, c)
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
function code(c_s, x, y, z, t, a, b, c_m)
	return Float64(c_s * Float64(Float64(b / c_m) / z))
end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp = code(c_s, x, y, z, t, a, b, c_m)
	tmp = c_s * ((b / c_m) / z);
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c_s \cdot \frac{\frac{b}{c_m}}{z}
\end{array}
Derivation
  1. Initial program 78.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-78.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. *-commutative78.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*78.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. *-commutative78.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-78.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. *-commutative78.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*78.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. *-commutative78.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*78.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*80.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. Simplified80.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. Applied egg-rr81.1%

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

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

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

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

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

    \[\leadsto \frac{\color{blue}{\frac{b}{c}}}{z} \]
  9. Final simplification39.1%

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

Developer target: 80.7% accurate, 0.1× 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 2024020 
(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)))