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

Percentage Accurate: 80.0% → 88.3%
Time: 19.1s
Alternatives: 18
Speedup: 0.2×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 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: 80.0% 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.3% 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])\\ \\ \begin{array}{l} t_1 := \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-84}:\\ \;\;\;\;\frac{b + \mathsf{fma}\left(x, 9 \cdot y, t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right)}{z \cdot c\_m}\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{1}{z} \cdot \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(9, x \cdot \frac{y}{z}, -4 \cdot \left(t \cdot a\right)\right), b\right)}{c\_m}\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;\frac{\left(b + 9 \cdot \left(x \cdot y\right)\right) - 4 \cdot \left(z \cdot \left(t \cdot a\right)\right)}{z \cdot c\_m}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c\_m}\right)\\ \end{array} \end{array} \end{array} \]
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c_m))))
   (*
    c_s
    (if (<= t_1 -1e-84)
      (/ (+ b (fma x (* 9.0 y) (* t (* a (* z -4.0))))) (* z c_m))
      (if (<= t_1 0.0)
        (*
         (/ 1.0 z)
         (/ (fma z (fma 9.0 (* x (/ y z)) (* -4.0 (* t a))) b) c_m))
        (if (<= t_1 INFINITY)
          (/ (- (+ b (* 9.0 (* x y))) (* 4.0 (* z (* t a)))) (* z c_m))
          (* -4.0 (* a (/ t 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 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
	double tmp;
	if (t_1 <= -1e-84) {
		tmp = (b + fma(x, (9.0 * y), (t * (a * (z * -4.0))))) / (z * c_m);
	} else if (t_1 <= 0.0) {
		tmp = (1.0 / z) * (fma(z, fma(9.0, (x * (y / z)), (-4.0 * (t * a))), b) / c_m);
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = ((b + (9.0 * (x * y))) - (4.0 * (z * (t * a)))) / (z * c_m);
	} else {
		tmp = -4.0 * (a * (t / 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(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c_m))
	tmp = 0.0
	if (t_1 <= -1e-84)
		tmp = Float64(Float64(b + fma(x, Float64(9.0 * y), Float64(t * Float64(a * Float64(z * -4.0))))) / Float64(z * c_m));
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(1.0 / z) * Float64(fma(z, fma(9.0, Float64(x * Float64(y / z)), Float64(-4.0 * Float64(t * a))), b) / c_m));
	elseif (t_1 <= Inf)
		tmp = Float64(Float64(Float64(b + Float64(9.0 * Float64(x * y))) - Float64(4.0 * Float64(z * Float64(t * a)))) / Float64(z * c_m));
	else
		tmp = Float64(-4.0 * Float64(a * Float64(t / 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_] := Block[{t$95$1 = N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -1e-84], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision] + N[(t * N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(1.0 / z), $MachinePrecision] * N[(N[(z * N[(9.0 * N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(z * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(a * N[(t / 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{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-84}:\\
\;\;\;\;\frac{b + \mathsf{fma}\left(x, 9 \cdot y, t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right)}{z \cdot c\_m}\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{1}{z} \cdot \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(9, x \cdot \frac{y}{z}, -4 \cdot \left(t \cdot a\right)\right), b\right)}{c\_m}\\

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{\left(b + 9 \cdot \left(x \cdot y\right)\right) - 4 \cdot \left(z \cdot \left(t \cdot a\right)\right)}{z \cdot c\_m}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -1e-84

    1. Initial program 89.7%

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

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

    if -1e-84 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 0.0

    1. Initial program 59.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-59.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. *-commutative59.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*56.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. *-commutative56.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-56.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} \]
      6. associate-*l*56.7%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\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 59.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) 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. Simplified18.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 88.5% 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])\\ \\ \begin{array}{l} t_1 := \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+95}:\\ \;\;\;\;\frac{b + \mathsf{fma}\left(x, 9 \cdot y, t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right)}{z \cdot c\_m}\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{-4 \cdot \frac{a \cdot \left(z \cdot t\right)}{c\_m} + \left(9 \cdot \frac{x \cdot y}{c\_m} + \frac{b}{c\_m}\right)}{z}\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;\frac{\left(b + 9 \cdot \left(x \cdot y\right)\right) - 4 \cdot \left(z \cdot \left(t \cdot a\right)\right)}{z \cdot c\_m}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c\_m}\right)\\ \end{array} \end{array} \end{array} \]
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c_m))))
   (*
    c_s
    (if (<= t_1 -1e+95)
      (/ (+ b (fma x (* 9.0 y) (* t (* a (* z -4.0))))) (* z c_m))
      (if (<= t_1 0.0)
        (/
         (+
          (* -4.0 (/ (* a (* z t)) c_m))
          (+ (* 9.0 (/ (* x y) c_m)) (/ b c_m)))
         z)
        (if (<= t_1 INFINITY)
          (/ (- (+ b (* 9.0 (* x y))) (* 4.0 (* z (* t a)))) (* z c_m))
          (* -4.0 (* a (/ t 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 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
	double tmp;
	if (t_1 <= -1e+95) {
		tmp = (b + fma(x, (9.0 * y), (t * (a * (z * -4.0))))) / (z * c_m);
	} else if (t_1 <= 0.0) {
		tmp = ((-4.0 * ((a * (z * t)) / c_m)) + ((9.0 * ((x * y) / c_m)) + (b / c_m))) / z;
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = ((b + (9.0 * (x * y))) - (4.0 * (z * (t * a)))) / (z * c_m);
	} else {
		tmp = -4.0 * (a * (t / 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(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c_m))
	tmp = 0.0
	if (t_1 <= -1e+95)
		tmp = Float64(Float64(b + fma(x, Float64(9.0 * y), Float64(t * Float64(a * Float64(z * -4.0))))) / Float64(z * c_m));
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(Float64(-4.0 * Float64(Float64(a * Float64(z * t)) / c_m)) + Float64(Float64(9.0 * Float64(Float64(x * y) / c_m)) + Float64(b / c_m))) / z);
	elseif (t_1 <= Inf)
		tmp = Float64(Float64(Float64(b + Float64(9.0 * Float64(x * y))) - Float64(4.0 * Float64(z * Float64(t * a)))) / Float64(z * c_m));
	else
		tmp = Float64(-4.0 * Float64(a * Float64(t / 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_] := Block[{t$95$1 = N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -1e+95], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision] + N[(t * N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(N[(-4.0 * N[(N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(b / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(z * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(a * N[(t / 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{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+95}:\\
\;\;\;\;\frac{b + \mathsf{fma}\left(x, 9 \cdot y, t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right)}{z \cdot c\_m}\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{-4 \cdot \frac{a \cdot \left(z \cdot t\right)}{c\_m} + \left(9 \cdot \frac{x \cdot y}{c\_m} + \frac{b}{c\_m}\right)}{z}\\

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{\left(b + 9 \cdot \left(x \cdot y\right)\right) - 4 \cdot \left(z \cdot \left(t \cdot a\right)\right)}{z \cdot c\_m}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -1.00000000000000002e95

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

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

    if -1.00000000000000002e95 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 0.0

    1. Initial program 74.7%

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

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

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*70.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. *-commutative70.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-70.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} \]
      6. associate-*l*70.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) 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. Simplified18.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 88.1% 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{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\ t_2 := \frac{\left(b + 9 \cdot \left(x \cdot y\right)\right) - 4 \cdot \left(z \cdot \left(t \cdot a\right)\right)}{z \cdot c\_m}\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+95}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{-4 \cdot \frac{a \cdot \left(z \cdot t\right)}{c\_m} + \left(9 \cdot \frac{x \cdot y}{c\_m} + \frac{b}{c\_m}\right)}{z}\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c\_m}\right)\\ \end{array} \end{array} \end{array} \]
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c_m)))
        (t_2 (/ (- (+ b (* 9.0 (* x y))) (* 4.0 (* z (* t a)))) (* z c_m))))
   (*
    c_s
    (if (<= t_1 -1e+95)
      t_2
      (if (<= t_1 0.0)
        (/
         (+
          (* -4.0 (/ (* a (* z t)) c_m))
          (+ (* 9.0 (/ (* x y) c_m)) (/ b c_m)))
         z)
        (if (<= t_1 INFINITY) t_2 (* -4.0 (* a (/ t 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 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
	double t_2 = ((b + (9.0 * (x * y))) - (4.0 * (z * (t * a)))) / (z * c_m);
	double tmp;
	if (t_1 <= -1e+95) {
		tmp = t_2;
	} else if (t_1 <= 0.0) {
		tmp = ((-4.0 * ((a * (z * t)) / c_m)) + ((9.0 * ((x * y) / c_m)) + (b / c_m))) / z;
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = t_2;
	} else {
		tmp = -4.0 * (a * (t / 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 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
	double t_2 = ((b + (9.0 * (x * y))) - (4.0 * (z * (t * a)))) / (z * c_m);
	double tmp;
	if (t_1 <= -1e+95) {
		tmp = t_2;
	} else if (t_1 <= 0.0) {
		tmp = ((-4.0 * ((a * (z * t)) / c_m)) + ((9.0 * ((x * y) / c_m)) + (b / c_m))) / z;
	} else if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = t_2;
	} else {
		tmp = -4.0 * (a * (t / 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 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m)
	t_2 = ((b + (9.0 * (x * y))) - (4.0 * (z * (t * a)))) / (z * c_m)
	tmp = 0
	if t_1 <= -1e+95:
		tmp = t_2
	elif t_1 <= 0.0:
		tmp = ((-4.0 * ((a * (z * t)) / c_m)) + ((9.0 * ((x * y) / c_m)) + (b / c_m))) / z
	elif t_1 <= math.inf:
		tmp = t_2
	else:
		tmp = -4.0 * (a * (t / 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(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c_m))
	t_2 = Float64(Float64(Float64(b + Float64(9.0 * Float64(x * y))) - Float64(4.0 * Float64(z * Float64(t * a)))) / Float64(z * c_m))
	tmp = 0.0
	if (t_1 <= -1e+95)
		tmp = t_2;
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(Float64(-4.0 * Float64(Float64(a * Float64(z * t)) / c_m)) + Float64(Float64(9.0 * Float64(Float64(x * y) / c_m)) + Float64(b / c_m))) / z);
	elseif (t_1 <= Inf)
		tmp = t_2;
	else
		tmp = Float64(-4.0 * Float64(a * Float64(t / 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 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
	t_2 = ((b + (9.0 * (x * y))) - (4.0 * (z * (t * a)))) / (z * c_m);
	tmp = 0.0;
	if (t_1 <= -1e+95)
		tmp = t_2;
	elseif (t_1 <= 0.0)
		tmp = ((-4.0 * ((a * (z * t)) / c_m)) + ((9.0 * ((x * y) / c_m)) + (b / c_m))) / z;
	elseif (t_1 <= Inf)
		tmp = t_2;
	else
		tmp = -4.0 * (a * (t / 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[(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$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(z * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -1e+95], t$95$2, If[LessEqual[t$95$1, 0.0], N[(N[(N[(-4.0 * N[(N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(b / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$2, N[(-4.0 * N[(a * N[(t / 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{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\
t_2 := \frac{\left(b + 9 \cdot \left(x \cdot y\right)\right) - 4 \cdot \left(z \cdot \left(t \cdot a\right)\right)}{z \cdot c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+95}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{-4 \cdot \frac{a \cdot \left(z \cdot t\right)}{c\_m} + \left(9 \cdot \frac{x \cdot y}{c\_m} + \frac{b}{c\_m}\right)}{z}\\

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_2\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000002e95 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 0.0

    1. Initial program 74.7%

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

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

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*70.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. *-commutative70.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-70.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} \]
      6. associate-*l*70.7%

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

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

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

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

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

    if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) 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. Simplified18.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 88.6% 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 := 9 \cdot \left(x \cdot y\right)\\ t_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\_m}\\ t_3 := \frac{\left(b + t\_1\right) - 4 \cdot \left(z \cdot \left(t \cdot a\right)\right)}{z \cdot c\_m}\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t\_2 \leq -5 \cdot 10^{-202}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;\frac{1}{z} \cdot \frac{b + \left(t\_1 + -4 \cdot \left(a \cdot \left(z \cdot t\right)\right)\right)}{c\_m}\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c\_m}\right)\\ \end{array} \end{array} \end{array} \]
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (* 9.0 (* x y)))
        (t_2 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c_m)))
        (t_3 (/ (- (+ b t_1) (* 4.0 (* z (* t a)))) (* z c_m))))
   (*
    c_s
    (if (<= t_2 -5e-202)
      t_3
      (if (<= t_2 0.0)
        (* (/ 1.0 z) (/ (+ b (+ t_1 (* -4.0 (* a (* z t))))) c_m))
        (if (<= t_2 INFINITY) t_3 (* -4.0 (* a (/ t 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 = 9.0 * (x * y);
	double t_2 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
	double t_3 = ((b + t_1) - (4.0 * (z * (t * a)))) / (z * c_m);
	double tmp;
	if (t_2 <= -5e-202) {
		tmp = t_3;
	} else if (t_2 <= 0.0) {
		tmp = (1.0 / z) * ((b + (t_1 + (-4.0 * (a * (z * t))))) / c_m);
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = t_3;
	} else {
		tmp = -4.0 * (a * (t / 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 = 9.0 * (x * y);
	double t_2 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
	double t_3 = ((b + t_1) - (4.0 * (z * (t * a)))) / (z * c_m);
	double tmp;
	if (t_2 <= -5e-202) {
		tmp = t_3;
	} else if (t_2 <= 0.0) {
		tmp = (1.0 / z) * ((b + (t_1 + (-4.0 * (a * (z * t))))) / c_m);
	} else if (t_2 <= Double.POSITIVE_INFINITY) {
		tmp = t_3;
	} else {
		tmp = -4.0 * (a * (t / 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 = 9.0 * (x * y)
	t_2 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m)
	t_3 = ((b + t_1) - (4.0 * (z * (t * a)))) / (z * c_m)
	tmp = 0
	if t_2 <= -5e-202:
		tmp = t_3
	elif t_2 <= 0.0:
		tmp = (1.0 / z) * ((b + (t_1 + (-4.0 * (a * (z * t))))) / c_m)
	elif t_2 <= math.inf:
		tmp = t_3
	else:
		tmp = -4.0 * (a * (t / 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(9.0 * Float64(x * y))
	t_2 = Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c_m))
	t_3 = Float64(Float64(Float64(b + t_1) - Float64(4.0 * Float64(z * Float64(t * a)))) / Float64(z * c_m))
	tmp = 0.0
	if (t_2 <= -5e-202)
		tmp = t_3;
	elseif (t_2 <= 0.0)
		tmp = Float64(Float64(1.0 / z) * Float64(Float64(b + Float64(t_1 + Float64(-4.0 * Float64(a * Float64(z * t))))) / c_m));
	elseif (t_2 <= Inf)
		tmp = t_3;
	else
		tmp = Float64(-4.0 * Float64(a * Float64(t / 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 = 9.0 * (x * y);
	t_2 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
	t_3 = ((b + t_1) - (4.0 * (z * (t * a)))) / (z * c_m);
	tmp = 0.0;
	if (t_2 <= -5e-202)
		tmp = t_3;
	elseif (t_2 <= 0.0)
		tmp = (1.0 / z) * ((b + (t_1 + (-4.0 * (a * (z * t))))) / c_m);
	elseif (t_2 <= Inf)
		tmp = t_3;
	else
		tmp = -4.0 * (a * (t / 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[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(b + t$95$1), $MachinePrecision] - N[(4.0 * N[(z * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$2, -5e-202], t$95$3, If[LessEqual[t$95$2, 0.0], N[(N[(1.0 / z), $MachinePrecision] * N[(N[(b + N[(t$95$1 + N[(-4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], t$95$3, N[(-4.0 * N[(a * N[(t / 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 := 9 \cdot \left(x \cdot y\right)\\
t_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\_m}\\
t_3 := \frac{\left(b + t\_1\right) - 4 \cdot \left(z \cdot \left(t \cdot a\right)\right)}{z \cdot c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-202}:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_3\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.99999999999999973e-202 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 0.0

    1. Initial program 51.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-51.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. *-commutative51.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*48.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. *-commutative48.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-48.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. associate-*l*48.1%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified51.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 z around inf 51.8%

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

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

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

        \[\leadsto \frac{1}{z} \cdot \frac{\color{blue}{\mathsf{fma}\left(z, 9 \cdot \frac{x \cdot y}{z} - 4 \cdot \left(a \cdot t\right), b\right)}}{c} \]
      4. cancel-sign-sub-inv95.3%

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

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

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

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

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

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

    if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) 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. Simplified18.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 87.0% 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{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\ t_2 := \frac{\left(b + 9 \cdot \left(x \cdot y\right)\right) - 4 \cdot \left(z \cdot \left(t \cdot a\right)\right)}{z \cdot c\_m}\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-202}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{9 \cdot \frac{x \cdot y}{z} - 4 \cdot \left(t \cdot a\right)}{c\_m}\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c\_m}\right)\\ \end{array} \end{array} \end{array} \]
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c_m)))
        (t_2 (/ (- (+ b (* 9.0 (* x y))) (* 4.0 (* z (* t a)))) (* z c_m))))
   (*
    c_s
    (if (<= t_1 -5e-202)
      t_2
      (if (<= t_1 0.0)
        (/ (- (* 9.0 (/ (* x y) z)) (* 4.0 (* t a))) c_m)
        (if (<= t_1 INFINITY) t_2 (* -4.0 (* a (/ t 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 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
	double t_2 = ((b + (9.0 * (x * y))) - (4.0 * (z * (t * a)))) / (z * c_m);
	double tmp;
	if (t_1 <= -5e-202) {
		tmp = t_2;
	} else if (t_1 <= 0.0) {
		tmp = ((9.0 * ((x * y) / z)) - (4.0 * (t * a))) / c_m;
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = t_2;
	} else {
		tmp = -4.0 * (a * (t / 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 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
	double t_2 = ((b + (9.0 * (x * y))) - (4.0 * (z * (t * a)))) / (z * c_m);
	double tmp;
	if (t_1 <= -5e-202) {
		tmp = t_2;
	} else if (t_1 <= 0.0) {
		tmp = ((9.0 * ((x * y) / z)) - (4.0 * (t * a))) / c_m;
	} else if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = t_2;
	} else {
		tmp = -4.0 * (a * (t / 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 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m)
	t_2 = ((b + (9.0 * (x * y))) - (4.0 * (z * (t * a)))) / (z * c_m)
	tmp = 0
	if t_1 <= -5e-202:
		tmp = t_2
	elif t_1 <= 0.0:
		tmp = ((9.0 * ((x * y) / z)) - (4.0 * (t * a))) / c_m
	elif t_1 <= math.inf:
		tmp = t_2
	else:
		tmp = -4.0 * (a * (t / 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(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c_m))
	t_2 = Float64(Float64(Float64(b + Float64(9.0 * Float64(x * y))) - Float64(4.0 * Float64(z * Float64(t * a)))) / Float64(z * c_m))
	tmp = 0.0
	if (t_1 <= -5e-202)
		tmp = t_2;
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / z)) - Float64(4.0 * Float64(t * a))) / c_m);
	elseif (t_1 <= Inf)
		tmp = t_2;
	else
		tmp = Float64(-4.0 * Float64(a * Float64(t / 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 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
	t_2 = ((b + (9.0 * (x * y))) - (4.0 * (z * (t * a)))) / (z * c_m);
	tmp = 0.0;
	if (t_1 <= -5e-202)
		tmp = t_2;
	elseif (t_1 <= 0.0)
		tmp = ((9.0 * ((x * y) / z)) - (4.0 * (t * a))) / c_m;
	elseif (t_1 <= Inf)
		tmp = t_2;
	else
		tmp = -4.0 * (a * (t / 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[(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$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(z * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -5e-202], t$95$2, If[LessEqual[t$95$1, 0.0], N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$2, N[(-4.0 * N[(a * N[(t / 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{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\
t_2 := \frac{\left(b + 9 \cdot \left(x \cdot y\right)\right) - 4 \cdot \left(z \cdot \left(t \cdot a\right)\right)}{z \cdot c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-202}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{9 \cdot \frac{x \cdot y}{z} - 4 \cdot \left(t \cdot a\right)}{c\_m}\\

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_2\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.99999999999999973e-202 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 0.0

    1. Initial program 51.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-51.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. *-commutative51.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*48.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. *-commutative48.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-48.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. associate-*l*48.1%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified51.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 z around inf 51.8%

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

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

    if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) 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. Simplified18.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 86.9% 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{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\ t_2 := \frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c\_m}\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-202}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{9 \cdot \frac{x \cdot y}{z} - 4 \cdot \left(t \cdot a\right)}{c\_m}\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c\_m}\right)\\ \end{array} \end{array} \end{array} \]
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c_m)))
        (t_2 (/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* t a)))) (* z c_m))))
   (*
    c_s
    (if (<= t_1 -5e-202)
      t_2
      (if (<= t_1 0.0)
        (/ (- (* 9.0 (/ (* x y) z)) (* 4.0 (* t a))) c_m)
        (if (<= t_1 INFINITY) t_2 (* -4.0 (* a (/ t 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 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
	double t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c_m);
	double tmp;
	if (t_1 <= -5e-202) {
		tmp = t_2;
	} else if (t_1 <= 0.0) {
		tmp = ((9.0 * ((x * y) / z)) - (4.0 * (t * a))) / c_m;
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = t_2;
	} else {
		tmp = -4.0 * (a * (t / 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 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
	double t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c_m);
	double tmp;
	if (t_1 <= -5e-202) {
		tmp = t_2;
	} else if (t_1 <= 0.0) {
		tmp = ((9.0 * ((x * y) / z)) - (4.0 * (t * a))) / c_m;
	} else if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = t_2;
	} else {
		tmp = -4.0 * (a * (t / 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 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m)
	t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c_m)
	tmp = 0
	if t_1 <= -5e-202:
		tmp = t_2
	elif t_1 <= 0.0:
		tmp = ((9.0 * ((x * y) / z)) - (4.0 * (t * a))) / c_m
	elif t_1 <= math.inf:
		tmp = t_2
	else:
		tmp = -4.0 * (a * (t / 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(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c_m))
	t_2 = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(t * a)))) / Float64(z * c_m))
	tmp = 0.0
	if (t_1 <= -5e-202)
		tmp = t_2;
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / z)) - Float64(4.0 * Float64(t * a))) / c_m);
	elseif (t_1 <= Inf)
		tmp = t_2;
	else
		tmp = Float64(-4.0 * Float64(a * Float64(t / 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 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
	t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c_m);
	tmp = 0.0;
	if (t_1 <= -5e-202)
		tmp = t_2;
	elseif (t_1 <= 0.0)
		tmp = ((9.0 * ((x * y) / z)) - (4.0 * (t * a))) / c_m;
	elseif (t_1 <= Inf)
		tmp = t_2;
	else
		tmp = -4.0 * (a * (t / 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[(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$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -5e-202], t$95$2, If[LessEqual[t$95$1, 0.0], N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$2, N[(-4.0 * N[(a * N[(t / 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{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\
t_2 := \frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-202}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{9 \cdot \frac{x \cdot y}{z} - 4 \cdot \left(t \cdot a\right)}{c\_m}\\

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 89.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-89.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. *-commutative89.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*91.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. *-commutative91.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-91.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} \]
      6. associate-*l*91.6%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified91.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 -4.99999999999999973e-202 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 0.0

    1. Initial program 51.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-51.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. *-commutative51.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*48.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. *-commutative48.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-48.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. associate-*l*48.1%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified51.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 z around inf 51.8%

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

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

    if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) 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. Simplified18.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 70.8% accurate, 0.5× 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{9 \cdot \frac{x \cdot y}{z} - 4 \cdot \left(t \cdot a\right)}{c\_m}\\ t_2 := t \cdot \left(-4 \cdot \frac{a}{c\_m} + \frac{b}{c\_m \cdot \left(z \cdot t\right)}\right)\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{+178}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -8.8 \cdot 10^{+47}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -7.2 \cdot 10^{-72}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 3.9 \cdot 10^{-60}:\\ \;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c\_m}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (/ (- (* 9.0 (/ (* x y) z)) (* 4.0 (* t a))) c_m))
        (t_2 (* t (+ (* -4.0 (/ a c_m)) (/ b (* c_m (* z t)))))))
   (*
    c_s
    (if (<= t -2e+178)
      t_2
      (if (<= t -8.8e+47)
        t_1
        (if (<= t -7.2e-72)
          t_2
          (if (<= t 3.9e-60) (/ (+ b (* x (* 9.0 y))) (* z c_m)) 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 = ((9.0 * ((x * y) / z)) - (4.0 * (t * a))) / c_m;
	double t_2 = t * ((-4.0 * (a / c_m)) + (b / (c_m * (z * t))));
	double tmp;
	if (t <= -2e+178) {
		tmp = t_2;
	} else if (t <= -8.8e+47) {
		tmp = t_1;
	} else if (t <= -7.2e-72) {
		tmp = t_2;
	} else if (t <= 3.9e-60) {
		tmp = (b + (x * (9.0 * y))) / (z * c_m);
	} 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 = ((9.0d0 * ((x * y) / z)) - (4.0d0 * (t * a))) / c_m
    t_2 = t * (((-4.0d0) * (a / c_m)) + (b / (c_m * (z * t))))
    if (t <= (-2d+178)) then
        tmp = t_2
    else if (t <= (-8.8d+47)) then
        tmp = t_1
    else if (t <= (-7.2d-72)) then
        tmp = t_2
    else if (t <= 3.9d-60) then
        tmp = (b + (x * (9.0d0 * y))) / (z * c_m)
    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 = ((9.0 * ((x * y) / z)) - (4.0 * (t * a))) / c_m;
	double t_2 = t * ((-4.0 * (a / c_m)) + (b / (c_m * (z * t))));
	double tmp;
	if (t <= -2e+178) {
		tmp = t_2;
	} else if (t <= -8.8e+47) {
		tmp = t_1;
	} else if (t <= -7.2e-72) {
		tmp = t_2;
	} else if (t <= 3.9e-60) {
		tmp = (b + (x * (9.0 * y))) / (z * c_m);
	} 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 = ((9.0 * ((x * y) / z)) - (4.0 * (t * a))) / c_m
	t_2 = t * ((-4.0 * (a / c_m)) + (b / (c_m * (z * t))))
	tmp = 0
	if t <= -2e+178:
		tmp = t_2
	elif t <= -8.8e+47:
		tmp = t_1
	elif t <= -7.2e-72:
		tmp = t_2
	elif t <= 3.9e-60:
		tmp = (b + (x * (9.0 * y))) / (z * c_m)
	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(Float64(Float64(9.0 * Float64(Float64(x * y) / z)) - Float64(4.0 * Float64(t * a))) / c_m)
	t_2 = Float64(t * Float64(Float64(-4.0 * Float64(a / c_m)) + Float64(b / Float64(c_m * Float64(z * t)))))
	tmp = 0.0
	if (t <= -2e+178)
		tmp = t_2;
	elseif (t <= -8.8e+47)
		tmp = t_1;
	elseif (t <= -7.2e-72)
		tmp = t_2;
	elseif (t <= 3.9e-60)
		tmp = Float64(Float64(b + Float64(x * Float64(9.0 * y))) / Float64(z * c_m));
	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 = ((9.0 * ((x * y) / z)) - (4.0 * (t * a))) / c_m;
	t_2 = t * ((-4.0 * (a / c_m)) + (b / (c_m * (z * t))));
	tmp = 0.0;
	if (t <= -2e+178)
		tmp = t_2;
	elseif (t <= -8.8e+47)
		tmp = t_1;
	elseif (t <= -7.2e-72)
		tmp = t_2;
	elseif (t <= 3.9e-60)
		tmp = (b + (x * (9.0 * y))) / (z * c_m);
	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[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(-4.0 * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(b / N[(c$95$m * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t, -2e+178], t$95$2, If[LessEqual[t, -8.8e+47], t$95$1, If[LessEqual[t, -7.2e-72], t$95$2, If[LessEqual[t, 3.9e-60], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $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 := \frac{9 \cdot \frac{x \cdot y}{z} - 4 \cdot \left(t \cdot a\right)}{c\_m}\\
t_2 := t \cdot \left(-4 \cdot \frac{a}{c\_m} + \frac{b}{c\_m \cdot \left(z \cdot t\right)}\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{+178}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -8.8 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -7.2 \cdot 10^{-72}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 3.9 \cdot 10^{-60}:\\
\;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c\_m}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.0000000000000001e178 or -8.7999999999999997e47 < t < -7.2e-72

    1. Initial program 63.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-63.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. *-commutative63.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*66.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. *-commutative66.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-66.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. associate-*l*68.1%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified64.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 0 70.0%

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

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

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

    if -2.0000000000000001e178 < t < -8.7999999999999997e47 or 3.9000000000000002e-60 < t

    1. Initial program 68.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-68.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. *-commutative68.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.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. *-commutative74.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-74.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. associate-*l*74.3%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\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 73.0%

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

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

    if -7.2e-72 < t < 3.9000000000000002e-60

    1. Initial program 90.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-90.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. *-commutative90.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*87.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. *-commutative87.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-87.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. associate-*l*87.3%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified90.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 81.1%

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

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

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

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

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

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

Alternative 8: 47.9% 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 := b \cdot \frac{\frac{1}{c\_m}}{z}\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;x \leq -3.4 \cdot 10^{+187}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} \cdot \frac{9}{c\_m}\right)\\ \mathbf{elif}\;x \leq -1.15 \cdot 10^{-5}:\\ \;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\ \mathbf{elif}\;x \leq -1.05 \cdot 10^{-144}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -7.5 \cdot 10^{-248}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c\_m}\\ \mathbf{elif}\;x \leq 1.15 \cdot 10^{-124}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c\_m}\right)\\ \end{array} \end{array} \end{array} \]
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (/ (/ 1.0 c_m) z))))
   (*
    c_s
    (if (<= x -3.4e+187)
      (* x (* (/ y z) (/ 9.0 c_m)))
      (if (<= x -1.15e-5)
        (* -4.0 (/ (* t a) c_m))
        (if (<= x -1.05e-144)
          t_1
          (if (<= x -7.5e-248)
            (* t (/ (* a -4.0) c_m))
            (if (<= x 1.15e-124) t_1 (* 9.0 (* x (/ y (* 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 t_1 = b * ((1.0 / c_m) / z);
	double tmp;
	if (x <= -3.4e+187) {
		tmp = x * ((y / z) * (9.0 / c_m));
	} else if (x <= -1.15e-5) {
		tmp = -4.0 * ((t * a) / c_m);
	} else if (x <= -1.05e-144) {
		tmp = t_1;
	} else if (x <= -7.5e-248) {
		tmp = t * ((a * -4.0) / c_m);
	} else if (x <= 1.15e-124) {
		tmp = t_1;
	} else {
		tmp = 9.0 * (x * (y / (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) :: t_1
    real(8) :: tmp
    t_1 = b * ((1.0d0 / c_m) / z)
    if (x <= (-3.4d+187)) then
        tmp = x * ((y / z) * (9.0d0 / c_m))
    else if (x <= (-1.15d-5)) then
        tmp = (-4.0d0) * ((t * a) / c_m)
    else if (x <= (-1.05d-144)) then
        tmp = t_1
    else if (x <= (-7.5d-248)) then
        tmp = t * ((a * (-4.0d0)) / c_m)
    else if (x <= 1.15d-124) then
        tmp = t_1
    else
        tmp = 9.0d0 * (x * (y / (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 t_1 = b * ((1.0 / c_m) / z);
	double tmp;
	if (x <= -3.4e+187) {
		tmp = x * ((y / z) * (9.0 / c_m));
	} else if (x <= -1.15e-5) {
		tmp = -4.0 * ((t * a) / c_m);
	} else if (x <= -1.05e-144) {
		tmp = t_1;
	} else if (x <= -7.5e-248) {
		tmp = t * ((a * -4.0) / c_m);
	} else if (x <= 1.15e-124) {
		tmp = t_1;
	} else {
		tmp = 9.0 * (x * (y / (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):
	t_1 = b * ((1.0 / c_m) / z)
	tmp = 0
	if x <= -3.4e+187:
		tmp = x * ((y / z) * (9.0 / c_m))
	elif x <= -1.15e-5:
		tmp = -4.0 * ((t * a) / c_m)
	elif x <= -1.05e-144:
		tmp = t_1
	elif x <= -7.5e-248:
		tmp = t * ((a * -4.0) / c_m)
	elif x <= 1.15e-124:
		tmp = t_1
	else:
		tmp = 9.0 * (x * (y / (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)
	t_1 = Float64(b * Float64(Float64(1.0 / c_m) / z))
	tmp = 0.0
	if (x <= -3.4e+187)
		tmp = Float64(x * Float64(Float64(y / z) * Float64(9.0 / c_m)));
	elseif (x <= -1.15e-5)
		tmp = Float64(-4.0 * Float64(Float64(t * a) / c_m));
	elseif (x <= -1.05e-144)
		tmp = t_1;
	elseif (x <= -7.5e-248)
		tmp = Float64(t * Float64(Float64(a * -4.0) / c_m));
	elseif (x <= 1.15e-124)
		tmp = t_1;
	else
		tmp = Float64(9.0 * Float64(x * Float64(y / Float64(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)
	t_1 = b * ((1.0 / c_m) / z);
	tmp = 0.0;
	if (x <= -3.4e+187)
		tmp = x * ((y / z) * (9.0 / c_m));
	elseif (x <= -1.15e-5)
		tmp = -4.0 * ((t * a) / c_m);
	elseif (x <= -1.05e-144)
		tmp = t_1;
	elseif (x <= -7.5e-248)
		tmp = t * ((a * -4.0) / c_m);
	elseif (x <= 1.15e-124)
		tmp = t_1;
	else
		tmp = 9.0 * (x * (y / (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_] := Block[{t$95$1 = N[(b * N[(N[(1.0 / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[x, -3.4e+187], N[(x * N[(N[(y / z), $MachinePrecision] * N[(9.0 / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.15e-5], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.05e-144], t$95$1, If[LessEqual[x, -7.5e-248], N[(t * N[(N[(a * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.15e-124], t$95$1, N[(9.0 * N[(x * N[(y / N[(z * c$95$m), $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])\\
\\
\begin{array}{l}
t_1 := b \cdot \frac{\frac{1}{c\_m}}{z}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq -3.4 \cdot 10^{+187}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} \cdot \frac{9}{c\_m}\right)\\

\mathbf{elif}\;x \leq -1.15 \cdot 10^{-5}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\

\mathbf{elif}\;x \leq -1.05 \cdot 10^{-144}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -7.5 \cdot 10^{-248}:\\
\;\;\;\;t \cdot \frac{a \cdot -4}{c\_m}\\

\mathbf{elif}\;x \leq 1.15 \cdot 10^{-124}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -3.4e187

    1. Initial program 61.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-61.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. *-commutative61.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*64.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. *-commutative64.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-64.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. associate-*l*64.4%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified64.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 57.7%

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{y \cdot 9}{\color{blue}{z \cdot c}} \]
      8. times-frac61.3%

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

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

    if -3.4e187 < x < -1.15e-5

    1. Initial program 66.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-66.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. *-commutative66.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*69.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. *-commutative69.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-69.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. associate-*l*69.2%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified66.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 z around inf 54.7%

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

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

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

    if -1.15e-5 < x < -1.0500000000000001e-144 or -7.4999999999999994e-248 < x < 1.15000000000000006e-124

    1. Initial program 85.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. Simplified85.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
    7. Step-by-step derivation
      1. associate-/r*47.7%

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

      \[\leadsto \color{blue}{\frac{\frac{b}{c}}{z}} \]
    9. Step-by-step derivation
      1. div-inv47.7%

        \[\leadsto \frac{\color{blue}{b \cdot \frac{1}{c}}}{z} \]
      2. *-un-lft-identity47.7%

        \[\leadsto \frac{b \cdot \frac{1}{c}}{\color{blue}{1 \cdot z}} \]
      3. times-frac53.3%

        \[\leadsto \color{blue}{\frac{b}{1} \cdot \frac{\frac{1}{c}}{z}} \]
    10. Applied egg-rr53.3%

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

    if -1.0500000000000001e-144 < x < -7.4999999999999994e-248

    1. Initial program 69.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-69.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. *-commutative69.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*69.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. *-commutative69.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-69.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. associate-*l*69.0%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified73.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 74.3%

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

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

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

        \[\leadsto \frac{1}{z} \cdot \frac{\color{blue}{\mathsf{fma}\left(z, 9 \cdot \frac{x \cdot y}{z} - 4 \cdot \left(a \cdot t\right), b\right)}}{c} \]
      4. cancel-sign-sub-inv73.9%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-4 \cdot \left(a \cdot t\right)}{c}} \]
      2. associate-*r*59.0%

        \[\leadsto \frac{\color{blue}{\left(-4 \cdot a\right) \cdot t}}{c} \]
      3. *-commutative59.0%

        \[\leadsto \frac{\color{blue}{t \cdot \left(-4 \cdot a\right)}}{c} \]
      4. associate-*r/63.9%

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

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

    if 1.15000000000000006e-124 < x

    1. Initial program 77.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-77.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. *-commutative77.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*79.8%

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

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

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

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified82.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 39.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.4 \cdot 10^{+187}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} \cdot \frac{9}{c}\right)\\ \mathbf{elif}\;x \leq -1.15 \cdot 10^{-5}:\\ \;\;\;\;-4 \cdot \frac{t \cdot a}{c}\\ \mathbf{elif}\;x \leq -1.05 \cdot 10^{-144}:\\ \;\;\;\;b \cdot \frac{\frac{1}{c}}{z}\\ \mathbf{elif}\;x \leq -7.5 \cdot 10^{-248}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c}\\ \mathbf{elif}\;x \leq 1.15 \cdot 10^{-124}:\\ \;\;\;\;b \cdot \frac{\frac{1}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 47.9% 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 := \frac{b}{z \cdot c\_m}\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{+187}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} \cdot \frac{9}{c\_m}\right)\\ \mathbf{elif}\;x \leq -8 \cdot 10^{-5}:\\ \;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\ \mathbf{elif}\;x \leq -4.8 \cdot 10^{-147}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -9.5 \cdot 10^{-248}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c\_m}\\ \mathbf{elif}\;x \leq 4.2 \cdot 10^{-122}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c\_m}\right)\\ \end{array} \end{array} \end{array} \]
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (* z c_m))))
   (*
    c_s
    (if (<= x -9.5e+187)
      (* x (* (/ y z) (/ 9.0 c_m)))
      (if (<= x -8e-5)
        (* -4.0 (/ (* t a) c_m))
        (if (<= x -4.8e-147)
          t_1
          (if (<= x -9.5e-248)
            (* t (/ (* a -4.0) c_m))
            (if (<= x 4.2e-122) t_1 (* 9.0 (* x (/ y (* 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 t_1 = b / (z * c_m);
	double tmp;
	if (x <= -9.5e+187) {
		tmp = x * ((y / z) * (9.0 / c_m));
	} else if (x <= -8e-5) {
		tmp = -4.0 * ((t * a) / c_m);
	} else if (x <= -4.8e-147) {
		tmp = t_1;
	} else if (x <= -9.5e-248) {
		tmp = t * ((a * -4.0) / c_m);
	} else if (x <= 4.2e-122) {
		tmp = t_1;
	} else {
		tmp = 9.0 * (x * (y / (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) :: t_1
    real(8) :: tmp
    t_1 = b / (z * c_m)
    if (x <= (-9.5d+187)) then
        tmp = x * ((y / z) * (9.0d0 / c_m))
    else if (x <= (-8d-5)) then
        tmp = (-4.0d0) * ((t * a) / c_m)
    else if (x <= (-4.8d-147)) then
        tmp = t_1
    else if (x <= (-9.5d-248)) then
        tmp = t * ((a * (-4.0d0)) / c_m)
    else if (x <= 4.2d-122) then
        tmp = t_1
    else
        tmp = 9.0d0 * (x * (y / (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 t_1 = b / (z * c_m);
	double tmp;
	if (x <= -9.5e+187) {
		tmp = x * ((y / z) * (9.0 / c_m));
	} else if (x <= -8e-5) {
		tmp = -4.0 * ((t * a) / c_m);
	} else if (x <= -4.8e-147) {
		tmp = t_1;
	} else if (x <= -9.5e-248) {
		tmp = t * ((a * -4.0) / c_m);
	} else if (x <= 4.2e-122) {
		tmp = t_1;
	} else {
		tmp = 9.0 * (x * (y / (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):
	t_1 = b / (z * c_m)
	tmp = 0
	if x <= -9.5e+187:
		tmp = x * ((y / z) * (9.0 / c_m))
	elif x <= -8e-5:
		tmp = -4.0 * ((t * a) / c_m)
	elif x <= -4.8e-147:
		tmp = t_1
	elif x <= -9.5e-248:
		tmp = t * ((a * -4.0) / c_m)
	elif x <= 4.2e-122:
		tmp = t_1
	else:
		tmp = 9.0 * (x * (y / (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)
	t_1 = Float64(b / Float64(z * c_m))
	tmp = 0.0
	if (x <= -9.5e+187)
		tmp = Float64(x * Float64(Float64(y / z) * Float64(9.0 / c_m)));
	elseif (x <= -8e-5)
		tmp = Float64(-4.0 * Float64(Float64(t * a) / c_m));
	elseif (x <= -4.8e-147)
		tmp = t_1;
	elseif (x <= -9.5e-248)
		tmp = Float64(t * Float64(Float64(a * -4.0) / c_m));
	elseif (x <= 4.2e-122)
		tmp = t_1;
	else
		tmp = Float64(9.0 * Float64(x * Float64(y / Float64(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)
	t_1 = b / (z * c_m);
	tmp = 0.0;
	if (x <= -9.5e+187)
		tmp = x * ((y / z) * (9.0 / c_m));
	elseif (x <= -8e-5)
		tmp = -4.0 * ((t * a) / c_m);
	elseif (x <= -4.8e-147)
		tmp = t_1;
	elseif (x <= -9.5e-248)
		tmp = t * ((a * -4.0) / c_m);
	elseif (x <= 4.2e-122)
		tmp = t_1;
	else
		tmp = 9.0 * (x * (y / (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_] := Block[{t$95$1 = N[(b / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[x, -9.5e+187], N[(x * N[(N[(y / z), $MachinePrecision] * N[(9.0 / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -8e-5], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.8e-147], t$95$1, If[LessEqual[x, -9.5e-248], N[(t * N[(N[(a * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.2e-122], t$95$1, N[(9.0 * N[(x * N[(y / N[(z * c$95$m), $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])\\
\\
\begin{array}{l}
t_1 := \frac{b}{z \cdot c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{+187}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} \cdot \frac{9}{c\_m}\right)\\

\mathbf{elif}\;x \leq -8 \cdot 10^{-5}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\

\mathbf{elif}\;x \leq -4.8 \cdot 10^{-147}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -9.5 \cdot 10^{-248}:\\
\;\;\;\;t \cdot \frac{a \cdot -4}{c\_m}\\

\mathbf{elif}\;x \leq 4.2 \cdot 10^{-122}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -9.4999999999999996e187

    1. Initial program 61.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-61.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. *-commutative61.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*64.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. *-commutative64.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-64.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. associate-*l*64.4%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified64.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 57.7%

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{y \cdot 9}{\color{blue}{z \cdot c}} \]
      8. times-frac61.3%

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

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

    if -9.4999999999999996e187 < x < -8.00000000000000065e-5

    1. Initial program 66.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-66.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. *-commutative66.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*69.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. *-commutative69.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-69.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. associate-*l*69.2%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified66.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 z around inf 54.7%

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

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

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

    if -8.00000000000000065e-5 < x < -4.79999999999999997e-147 or -9.49999999999999971e-248 < x < 4.19999999999999985e-122

    1. Initial program 86.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-86.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. *-commutative86.1%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*86.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. *-commutative86.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-86.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. associate-*l*86.1%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\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 b around inf 52.6%

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

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

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

    if -4.79999999999999997e-147 < x < -9.49999999999999971e-248

    1. Initial program 67.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-67.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. *-commutative67.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.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. *-commutative67.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-67.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} \]
      6. associate-*l*67.3%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\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 z around inf 73.0%

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

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

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

        \[\leadsto \frac{1}{z} \cdot \frac{\color{blue}{\mathsf{fma}\left(z, 9 \cdot \frac{x \cdot y}{z} - 4 \cdot \left(a \cdot t\right), b\right)}}{c} \]
      4. cancel-sign-sub-inv72.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-4 \cdot \left(a \cdot t\right)}{c}} \]
      2. associate-*r*56.8%

        \[\leadsto \frac{\color{blue}{\left(-4 \cdot a\right) \cdot t}}{c} \]
      3. *-commutative56.8%

        \[\leadsto \frac{\color{blue}{t \cdot \left(-4 \cdot a\right)}}{c} \]
      4. associate-*r/61.9%

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

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

    if 4.19999999999999985e-122 < x

    1. Initial program 77.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-77.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. *-commutative77.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*79.8%

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

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

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

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified82.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 39.0%

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

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

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

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

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

Alternative 10: 47.6% 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 := \frac{b}{z \cdot c\_m}\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;x \leq -2.7 \cdot 10^{+187}:\\ \;\;\;\;x \cdot \left(\frac{y}{c\_m} \cdot \frac{9}{z}\right)\\ \mathbf{elif}\;x \leq -6.5 \cdot 10^{-5}:\\ \;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\ \mathbf{elif}\;x \leq -6.5 \cdot 10^{-151}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -1.4 \cdot 10^{-246}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c\_m}\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{-122}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c\_m}\right)\\ \end{array} \end{array} \end{array} \]
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (* z c_m))))
   (*
    c_s
    (if (<= x -2.7e+187)
      (* x (* (/ y c_m) (/ 9.0 z)))
      (if (<= x -6.5e-5)
        (* -4.0 (/ (* t a) c_m))
        (if (<= x -6.5e-151)
          t_1
          (if (<= x -1.4e-246)
            (* t (/ (* a -4.0) c_m))
            (if (<= x 2.3e-122) t_1 (* 9.0 (* x (/ y (* 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 t_1 = b / (z * c_m);
	double tmp;
	if (x <= -2.7e+187) {
		tmp = x * ((y / c_m) * (9.0 / z));
	} else if (x <= -6.5e-5) {
		tmp = -4.0 * ((t * a) / c_m);
	} else if (x <= -6.5e-151) {
		tmp = t_1;
	} else if (x <= -1.4e-246) {
		tmp = t * ((a * -4.0) / c_m);
	} else if (x <= 2.3e-122) {
		tmp = t_1;
	} else {
		tmp = 9.0 * (x * (y / (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) :: t_1
    real(8) :: tmp
    t_1 = b / (z * c_m)
    if (x <= (-2.7d+187)) then
        tmp = x * ((y / c_m) * (9.0d0 / z))
    else if (x <= (-6.5d-5)) then
        tmp = (-4.0d0) * ((t * a) / c_m)
    else if (x <= (-6.5d-151)) then
        tmp = t_1
    else if (x <= (-1.4d-246)) then
        tmp = t * ((a * (-4.0d0)) / c_m)
    else if (x <= 2.3d-122) then
        tmp = t_1
    else
        tmp = 9.0d0 * (x * (y / (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 t_1 = b / (z * c_m);
	double tmp;
	if (x <= -2.7e+187) {
		tmp = x * ((y / c_m) * (9.0 / z));
	} else if (x <= -6.5e-5) {
		tmp = -4.0 * ((t * a) / c_m);
	} else if (x <= -6.5e-151) {
		tmp = t_1;
	} else if (x <= -1.4e-246) {
		tmp = t * ((a * -4.0) / c_m);
	} else if (x <= 2.3e-122) {
		tmp = t_1;
	} else {
		tmp = 9.0 * (x * (y / (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):
	t_1 = b / (z * c_m)
	tmp = 0
	if x <= -2.7e+187:
		tmp = x * ((y / c_m) * (9.0 / z))
	elif x <= -6.5e-5:
		tmp = -4.0 * ((t * a) / c_m)
	elif x <= -6.5e-151:
		tmp = t_1
	elif x <= -1.4e-246:
		tmp = t * ((a * -4.0) / c_m)
	elif x <= 2.3e-122:
		tmp = t_1
	else:
		tmp = 9.0 * (x * (y / (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)
	t_1 = Float64(b / Float64(z * c_m))
	tmp = 0.0
	if (x <= -2.7e+187)
		tmp = Float64(x * Float64(Float64(y / c_m) * Float64(9.0 / z)));
	elseif (x <= -6.5e-5)
		tmp = Float64(-4.0 * Float64(Float64(t * a) / c_m));
	elseif (x <= -6.5e-151)
		tmp = t_1;
	elseif (x <= -1.4e-246)
		tmp = Float64(t * Float64(Float64(a * -4.0) / c_m));
	elseif (x <= 2.3e-122)
		tmp = t_1;
	else
		tmp = Float64(9.0 * Float64(x * Float64(y / Float64(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)
	t_1 = b / (z * c_m);
	tmp = 0.0;
	if (x <= -2.7e+187)
		tmp = x * ((y / c_m) * (9.0 / z));
	elseif (x <= -6.5e-5)
		tmp = -4.0 * ((t * a) / c_m);
	elseif (x <= -6.5e-151)
		tmp = t_1;
	elseif (x <= -1.4e-246)
		tmp = t * ((a * -4.0) / c_m);
	elseif (x <= 2.3e-122)
		tmp = t_1;
	else
		tmp = 9.0 * (x * (y / (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_] := Block[{t$95$1 = N[(b / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[x, -2.7e+187], N[(x * N[(N[(y / c$95$m), $MachinePrecision] * N[(9.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -6.5e-5], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -6.5e-151], t$95$1, If[LessEqual[x, -1.4e-246], N[(t * N[(N[(a * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.3e-122], t$95$1, N[(9.0 * N[(x * N[(y / N[(z * c$95$m), $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])\\
\\
\begin{array}{l}
t_1 := \frac{b}{z \cdot c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq -2.7 \cdot 10^{+187}:\\
\;\;\;\;x \cdot \left(\frac{y}{c\_m} \cdot \frac{9}{z}\right)\\

\mathbf{elif}\;x \leq -6.5 \cdot 10^{-5}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\

\mathbf{elif}\;x \leq -6.5 \cdot 10^{-151}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -1.4 \cdot 10^{-246}:\\
\;\;\;\;t \cdot \frac{a \cdot -4}{c\_m}\\

\mathbf{elif}\;x \leq 2.3 \cdot 10^{-122}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -2.70000000000000008e187

    1. Initial program 61.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. Simplified64.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.70000000000000008e187 < x < -6.49999999999999943e-5

    1. Initial program 66.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-66.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. *-commutative66.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*69.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. *-commutative69.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-69.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. associate-*l*69.2%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified66.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 z around inf 54.7%

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

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

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

    if -6.49999999999999943e-5 < x < -6.4999999999999994e-151 or -1.4e-246 < x < 2.30000000000000007e-122

    1. Initial program 86.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-86.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. *-commutative86.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*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. associate-*l*86.2%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\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. Taylor expanded in b around inf 52.1%

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

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

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

    if -6.4999999999999994e-151 < x < -1.4e-246

    1. Initial program 65.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-65.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. *-commutative65.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*65.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. *-commutative65.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-65.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. associate-*l*65.4%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified71.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 z around inf 71.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-4 \cdot \left(a \cdot t\right)}{c}} \]
      2. associate-*r*54.3%

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

        \[\leadsto \frac{\color{blue}{t \cdot \left(-4 \cdot a\right)}}{c} \]
      4. associate-*r/59.6%

        \[\leadsto \color{blue}{t \cdot \frac{-4 \cdot a}{c}} \]
    10. Simplified59.6%

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

    if 2.30000000000000007e-122 < x

    1. Initial program 77.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-77.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. *-commutative77.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*79.8%

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

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

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

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified82.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 39.0%

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

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

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

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

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

Alternative 11: 47.7% 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 := \frac{b}{z \cdot c\_m}\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;x \leq -2.5 \cdot 10^{+187}:\\ \;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c\_m}}{z}\right)\\ \mathbf{elif}\;x \leq -2.62 \cdot 10^{-5}:\\ \;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\ \mathbf{elif}\;x \leq -5.8 \cdot 10^{-150}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -2.1 \cdot 10^{-245}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c\_m}\\ \mathbf{elif}\;x \leq 4.2 \cdot 10^{-122}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c\_m}\right)\\ \end{array} \end{array} \end{array} \]
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (* z c_m))))
   (*
    c_s
    (if (<= x -2.5e+187)
      (* 9.0 (* x (/ (/ y c_m) z)))
      (if (<= x -2.62e-5)
        (* -4.0 (/ (* t a) c_m))
        (if (<= x -5.8e-150)
          t_1
          (if (<= x -2.1e-245)
            (* t (/ (* a -4.0) c_m))
            (if (<= x 4.2e-122) t_1 (* 9.0 (* x (/ y (* 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 t_1 = b / (z * c_m);
	double tmp;
	if (x <= -2.5e+187) {
		tmp = 9.0 * (x * ((y / c_m) / z));
	} else if (x <= -2.62e-5) {
		tmp = -4.0 * ((t * a) / c_m);
	} else if (x <= -5.8e-150) {
		tmp = t_1;
	} else if (x <= -2.1e-245) {
		tmp = t * ((a * -4.0) / c_m);
	} else if (x <= 4.2e-122) {
		tmp = t_1;
	} else {
		tmp = 9.0 * (x * (y / (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) :: t_1
    real(8) :: tmp
    t_1 = b / (z * c_m)
    if (x <= (-2.5d+187)) then
        tmp = 9.0d0 * (x * ((y / c_m) / z))
    else if (x <= (-2.62d-5)) then
        tmp = (-4.0d0) * ((t * a) / c_m)
    else if (x <= (-5.8d-150)) then
        tmp = t_1
    else if (x <= (-2.1d-245)) then
        tmp = t * ((a * (-4.0d0)) / c_m)
    else if (x <= 4.2d-122) then
        tmp = t_1
    else
        tmp = 9.0d0 * (x * (y / (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 t_1 = b / (z * c_m);
	double tmp;
	if (x <= -2.5e+187) {
		tmp = 9.0 * (x * ((y / c_m) / z));
	} else if (x <= -2.62e-5) {
		tmp = -4.0 * ((t * a) / c_m);
	} else if (x <= -5.8e-150) {
		tmp = t_1;
	} else if (x <= -2.1e-245) {
		tmp = t * ((a * -4.0) / c_m);
	} else if (x <= 4.2e-122) {
		tmp = t_1;
	} else {
		tmp = 9.0 * (x * (y / (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):
	t_1 = b / (z * c_m)
	tmp = 0
	if x <= -2.5e+187:
		tmp = 9.0 * (x * ((y / c_m) / z))
	elif x <= -2.62e-5:
		tmp = -4.0 * ((t * a) / c_m)
	elif x <= -5.8e-150:
		tmp = t_1
	elif x <= -2.1e-245:
		tmp = t * ((a * -4.0) / c_m)
	elif x <= 4.2e-122:
		tmp = t_1
	else:
		tmp = 9.0 * (x * (y / (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)
	t_1 = Float64(b / Float64(z * c_m))
	tmp = 0.0
	if (x <= -2.5e+187)
		tmp = Float64(9.0 * Float64(x * Float64(Float64(y / c_m) / z)));
	elseif (x <= -2.62e-5)
		tmp = Float64(-4.0 * Float64(Float64(t * a) / c_m));
	elseif (x <= -5.8e-150)
		tmp = t_1;
	elseif (x <= -2.1e-245)
		tmp = Float64(t * Float64(Float64(a * -4.0) / c_m));
	elseif (x <= 4.2e-122)
		tmp = t_1;
	else
		tmp = Float64(9.0 * Float64(x * Float64(y / Float64(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)
	t_1 = b / (z * c_m);
	tmp = 0.0;
	if (x <= -2.5e+187)
		tmp = 9.0 * (x * ((y / c_m) / z));
	elseif (x <= -2.62e-5)
		tmp = -4.0 * ((t * a) / c_m);
	elseif (x <= -5.8e-150)
		tmp = t_1;
	elseif (x <= -2.1e-245)
		tmp = t * ((a * -4.0) / c_m);
	elseif (x <= 4.2e-122)
		tmp = t_1;
	else
		tmp = 9.0 * (x * (y / (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_] := Block[{t$95$1 = N[(b / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[x, -2.5e+187], N[(9.0 * N[(x * N[(N[(y / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.62e-5], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.8e-150], t$95$1, If[LessEqual[x, -2.1e-245], N[(t * N[(N[(a * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.2e-122], t$95$1, N[(9.0 * N[(x * N[(y / N[(z * c$95$m), $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])\\
\\
\begin{array}{l}
t_1 := \frac{b}{z \cdot c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq -2.5 \cdot 10^{+187}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c\_m}}{z}\right)\\

\mathbf{elif}\;x \leq -2.62 \cdot 10^{-5}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\

\mathbf{elif}\;x \leq -5.8 \cdot 10^{-150}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -2.1 \cdot 10^{-245}:\\
\;\;\;\;t \cdot \frac{a \cdot -4}{c\_m}\\

\mathbf{elif}\;x \leq 4.2 \cdot 10^{-122}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -2.5000000000000001e187

    1. Initial program 61.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. Simplified64.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.5000000000000001e187 < x < -2.62e-5

    1. Initial program 66.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-66.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. *-commutative66.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*69.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. *-commutative69.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-69.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. associate-*l*69.2%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified66.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 z around inf 54.7%

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

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

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

    if -2.62e-5 < x < -5.7999999999999996e-150 or -2.1000000000000001e-245 < x < 4.19999999999999985e-122

    1. Initial program 86.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-86.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. *-commutative86.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*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. associate-*l*86.2%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\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. Taylor expanded in b around inf 52.1%

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

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

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

    if -5.7999999999999996e-150 < x < -2.1000000000000001e-245

    1. Initial program 65.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-65.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. *-commutative65.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*65.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. *-commutative65.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-65.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. associate-*l*65.4%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified71.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 z around inf 71.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-4 \cdot \left(a \cdot t\right)}{c}} \]
      2. associate-*r*54.3%

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

        \[\leadsto \frac{\color{blue}{t \cdot \left(-4 \cdot a\right)}}{c} \]
      4. associate-*r/59.6%

        \[\leadsto \color{blue}{t \cdot \frac{-4 \cdot a}{c}} \]
    10. Simplified59.6%

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

    if 4.19999999999999985e-122 < x

    1. Initial program 77.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-77.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. *-commutative77.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*79.8%

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

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

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

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified82.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 39.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.5 \cdot 10^{+187}:\\ \;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c}}{z}\right)\\ \mathbf{elif}\;x \leq -2.62 \cdot 10^{-5}:\\ \;\;\;\;-4 \cdot \frac{t \cdot a}{c}\\ \mathbf{elif}\;x \leq -5.8 \cdot 10^{-150}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;x \leq -2.1 \cdot 10^{-245}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c}\\ \mathbf{elif}\;x \leq 4.2 \cdot 10^{-122}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 47.3% 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 := \frac{b}{z \cdot c\_m}\\ t_2 := 9 \cdot \left(x \cdot \frac{y}{z \cdot c\_m}\right)\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{+187}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq -1.8 \cdot 10^{-5}:\\ \;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\ \mathbf{elif}\;x \leq -5.6 \cdot 10^{-147}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -6.5 \cdot 10^{-248}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c\_m}\\ \mathbf{elif}\;x \leq 4.2 \cdot 10^{-122}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \end{array} \]
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (* z c_m))) (t_2 (* 9.0 (* x (/ y (* z c_m))))))
   (*
    c_s
    (if (<= x -9.5e+187)
      t_2
      (if (<= x -1.8e-5)
        (* -4.0 (/ (* t a) c_m))
        (if (<= x -5.6e-147)
          t_1
          (if (<= x -6.5e-248)
            (* t (/ (* a -4.0) c_m))
            (if (<= x 4.2e-122) t_1 t_2))))))))
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 / (z * c_m);
	double t_2 = 9.0 * (x * (y / (z * c_m)));
	double tmp;
	if (x <= -9.5e+187) {
		tmp = t_2;
	} else if (x <= -1.8e-5) {
		tmp = -4.0 * ((t * a) / c_m);
	} else if (x <= -5.6e-147) {
		tmp = t_1;
	} else if (x <= -6.5e-248) {
		tmp = t * ((a * -4.0) / c_m);
	} else if (x <= 4.2e-122) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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 = b / (z * c_m)
    t_2 = 9.0d0 * (x * (y / (z * c_m)))
    if (x <= (-9.5d+187)) then
        tmp = t_2
    else if (x <= (-1.8d-5)) then
        tmp = (-4.0d0) * ((t * a) / c_m)
    else if (x <= (-5.6d-147)) then
        tmp = t_1
    else if (x <= (-6.5d-248)) then
        tmp = t * ((a * (-4.0d0)) / c_m)
    else if (x <= 4.2d-122) then
        tmp = t_1
    else
        tmp = t_2
    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 = b / (z * c_m);
	double t_2 = 9.0 * (x * (y / (z * c_m)));
	double tmp;
	if (x <= -9.5e+187) {
		tmp = t_2;
	} else if (x <= -1.8e-5) {
		tmp = -4.0 * ((t * a) / c_m);
	} else if (x <= -5.6e-147) {
		tmp = t_1;
	} else if (x <= -6.5e-248) {
		tmp = t * ((a * -4.0) / c_m);
	} else if (x <= 4.2e-122) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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 / (z * c_m)
	t_2 = 9.0 * (x * (y / (z * c_m)))
	tmp = 0
	if x <= -9.5e+187:
		tmp = t_2
	elif x <= -1.8e-5:
		tmp = -4.0 * ((t * a) / c_m)
	elif x <= -5.6e-147:
		tmp = t_1
	elif x <= -6.5e-248:
		tmp = t * ((a * -4.0) / c_m)
	elif x <= 4.2e-122:
		tmp = t_1
	else:
		tmp = t_2
	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(b / Float64(z * c_m))
	t_2 = Float64(9.0 * Float64(x * Float64(y / Float64(z * c_m))))
	tmp = 0.0
	if (x <= -9.5e+187)
		tmp = t_2;
	elseif (x <= -1.8e-5)
		tmp = Float64(-4.0 * Float64(Float64(t * a) / c_m));
	elseif (x <= -5.6e-147)
		tmp = t_1;
	elseif (x <= -6.5e-248)
		tmp = Float64(t * Float64(Float64(a * -4.0) / c_m));
	elseif (x <= 4.2e-122)
		tmp = t_1;
	else
		tmp = t_2;
	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 / (z * c_m);
	t_2 = 9.0 * (x * (y / (z * c_m)));
	tmp = 0.0;
	if (x <= -9.5e+187)
		tmp = t_2;
	elseif (x <= -1.8e-5)
		tmp = -4.0 * ((t * a) / c_m);
	elseif (x <= -5.6e-147)
		tmp = t_1;
	elseif (x <= -6.5e-248)
		tmp = t * ((a * -4.0) / c_m);
	elseif (x <= 4.2e-122)
		tmp = t_1;
	else
		tmp = t_2;
	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[(b / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(x * N[(y / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[x, -9.5e+187], t$95$2, If[LessEqual[x, -1.8e-5], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.6e-147], t$95$1, If[LessEqual[x, -6.5e-248], N[(t * N[(N[(a * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.2e-122], t$95$1, t$95$2]]]]]), $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}{z \cdot c\_m}\\
t_2 := 9 \cdot \left(x \cdot \frac{y}{z \cdot c\_m}\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{+187}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq -1.8 \cdot 10^{-5}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\

\mathbf{elif}\;x \leq -5.6 \cdot 10^{-147}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -6.5 \cdot 10^{-248}:\\
\;\;\;\;t \cdot \frac{a \cdot -4}{c\_m}\\

\mathbf{elif}\;x \leq 4.2 \cdot 10^{-122}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -9.4999999999999996e187 or 4.19999999999999985e-122 < x

    1. Initial program 73.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-73.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. *-commutative73.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*75.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. *-commutative75.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-75.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. associate-*l*76.7%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified77.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 inf 43.8%

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

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

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

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

    if -9.4999999999999996e187 < x < -1.80000000000000005e-5

    1. Initial program 66.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-66.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. *-commutative66.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*69.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. *-commutative69.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-69.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. associate-*l*69.2%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified66.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 z around inf 54.7%

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

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

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

    if -1.80000000000000005e-5 < x < -5.6000000000000001e-147 or -6.5e-248 < x < 4.19999999999999985e-122

    1. Initial program 86.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-86.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. *-commutative86.1%

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*86.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. *-commutative86.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-86.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. associate-*l*86.1%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\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 b around inf 52.6%

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

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

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

    if -5.6000000000000001e-147 < x < -6.5e-248

    1. Initial program 67.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-67.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. *-commutative67.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.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. *-commutative67.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-67.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} \]
      6. associate-*l*67.3%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\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 z around inf 73.0%

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

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

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

        \[\leadsto \frac{1}{z} \cdot \frac{\color{blue}{\mathsf{fma}\left(z, 9 \cdot \frac{x \cdot y}{z} - 4 \cdot \left(a \cdot t\right), b\right)}}{c} \]
      4. cancel-sign-sub-inv72.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-4 \cdot \left(a \cdot t\right)}{c}} \]
      2. associate-*r*56.8%

        \[\leadsto \frac{\color{blue}{\left(-4 \cdot a\right) \cdot t}}{c} \]
      3. *-commutative56.8%

        \[\leadsto \frac{\color{blue}{t \cdot \left(-4 \cdot a\right)}}{c} \]
      4. associate-*r/61.9%

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

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

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

Alternative 13: 67.1% 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 := a \cdot \frac{t \cdot -4}{c\_m}\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t \leq -1.3 \cdot 10^{+235}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -5.5 \cdot 10^{-69}:\\ \;\;\;\;\frac{b - z \cdot \left(a \cdot \left(4 \cdot t\right)\right)}{z \cdot c\_m}\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-15}:\\ \;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c\_m}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (* a (/ (* t -4.0) c_m))))
   (*
    c_s
    (if (<= t -1.3e+235)
      t_1
      (if (<= t -5.5e-69)
        (/ (- b (* z (* a (* 4.0 t)))) (* z c_m))
        (if (<= t 4.2e-15) (/ (+ b (* x (* 9.0 y))) (* z c_m)) 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 = a * ((t * -4.0) / c_m);
	double tmp;
	if (t <= -1.3e+235) {
		tmp = t_1;
	} else if (t <= -5.5e-69) {
		tmp = (b - (z * (a * (4.0 * t)))) / (z * c_m);
	} else if (t <= 4.2e-15) {
		tmp = (b + (x * (9.0 * y))) / (z * c_m);
	} 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 = a * ((t * (-4.0d0)) / c_m)
    if (t <= (-1.3d+235)) then
        tmp = t_1
    else if (t <= (-5.5d-69)) then
        tmp = (b - (z * (a * (4.0d0 * t)))) / (z * c_m)
    else if (t <= 4.2d-15) then
        tmp = (b + (x * (9.0d0 * y))) / (z * c_m)
    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 = a * ((t * -4.0) / c_m);
	double tmp;
	if (t <= -1.3e+235) {
		tmp = t_1;
	} else if (t <= -5.5e-69) {
		tmp = (b - (z * (a * (4.0 * t)))) / (z * c_m);
	} else if (t <= 4.2e-15) {
		tmp = (b + (x * (9.0 * y))) / (z * c_m);
	} 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 = a * ((t * -4.0) / c_m)
	tmp = 0
	if t <= -1.3e+235:
		tmp = t_1
	elif t <= -5.5e-69:
		tmp = (b - (z * (a * (4.0 * t)))) / (z * c_m)
	elif t <= 4.2e-15:
		tmp = (b + (x * (9.0 * y))) / (z * c_m)
	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(a * Float64(Float64(t * -4.0) / c_m))
	tmp = 0.0
	if (t <= -1.3e+235)
		tmp = t_1;
	elseif (t <= -5.5e-69)
		tmp = Float64(Float64(b - Float64(z * Float64(a * Float64(4.0 * t)))) / Float64(z * c_m));
	elseif (t <= 4.2e-15)
		tmp = Float64(Float64(b + Float64(x * Float64(9.0 * y))) / Float64(z * c_m));
	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 = a * ((t * -4.0) / c_m);
	tmp = 0.0;
	if (t <= -1.3e+235)
		tmp = t_1;
	elseif (t <= -5.5e-69)
		tmp = (b - (z * (a * (4.0 * t)))) / (z * c_m);
	elseif (t <= 4.2e-15)
		tmp = (b + (x * (9.0 * y))) / (z * c_m);
	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[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t, -1.3e+235], t$95$1, If[LessEqual[t, -5.5e-69], N[(N[(b - N[(z * N[(a * N[(4.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.2e-15], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $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 := a \cdot \frac{t \cdot -4}{c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -1.3 \cdot 10^{+235}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -5.5 \cdot 10^{-69}:\\
\;\;\;\;\frac{b - z \cdot \left(a \cdot \left(4 \cdot t\right)\right)}{z \cdot c\_m}\\

\mathbf{elif}\;t \leq 4.2 \cdot 10^{-15}:\\
\;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c\_m}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.2999999999999999e235 or 4.19999999999999962e-15 < t

    1. Initial program 60.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-60.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. *-commutative60.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*64.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. *-commutative64.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-64.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. associate-*l*64.1%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified64.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 62.1%

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

        \[\leadsto -4 \cdot \color{blue}{\left(a \cdot \frac{t}{c}\right)} \]
      2. associate-*r*71.3%

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

        \[\leadsto \color{blue}{\left(a \cdot -4\right)} \cdot \frac{t}{c} \]
      4. associate-*r*71.3%

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

        \[\leadsto a \cdot \color{blue}{\left(\frac{t}{c} \cdot -4\right)} \]
      6. associate-*l/71.3%

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

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

    if -1.2999999999999999e235 < t < -5.50000000000000006e-69

    1. Initial program 73.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-73.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. *-commutative73.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*78.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. *-commutative78.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-78.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. associate-*l*80.1%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified77.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 0 59.1%

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

        \[\leadsto \frac{b - 4 \cdot \color{blue}{\left(\left(t \cdot z\right) \cdot a\right)}}{c \cdot z} \]
      2. associate-*r*59.1%

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

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

        \[\leadsto \frac{b - \color{blue}{\left(z \cdot \left(4 \cdot t\right)\right)} \cdot a}{c \cdot z} \]
      5. associate-*r*63.1%

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

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

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

    if -5.50000000000000006e-69 < t < 4.19999999999999962e-15

    1. Initial program 88.1%

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

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

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*85.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. *-commutative85.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-85.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} \]
      6. associate-*l*85.7%

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

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

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

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

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

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

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

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

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

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

Alternative 14: 71.5% 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}\;t \leq -1.8 \cdot 10^{-71} \lor \neg \left(t \leq 3.7 \cdot 10^{-56}\right):\\ \;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c\_m} + \frac{b}{c\_m \cdot \left(z \cdot t\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c\_m}\\ \end{array} \end{array} \]
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (<= t -1.8e-71) (not (<= t 3.7e-56)))
    (* t (+ (* -4.0 (/ a c_m)) (/ b (* c_m (* z t)))))
    (/ (+ b (* x (* 9.0 y))) (* 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 ((t <= -1.8e-71) || !(t <= 3.7e-56)) {
		tmp = t * ((-4.0 * (a / c_m)) + (b / (c_m * (z * t))));
	} else {
		tmp = (b + (x * (9.0 * y))) / (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 ((t <= (-1.8d-71)) .or. (.not. (t <= 3.7d-56))) then
        tmp = t * (((-4.0d0) * (a / c_m)) + (b / (c_m * (z * t))))
    else
        tmp = (b + (x * (9.0d0 * y))) / (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 ((t <= -1.8e-71) || !(t <= 3.7e-56)) {
		tmp = t * ((-4.0 * (a / c_m)) + (b / (c_m * (z * t))));
	} else {
		tmp = (b + (x * (9.0 * y))) / (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 (t <= -1.8e-71) or not (t <= 3.7e-56):
		tmp = t * ((-4.0 * (a / c_m)) + (b / (c_m * (z * t))))
	else:
		tmp = (b + (x * (9.0 * y))) / (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 ((t <= -1.8e-71) || !(t <= 3.7e-56))
		tmp = Float64(t * Float64(Float64(-4.0 * Float64(a / c_m)) + Float64(b / Float64(c_m * Float64(z * t)))));
	else
		tmp = Float64(Float64(b + Float64(x * Float64(9.0 * y))) / Float64(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 ((t <= -1.8e-71) || ~((t <= 3.7e-56)))
		tmp = t * ((-4.0 * (a / c_m)) + (b / (c_m * (z * t))));
	else
		tmp = (b + (x * (9.0 * y))) / (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[Or[LessEqual[t, -1.8e-71], N[Not[LessEqual[t, 3.7e-56]], $MachinePrecision]], N[(t * N[(N[(-4.0 * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(b / N[(c$95$m * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $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}\;t \leq -1.8 \cdot 10^{-71} \lor \neg \left(t \leq 3.7 \cdot 10^{-56}\right):\\
\;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c\_m} + \frac{b}{c\_m \cdot \left(z \cdot t\right)}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.8e-71 or 3.7000000000000002e-56 < t

    1. Initial program 66.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-66.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. *-commutative66.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*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. associate-*l*71.5%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified70.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 0 68.5%

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

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

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

    if -1.8e-71 < t < 3.7000000000000002e-56

    1. Initial program 90.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-90.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. *-commutative90.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*87.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. *-commutative87.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-87.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. associate-*l*87.5%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\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. Taylor expanded in x around inf 80.8%

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

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

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

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

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

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

Alternative 15: 68.3% 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}\;t \leq -2.7 \cdot 10^{+68} \lor \neg \left(t \leq 5.9 \cdot 10^{-15}\right):\\ \;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c\_m}\\ \end{array} \end{array} \]
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (<= t -2.7e+68) (not (<= t 5.9e-15)))
    (* a (/ (* t -4.0) c_m))
    (/ (+ b (* x (* 9.0 y))) (* 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 ((t <= -2.7e+68) || !(t <= 5.9e-15)) {
		tmp = a * ((t * -4.0) / c_m);
	} else {
		tmp = (b + (x * (9.0 * y))) / (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 ((t <= (-2.7d+68)) .or. (.not. (t <= 5.9d-15))) then
        tmp = a * ((t * (-4.0d0)) / c_m)
    else
        tmp = (b + (x * (9.0d0 * y))) / (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 ((t <= -2.7e+68) || !(t <= 5.9e-15)) {
		tmp = a * ((t * -4.0) / c_m);
	} else {
		tmp = (b + (x * (9.0 * y))) / (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 (t <= -2.7e+68) or not (t <= 5.9e-15):
		tmp = a * ((t * -4.0) / c_m)
	else:
		tmp = (b + (x * (9.0 * y))) / (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 ((t <= -2.7e+68) || !(t <= 5.9e-15))
		tmp = Float64(a * Float64(Float64(t * -4.0) / c_m));
	else
		tmp = Float64(Float64(b + Float64(x * Float64(9.0 * y))) / Float64(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 ((t <= -2.7e+68) || ~((t <= 5.9e-15)))
		tmp = a * ((t * -4.0) / c_m);
	else
		tmp = (b + (x * (9.0 * y))) / (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[Or[LessEqual[t, -2.7e+68], N[Not[LessEqual[t, 5.9e-15]], $MachinePrecision]], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $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}\;t \leq -2.7 \cdot 10^{+68} \lor \neg \left(t \leq 5.9 \cdot 10^{-15}\right):\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.69999999999999991e68 or 5.89999999999999963e-15 < t

    1. Initial program 61.7%

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

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

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*67.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. *-commutative67.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-67.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} \]
      6. associate-*l*68.6%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified66.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 z around inf 60.3%

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

        \[\leadsto -4 \cdot \color{blue}{\left(a \cdot \frac{t}{c}\right)} \]
      2. associate-*r*67.0%

        \[\leadsto \color{blue}{\left(-4 \cdot a\right) \cdot \frac{t}{c}} \]
      3. *-commutative67.0%

        \[\leadsto \color{blue}{\left(a \cdot -4\right)} \cdot \frac{t}{c} \]
      4. associate-*r*67.0%

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

        \[\leadsto a \cdot \color{blue}{\left(\frac{t}{c} \cdot -4\right)} \]
      6. associate-*l/67.0%

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

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

    if -2.69999999999999991e68 < t < 5.89999999999999963e-15

    1. Initial program 85.5%

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

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

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} - b\right)}{z \cdot c} \]
      3. associate-*r*84.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. *-commutative84.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-84.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. associate-*l*84.3%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\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 inf 72.6%

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

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

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

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

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

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

Alternative 16: 49.3% 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.85 \cdot 10^{-55} \lor \neg \left(z \leq 9 \cdot 10^{-106}\right):\\ \;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c\_m}\\ \end{array} \end{array} \]
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 -1.85e-55) (not (<= z 9e-106)))
    (* a (/ (* t -4.0) c_m))
    (/ 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.85e-55) || !(z <= 9e-106)) {
		tmp = a * ((t * -4.0) / c_m);
	} else {
		tmp = 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.85d-55)) .or. (.not. (z <= 9d-106))) then
        tmp = a * ((t * (-4.0d0)) / c_m)
    else
        tmp = 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.85e-55) || !(z <= 9e-106)) {
		tmp = a * ((t * -4.0) / c_m);
	} else {
		tmp = 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.85e-55) or not (z <= 9e-106):
		tmp = a * ((t * -4.0) / c_m)
	else:
		tmp = 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.85e-55) || !(z <= 9e-106))
		tmp = Float64(a * Float64(Float64(t * -4.0) / c_m));
	else
		tmp = Float64(b / Float64(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.85e-55) || ~((z <= 9e-106)))
		tmp = a * ((t * -4.0) / c_m);
	else
		tmp = 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[Or[LessEqual[z, -1.85e-55], N[Not[LessEqual[z, 9e-106]], $MachinePrecision]], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], N[(b / N[(z * c$95$m), $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.85 \cdot 10^{-55} \lor \neg \left(z \leq 9 \cdot 10^{-106}\right):\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\

\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c\_m}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.84999999999999993e-55 or 8.99999999999999911e-106 < z

    1. Initial program 66.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-66.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. *-commutative66.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*68.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. *-commutative68.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-68.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} \]
      6. associate-*l*69.3%

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

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

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

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

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

        \[\leadsto -4 \cdot \color{blue}{\left(a \cdot \frac{t}{c}\right)} \]
      2. associate-*r*54.2%

        \[\leadsto \color{blue}{\left(-4 \cdot a\right) \cdot \frac{t}{c}} \]
      3. *-commutative54.2%

        \[\leadsto \color{blue}{\left(a \cdot -4\right)} \cdot \frac{t}{c} \]
      4. associate-*r*54.2%

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

        \[\leadsto a \cdot \color{blue}{\left(\frac{t}{c} \cdot -4\right)} \]
      6. associate-*l/54.3%

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

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

    if -1.84999999999999993e-55 < z < 8.99999999999999911e-106

    1. Initial program 96.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-96.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. *-commutative96.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*96.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. *-commutative96.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-96.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. associate-*l*96.1%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified93.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 b around inf 68.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{-55} \lor \neg \left(z \leq 9 \cdot 10^{-106}\right):\\ \;\;\;\;a \cdot \frac{t \cdot -4}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 48.8% 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 -9.5 \cdot 10^{-51}:\\ \;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{-104}:\\ \;\;\;\;\frac{b}{z \cdot c\_m}\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\ \end{array} \end{array} \]
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 -9.5e-51)
    (* -4.0 (/ (* t a) c_m))
    (if (<= z 2.55e-104) (/ b (* z c_m)) (* a (/ (* t -4.0) 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 <= -9.5e-51) {
		tmp = -4.0 * ((t * a) / c_m);
	} else if (z <= 2.55e-104) {
		tmp = b / (z * c_m);
	} else {
		tmp = a * ((t * -4.0) / 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 <= (-9.5d-51)) then
        tmp = (-4.0d0) * ((t * a) / c_m)
    else if (z <= 2.55d-104) then
        tmp = b / (z * c_m)
    else
        tmp = a * ((t * (-4.0d0)) / 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 <= -9.5e-51) {
		tmp = -4.0 * ((t * a) / c_m);
	} else if (z <= 2.55e-104) {
		tmp = b / (z * c_m);
	} else {
		tmp = a * ((t * -4.0) / 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 <= -9.5e-51:
		tmp = -4.0 * ((t * a) / c_m)
	elif z <= 2.55e-104:
		tmp = b / (z * c_m)
	else:
		tmp = a * ((t * -4.0) / 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 <= -9.5e-51)
		tmp = Float64(-4.0 * Float64(Float64(t * a) / c_m));
	elseif (z <= 2.55e-104)
		tmp = Float64(b / Float64(z * c_m));
	else
		tmp = Float64(a * Float64(Float64(t * -4.0) / 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 <= -9.5e-51)
		tmp = -4.0 * ((t * a) / c_m);
	elseif (z <= 2.55e-104)
		tmp = b / (z * c_m);
	else
		tmp = a * ((t * -4.0) / 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, -9.5e-51], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.55e-104], N[(b / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $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 -9.5 \cdot 10^{-51}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\

\mathbf{elif}\;z \leq 2.55 \cdot 10^{-104}:\\
\;\;\;\;\frac{b}{z \cdot c\_m}\\

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


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

    1. Initial program 61.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-61.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. *-commutative61.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.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. *-commutative67.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-67.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. associate-*l*68.3%

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

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

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

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

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

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

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

    if -9.4999999999999998e-51 < z < 2.54999999999999996e-104

    1. Initial program 96.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-96.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. *-commutative96.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*96.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. *-commutative96.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-96.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. associate-*l*96.1%

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

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

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified92.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 b around inf 68.0%

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

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

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

    if 2.54999999999999996e-104 < z

    1. Initial program 71.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-71.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. *-commutative71.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.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. *-commutative69.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-69.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. associate-*l*69.9%

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

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

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

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

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

        \[\leadsto -4 \cdot \color{blue}{\left(a \cdot \frac{t}{c}\right)} \]
      2. associate-*r*52.2%

        \[\leadsto \color{blue}{\left(-4 \cdot a\right) \cdot \frac{t}{c}} \]
      3. *-commutative52.2%

        \[\leadsto \color{blue}{\left(a \cdot -4\right)} \cdot \frac{t}{c} \]
      4. associate-*r*52.2%

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

        \[\leadsto a \cdot \color{blue}{\left(\frac{t}{c} \cdot -4\right)} \]
      6. associate-*l/52.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{-51}:\\ \;\;\;\;-4 \cdot \frac{t \cdot a}{c}\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{-104}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{t \cdot -4}{c}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 35.8% 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}{z \cdot c\_m} \end{array} \]
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) 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 (* 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) {
	return c_s * (b / (z * c_m));
}
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 / (z * c_m))
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 / (z * c_m));
}
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 / (z * c_m))
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(z * c_m)))
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 / (z * c_m));
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[(z * c$95$m), $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}{z \cdot c\_m}
\end{array}
Derivation
  1. Initial program 76.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-76.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. *-commutative76.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*77.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. *-commutative77.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-77.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. associate-*l*78.2%

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

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

      \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
  3. Simplified78.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 37.7%

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

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

    \[\leadsto \color{blue}{\frac{b}{z \cdot c}} \]
  8. Add Preprocessing

Developer target: 80.5% 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 2024110 
(FPCore (x y z t a b c)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, J"
  :precision binary64

  :alt
  (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)))