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

Percentage Accurate: 79.8% → 87.7%
Time: 15.9s
Alternatives: 17
Speedup: 0.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 79.8% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < 5.6e53

    1. Initial program 84.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*85.5%

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

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

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

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

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

    if 5.6e53 < c

    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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*71.6%

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

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

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

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

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

      \[\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. Step-by-step derivation
      1. fma-define80.2%

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

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.19999999999999989e95 or 1e108 < z

    1. Initial program 55.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*67.3%

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

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

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

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

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

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

    if -9.19999999999999989e95 < z < 1e108

    1. Initial program 93.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. Simplified95.3%

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

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

Alternative 3: 87.5% accurate, 0.2× speedup?

\[\begin{array}{l} c\_m = \left|c\right| \\ c\_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ \begin{array}{l} t_1 := \frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{c\_m \cdot z}\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-246}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{\frac{b - 4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{c\_m}}{z}\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(-4 \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.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (let* ((t_1 (/ (+ b (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* c_m z))))
   (*
    c_s
    (if (<= t_1 -2e-246)
      t_1
      (if (<= t_1 0.0)
        (/ (/ (- b (* 4.0 (* a (* z t)))) c_m) z)
        (if (<= t_1 INFINITY) t_1 (* a (* -4.0 (/ 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);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z);
	double tmp;
	if (t_1 <= -2e-246) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = ((b - (4.0 * (a * (z * t)))) / c_m) / z;
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = t_1;
	} else {
		tmp = a * (-4.0 * (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;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z);
	double tmp;
	if (t_1 <= -2e-246) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = ((b - (4.0 * (a * (z * t)))) / c_m) / z;
	} else if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else {
		tmp = a * (-4.0 * (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])
def code(c_s, x, y, z, t, a, b, c_m):
	t_1 = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z)
	tmp = 0
	if t_1 <= -2e-246:
		tmp = t_1
	elif t_1 <= 0.0:
		tmp = ((b - (4.0 * (a * (z * t)))) / c_m) / z
	elif t_1 <= math.inf:
		tmp = t_1
	else:
		tmp = a * (-4.0 * (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])
function code(c_s, x, y, z, t, a, b, c_m)
	t_1 = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(c_m * z))
	tmp = 0.0
	if (t_1 <= -2e-246)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(Float64(b - Float64(4.0 * Float64(a * Float64(z * t)))) / c_m) / z);
	elseif (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = Float64(a * Float64(-4.0 * 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])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
	t_1 = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z);
	tmp = 0.0;
	if (t_1 <= -2e-246)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = ((b - (4.0 * (a * (z * t)))) / c_m) / z;
	elseif (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = a * (-4.0 * (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.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(b + N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -2e-246], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(b - N[(4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$1, N[(a * N[(-4.0 * 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])\\
\\
\begin{array}{l}
t_1 := \frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{c\_m \cdot z}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-246}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{else}:\\
\;\;\;\;a \cdot \left(-4 \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.99999999999999991e-246 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 90.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. Add Preprocessing

    if -1.99999999999999991e-246 < (/.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 39.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. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative39.0%

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{b - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c}}}{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. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 87.0% accurate, 0.3× 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])\\ \\ \begin{array}{l} t_1 := \left(x \cdot \left(9 \cdot y\right) - z \cdot \left(4 \cdot \left(t \cdot a\right)\right)\right) + b\\ t_2 := \frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{c\_m \cdot z}\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t\_2 \leq 5 \cdot 10^{+25}:\\ \;\;\;\;\frac{\frac{t\_1}{z}}{c\_m}\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;t\_1 \cdot \frac{1}{c\_m \cdot z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(-4 \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.
(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))
        (t_2 (/ (+ b (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* c_m z))))
   (*
    c_s
    (if (<= t_2 5e+25)
      (/ (/ t_1 z) c_m)
      (if (<= t_2 INFINITY)
        (* t_1 (/ 1.0 (* c_m z)))
        (* a (* -4.0 (/ 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);
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;
	double t_2 = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z);
	double tmp;
	if (t_2 <= 5e+25) {
		tmp = (t_1 / z) / c_m;
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = t_1 * (1.0 / (c_m * z));
	} else {
		tmp = a * (-4.0 * (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;
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;
	double t_2 = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z);
	double tmp;
	if (t_2 <= 5e+25) {
		tmp = (t_1 / z) / c_m;
	} else if (t_2 <= Double.POSITIVE_INFINITY) {
		tmp = t_1 * (1.0 / (c_m * z));
	} else {
		tmp = a * (-4.0 * (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])
def code(c_s, x, y, z, t, a, b, c_m):
	t_1 = ((x * (9.0 * y)) - (z * (4.0 * (t * a)))) + b
	t_2 = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z)
	tmp = 0
	if t_2 <= 5e+25:
		tmp = (t_1 / z) / c_m
	elif t_2 <= math.inf:
		tmp = t_1 * (1.0 / (c_m * z))
	else:
		tmp = a * (-4.0 * (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])
function code(c_s, x, y, z, t, a, b, c_m)
	t_1 = Float64(Float64(Float64(x * Float64(9.0 * y)) - Float64(z * Float64(4.0 * Float64(t * a)))) + b)
	t_2 = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(c_m * z))
	tmp = 0.0
	if (t_2 <= 5e+25)
		tmp = Float64(Float64(t_1 / z) / c_m);
	elseif (t_2 <= Inf)
		tmp = Float64(t_1 * Float64(1.0 / Float64(c_m * z)));
	else
		tmp = Float64(a * Float64(-4.0 * 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])){:}
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;
	t_2 = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z);
	tmp = 0.0;
	if (t_2 <= 5e+25)
		tmp = (t_1 / z) / c_m;
	elseif (t_2 <= Inf)
		tmp = t_1 * (1.0 / (c_m * z));
	else
		tmp = a * (-4.0 * (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.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(z * N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b + N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$2, 5e+25], N[(N[(t$95$1 / z), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(t$95$1 * N[(1.0 / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(-4.0 * 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])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot \left(9 \cdot y\right) - z \cdot \left(4 \cdot \left(t \cdot a\right)\right)\right) + b\\
t_2 := \frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{c\_m \cdot z}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_2 \leq 5 \cdot 10^{+25}:\\
\;\;\;\;\frac{\frac{t\_1}{z}}{c\_m}\\

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_1 \cdot \frac{1}{c\_m \cdot z}\\

\mathbf{else}:\\
\;\;\;\;a \cdot \left(-4 \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)) < 5.00000000000000024e25

    1. Initial program 86.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*89.3%

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

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

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

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

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

    if 5.00000000000000024e25 < (/.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.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. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num89.7%

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

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

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

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

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

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

    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. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+80}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m} + \frac{b}{c\_m \cdot z}\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+211}:\\
\;\;\;\;\frac{b + t\_1}{c\_m \cdot z}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -0.0400000000000000008

    1. Initial program 79.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. Add Preprocessing
    3. Taylor expanded in x around inf 71.8%

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

    if -0.0400000000000000008 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 4.99999999999999961e80

    1. Initial program 83.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. Add Preprocessing
    3. Taylor expanded in x around 0 79.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999961e80 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 4.9999999999999995e211

    1. Initial program 93.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. Add Preprocessing
    3. Taylor expanded in x around inf 93.5%

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

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

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

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

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

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

    if 4.9999999999999995e211 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 76.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. Add Preprocessing
    3. Taylor expanded in b around 0 76.1%

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

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

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

Alternative 6: 76.7% accurate, 0.4× 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])\\ \\ \begin{array}{l} t_1 := y \cdot \left(x \cdot 9\right)\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -0.04:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{c\_m \cdot z}\\ \mathbf{elif}\;t\_1 \leq 10^{+57}:\\ \;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m} + \frac{b}{c\_m \cdot z}\\ \mathbf{elif}\;t\_1 \leq 10^{+261}:\\ \;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c\_m} + 9 \cdot \frac{x \cdot y}{a \cdot \left(c\_m \cdot z\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(9 \cdot \frac{\frac{x}{z}}{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.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (let* ((t_1 (* y (* x 9.0))))
   (*
    c_s
    (if (<= t_1 -0.04)
      (/ (+ b (* 9.0 (* x y))) (* c_m z))
      (if (<= t_1 1e+57)
        (+ (* -4.0 (/ (* t a) c_m)) (/ b (* c_m z)))
        (if (<= t_1 1e+261)
          (* a (+ (* -4.0 (/ t c_m)) (* 9.0 (/ (* x y) (* a (* c_m z))))))
          (* y (* 9.0 (/ (/ x 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);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = y * (x * 9.0);
	double tmp;
	if (t_1 <= -0.04) {
		tmp = (b + (9.0 * (x * y))) / (c_m * z);
	} else if (t_1 <= 1e+57) {
		tmp = (-4.0 * ((t * a) / c_m)) + (b / (c_m * z));
	} else if (t_1 <= 1e+261) {
		tmp = a * ((-4.0 * (t / c_m)) + (9.0 * ((x * y) / (a * (c_m * z)))));
	} else {
		tmp = y * (9.0 * ((x / 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.
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 = y * (x * 9.0d0)
    if (t_1 <= (-0.04d0)) then
        tmp = (b + (9.0d0 * (x * y))) / (c_m * z)
    else if (t_1 <= 1d+57) then
        tmp = ((-4.0d0) * ((t * a) / c_m)) + (b / (c_m * z))
    else if (t_1 <= 1d+261) then
        tmp = a * (((-4.0d0) * (t / c_m)) + (9.0d0 * ((x * y) / (a * (c_m * z)))))
    else
        tmp = y * (9.0d0 * ((x / 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;
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 = y * (x * 9.0);
	double tmp;
	if (t_1 <= -0.04) {
		tmp = (b + (9.0 * (x * y))) / (c_m * z);
	} else if (t_1 <= 1e+57) {
		tmp = (-4.0 * ((t * a) / c_m)) + (b / (c_m * z));
	} else if (t_1 <= 1e+261) {
		tmp = a * ((-4.0 * (t / c_m)) + (9.0 * ((x * y) / (a * (c_m * z)))));
	} else {
		tmp = y * (9.0 * ((x / 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])
def code(c_s, x, y, z, t, a, b, c_m):
	t_1 = y * (x * 9.0)
	tmp = 0
	if t_1 <= -0.04:
		tmp = (b + (9.0 * (x * y))) / (c_m * z)
	elif t_1 <= 1e+57:
		tmp = (-4.0 * ((t * a) / c_m)) + (b / (c_m * z))
	elif t_1 <= 1e+261:
		tmp = a * ((-4.0 * (t / c_m)) + (9.0 * ((x * y) / (a * (c_m * z)))))
	else:
		tmp = y * (9.0 * ((x / 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])
function code(c_s, x, y, z, t, a, b, c_m)
	t_1 = Float64(y * Float64(x * 9.0))
	tmp = 0.0
	if (t_1 <= -0.04)
		tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(c_m * z));
	elseif (t_1 <= 1e+57)
		tmp = Float64(Float64(-4.0 * Float64(Float64(t * a) / c_m)) + Float64(b / Float64(c_m * z)));
	elseif (t_1 <= 1e+261)
		tmp = Float64(a * Float64(Float64(-4.0 * Float64(t / c_m)) + Float64(9.0 * Float64(Float64(x * y) / Float64(a * Float64(c_m * z))))));
	else
		tmp = Float64(y * Float64(9.0 * Float64(Float64(x / 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])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
	t_1 = y * (x * 9.0);
	tmp = 0.0;
	if (t_1 <= -0.04)
		tmp = (b + (9.0 * (x * y))) / (c_m * z);
	elseif (t_1 <= 1e+57)
		tmp = (-4.0 * ((t * a) / c_m)) + (b / (c_m * z));
	elseif (t_1 <= 1e+261)
		tmp = a * ((-4.0 * (t / c_m)) + (9.0 * ((x * y) / (a * (c_m * z)))));
	else
		tmp = y * (9.0 * ((x / 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.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -0.04], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+57], N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+261], N[(a * N[(N[(-4.0 * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(a * N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(9.0 * N[(N[(x / z), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := y \cdot \left(x \cdot 9\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -0.04:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{c\_m \cdot z}\\

\mathbf{elif}\;t\_1 \leq 10^{+57}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m} + \frac{b}{c\_m \cdot z}\\

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -0.0400000000000000008

    1. Initial program 79.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. Add Preprocessing
    3. Taylor expanded in x around inf 71.8%

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

    if -0.0400000000000000008 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.00000000000000005e57

    1. Initial program 82.7%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 79.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000005e57 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 9.9999999999999993e260

    1. Initial program 93.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. Add Preprocessing
    3. Taylor expanded in b around 0 74.1%

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

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

    if 9.9999999999999993e260 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 72.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. Add Preprocessing
    3. Taylor expanded in b around 0 72.9%

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

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

      \[\leadsto y \cdot \color{blue}{\left(9 \cdot \frac{x}{c \cdot z}\right)} \]
    6. Step-by-step derivation
      1. associate-/l/91.6%

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

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

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

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -2.00000000000000013e294 or 2.00000000000000011e301 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 59.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. Add Preprocessing
    3. Taylor expanded in b around 0 60.5%

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

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

      \[\leadsto y \cdot \color{blue}{\left(9 \cdot \frac{x}{c \cdot z}\right)} \]
    6. Step-by-step derivation
      1. associate-/l/88.9%

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

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

    if -2.00000000000000013e294 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2.00000000000000011e301

    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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*87.4%

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

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.9999999999999997e34 or 3.0000000000000001e155 < z

    1. Initial program 62.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*70.1%

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

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

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

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

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

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

    if -9.9999999999999997e34 < z < 3.0000000000000001e155

    1. Initial program 90.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. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative90.9%

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

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

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

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

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

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

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

Alternative 9: 74.5% accurate, 0.6× speedup?

\[\begin{array}{l} c\_m = \left|c\right| \\ c\_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ \begin{array}{l} t_1 := y \cdot \left(x \cdot 9\right)\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -0.04:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{c\_m \cdot z}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+80}:\\ \;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m} + \frac{b}{c\_m \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \left(9 \cdot \frac{y}{z} + \frac{b}{x \cdot z}\right)}{c\_m}\\ \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.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (let* ((t_1 (* y (* x 9.0))))
   (*
    c_s
    (if (<= t_1 -0.04)
      (/ (+ b (* 9.0 (* x y))) (* c_m z))
      (if (<= t_1 5e+80)
        (+ (* -4.0 (/ (* t a) c_m)) (/ b (* c_m z)))
        (/ (* x (+ (* 9.0 (/ y z)) (/ b (* x 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);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = y * (x * 9.0);
	double tmp;
	if (t_1 <= -0.04) {
		tmp = (b + (9.0 * (x * y))) / (c_m * z);
	} else if (t_1 <= 5e+80) {
		tmp = (-4.0 * ((t * a) / c_m)) + (b / (c_m * z));
	} else {
		tmp = (x * ((9.0 * (y / z)) + (b / (x * 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.
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 = y * (x * 9.0d0)
    if (t_1 <= (-0.04d0)) then
        tmp = (b + (9.0d0 * (x * y))) / (c_m * z)
    else if (t_1 <= 5d+80) then
        tmp = ((-4.0d0) * ((t * a) / c_m)) + (b / (c_m * z))
    else
        tmp = (x * ((9.0d0 * (y / z)) + (b / (x * 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;
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 = y * (x * 9.0);
	double tmp;
	if (t_1 <= -0.04) {
		tmp = (b + (9.0 * (x * y))) / (c_m * z);
	} else if (t_1 <= 5e+80) {
		tmp = (-4.0 * ((t * a) / c_m)) + (b / (c_m * z));
	} else {
		tmp = (x * ((9.0 * (y / z)) + (b / (x * 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])
def code(c_s, x, y, z, t, a, b, c_m):
	t_1 = y * (x * 9.0)
	tmp = 0
	if t_1 <= -0.04:
		tmp = (b + (9.0 * (x * y))) / (c_m * z)
	elif t_1 <= 5e+80:
		tmp = (-4.0 * ((t * a) / c_m)) + (b / (c_m * z))
	else:
		tmp = (x * ((9.0 * (y / z)) + (b / (x * 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])
function code(c_s, x, y, z, t, a, b, c_m)
	t_1 = Float64(y * Float64(x * 9.0))
	tmp = 0.0
	if (t_1 <= -0.04)
		tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(c_m * z));
	elseif (t_1 <= 5e+80)
		tmp = Float64(Float64(-4.0 * Float64(Float64(t * a) / c_m)) + Float64(b / Float64(c_m * z)));
	else
		tmp = Float64(Float64(x * Float64(Float64(9.0 * Float64(y / z)) + Float64(b / Float64(x * 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])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
	t_1 = y * (x * 9.0);
	tmp = 0.0;
	if (t_1 <= -0.04)
		tmp = (b + (9.0 * (x * y))) / (c_m * z);
	elseif (t_1 <= 5e+80)
		tmp = (-4.0 * ((t * a) / c_m)) + (b / (c_m * z));
	else
		tmp = (x * ((9.0 * (y / z)) + (b / (x * 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.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -0.04], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+80], N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[(9.0 * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(b / N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := y \cdot \left(x \cdot 9\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -0.04:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{c\_m \cdot z}\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+80}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m} + \frac{b}{c\_m \cdot z}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -0.0400000000000000008

    1. Initial program 79.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. Add Preprocessing
    3. Taylor expanded in x around inf 71.8%

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

    if -0.0400000000000000008 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 4.99999999999999961e80

    1. Initial program 83.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. Add Preprocessing
    3. Taylor expanded in x around 0 79.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999961e80 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 80.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*82.7%

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

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

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

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

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

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

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

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

Alternative 10: 74.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])\\ \\ \begin{array}{l} t_1 := y \cdot \left(x \cdot 9\right)\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -0.04:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{c\_m \cdot z}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+80}:\\ \;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m} + \frac{b}{c\_m \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b + t\_1}{z}}{c\_m}\\ \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.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (let* ((t_1 (* y (* x 9.0))))
   (*
    c_s
    (if (<= t_1 -0.04)
      (/ (+ b (* 9.0 (* x y))) (* c_m z))
      (if (<= t_1 5e+80)
        (+ (* -4.0 (/ (* t a) c_m)) (/ b (* c_m z)))
        (/ (/ (+ b t_1) 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);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = y * (x * 9.0);
	double tmp;
	if (t_1 <= -0.04) {
		tmp = (b + (9.0 * (x * y))) / (c_m * z);
	} else if (t_1 <= 5e+80) {
		tmp = (-4.0 * ((t * a) / c_m)) + (b / (c_m * z));
	} else {
		tmp = ((b + t_1) / 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.
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 = y * (x * 9.0d0)
    if (t_1 <= (-0.04d0)) then
        tmp = (b + (9.0d0 * (x * y))) / (c_m * z)
    else if (t_1 <= 5d+80) then
        tmp = ((-4.0d0) * ((t * a) / c_m)) + (b / (c_m * z))
    else
        tmp = ((b + t_1) / 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;
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 = y * (x * 9.0);
	double tmp;
	if (t_1 <= -0.04) {
		tmp = (b + (9.0 * (x * y))) / (c_m * z);
	} else if (t_1 <= 5e+80) {
		tmp = (-4.0 * ((t * a) / c_m)) + (b / (c_m * z));
	} else {
		tmp = ((b + t_1) / 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])
def code(c_s, x, y, z, t, a, b, c_m):
	t_1 = y * (x * 9.0)
	tmp = 0
	if t_1 <= -0.04:
		tmp = (b + (9.0 * (x * y))) / (c_m * z)
	elif t_1 <= 5e+80:
		tmp = (-4.0 * ((t * a) / c_m)) + (b / (c_m * z))
	else:
		tmp = ((b + t_1) / 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])
function code(c_s, x, y, z, t, a, b, c_m)
	t_1 = Float64(y * Float64(x * 9.0))
	tmp = 0.0
	if (t_1 <= -0.04)
		tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(c_m * z));
	elseif (t_1 <= 5e+80)
		tmp = Float64(Float64(-4.0 * Float64(Float64(t * a) / c_m)) + Float64(b / Float64(c_m * z)));
	else
		tmp = Float64(Float64(Float64(b + t_1) / 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])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
	t_1 = y * (x * 9.0);
	tmp = 0.0;
	if (t_1 <= -0.04)
		tmp = (b + (9.0 * (x * y))) / (c_m * z);
	elseif (t_1 <= 5e+80)
		tmp = (-4.0 * ((t * a) / c_m)) + (b / (c_m * z));
	else
		tmp = ((b + t_1) / 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.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -0.04], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+80], N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b + t$95$1), $MachinePrecision] / z), $MachinePrecision] / c$95$m), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := y \cdot \left(x \cdot 9\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -0.04:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{c\_m \cdot z}\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+80}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m} + \frac{b}{c\_m \cdot z}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{b + t\_1}{z}}{c\_m}\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -0.0400000000000000008

    1. Initial program 79.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. Add Preprocessing
    3. Taylor expanded in x around inf 71.8%

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

    if -0.0400000000000000008 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 4.99999999999999961e80

    1. Initial program 83.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. Add Preprocessing
    3. Taylor expanded in x around 0 79.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999961e80 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 80.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*82.7%

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

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

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

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

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

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

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

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

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

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

Alternative 11: 49.0% 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])\\ \\ c\_s \cdot \begin{array}{l} \mathbf{if}\;b \leq -1.4 \cdot 10^{+120}:\\ \;\;\;\;\frac{b}{c\_m \cdot z}\\ \mathbf{elif}\;b \leq -3.5 \cdot 10^{-54}:\\ \;\;\;\;x \cdot \frac{9 \cdot y}{c\_m \cdot z}\\ \mathbf{elif}\;b \leq -7.2 \cdot 10^{-250}:\\ \;\;\;\;\frac{t \cdot \left(a \cdot -4\right)}{c\_m}\\ \mathbf{elif}\;b \leq 6.1 \cdot 10^{+22}:\\ \;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c\_m}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b}{z}}{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.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (*
  c_s
  (if (<= b -1.4e+120)
    (/ b (* c_m z))
    (if (<= b -3.5e-54)
      (* x (/ (* 9.0 y) (* c_m z)))
      (if (<= b -7.2e-250)
        (/ (* t (* a -4.0)) c_m)
        (if (<= b 6.1e+22) (* a (* -4.0 (/ t 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);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double tmp;
	if (b <= -1.4e+120) {
		tmp = b / (c_m * z);
	} else if (b <= -3.5e-54) {
		tmp = x * ((9.0 * y) / (c_m * z));
	} else if (b <= -7.2e-250) {
		tmp = (t * (a * -4.0)) / c_m;
	} else if (b <= 6.1e+22) {
		tmp = a * (-4.0 * (t / 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.
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 (b <= (-1.4d+120)) then
        tmp = b / (c_m * z)
    else if (b <= (-3.5d-54)) then
        tmp = x * ((9.0d0 * y) / (c_m * z))
    else if (b <= (-7.2d-250)) then
        tmp = (t * (a * (-4.0d0))) / c_m
    else if (b <= 6.1d+22) then
        tmp = a * ((-4.0d0) * (t / 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;
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 (b <= -1.4e+120) {
		tmp = b / (c_m * z);
	} else if (b <= -3.5e-54) {
		tmp = x * ((9.0 * y) / (c_m * z));
	} else if (b <= -7.2e-250) {
		tmp = (t * (a * -4.0)) / c_m;
	} else if (b <= 6.1e+22) {
		tmp = a * (-4.0 * (t / 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])
def code(c_s, x, y, z, t, a, b, c_m):
	tmp = 0
	if b <= -1.4e+120:
		tmp = b / (c_m * z)
	elif b <= -3.5e-54:
		tmp = x * ((9.0 * y) / (c_m * z))
	elif b <= -7.2e-250:
		tmp = (t * (a * -4.0)) / c_m
	elif b <= 6.1e+22:
		tmp = a * (-4.0 * (t / 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])
function code(c_s, x, y, z, t, a, b, c_m)
	tmp = 0.0
	if (b <= -1.4e+120)
		tmp = Float64(b / Float64(c_m * z));
	elseif (b <= -3.5e-54)
		tmp = Float64(x * Float64(Float64(9.0 * y) / Float64(c_m * z)));
	elseif (b <= -7.2e-250)
		tmp = Float64(Float64(t * Float64(a * -4.0)) / c_m);
	elseif (b <= 6.1e+22)
		tmp = Float64(a * Float64(-4.0 * Float64(t / c_m)));
	else
		tmp = Float64(Float64(b / z) / c_m);
	end
	return Float64(c_s * tmp)
end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
	tmp = 0.0;
	if (b <= -1.4e+120)
		tmp = b / (c_m * z);
	elseif (b <= -3.5e-54)
		tmp = x * ((9.0 * y) / (c_m * z));
	elseif (b <= -7.2e-250)
		tmp = (t * (a * -4.0)) / c_m;
	elseif (b <= 6.1e+22)
		tmp = a * (-4.0 * (t / 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.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[b, -1.4e+120], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -3.5e-54], N[(x * N[(N[(9.0 * y), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -7.2e-250], N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[b, 6.1e+22], N[(a * N[(-4.0 * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b / z), $MachinePrecision] / c$95$m), $MachinePrecision]]]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -1.4 \cdot 10^{+120}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\

\mathbf{elif}\;b \leq -3.5 \cdot 10^{-54}:\\
\;\;\;\;x \cdot \frac{9 \cdot y}{c\_m \cdot z}\\

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

\mathbf{elif}\;b \leq 6.1 \cdot 10^{+22}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c\_m}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -1.4e120

    1. Initial program 85.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. Simplified87.3%

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

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

    if -1.4e120 < b < -3.49999999999999982e-54

    1. Initial program 77.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*81.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.49999999999999982e-54 < b < -7.19999999999999964e-250

    1. Initial program 72.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. Add Preprocessing
    3. Taylor expanded in z around inf 69.8%

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

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

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

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

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

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

    if -7.19999999999999964e-250 < b < 6.0999999999999998e22

    1. Initial program 87.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. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative87.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.0999999999999998e22 < b

    1. Initial program 80.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*80.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.4 \cdot 10^{+120}:\\ \;\;\;\;\frac{b}{c \cdot z}\\ \mathbf{elif}\;b \leq -3.5 \cdot 10^{-54}:\\ \;\;\;\;x \cdot \frac{9 \cdot y}{c \cdot z}\\ \mathbf{elif}\;b \leq -7.2 \cdot 10^{-250}:\\ \;\;\;\;\frac{t \cdot \left(a \cdot -4\right)}{c}\\ \mathbf{elif}\;b \leq 6.1 \cdot 10^{+22}:\\ \;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 49.0% 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])\\ \\ c\_s \cdot \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{+122}:\\ \;\;\;\;\frac{b}{c\_m \cdot z}\\ \mathbf{elif}\;b \leq -2.7 \cdot 10^{-55}:\\ \;\;\;\;9 \cdot \left(x \cdot \frac{y}{c\_m \cdot z}\right)\\ \mathbf{elif}\;b \leq -2.1 \cdot 10^{-248}:\\ \;\;\;\;\frac{t \cdot \left(a \cdot -4\right)}{c\_m}\\ \mathbf{elif}\;b \leq 2.75 \cdot 10^{+19}:\\ \;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c\_m}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b}{z}}{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.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (*
  c_s
  (if (<= b -1e+122)
    (/ b (* c_m z))
    (if (<= b -2.7e-55)
      (* 9.0 (* x (/ y (* c_m z))))
      (if (<= b -2.1e-248)
        (/ (* t (* a -4.0)) c_m)
        (if (<= b 2.75e+19) (* a (* -4.0 (/ t 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);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double tmp;
	if (b <= -1e+122) {
		tmp = b / (c_m * z);
	} else if (b <= -2.7e-55) {
		tmp = 9.0 * (x * (y / (c_m * z)));
	} else if (b <= -2.1e-248) {
		tmp = (t * (a * -4.0)) / c_m;
	} else if (b <= 2.75e+19) {
		tmp = a * (-4.0 * (t / 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.
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 (b <= (-1d+122)) then
        tmp = b / (c_m * z)
    else if (b <= (-2.7d-55)) then
        tmp = 9.0d0 * (x * (y / (c_m * z)))
    else if (b <= (-2.1d-248)) then
        tmp = (t * (a * (-4.0d0))) / c_m
    else if (b <= 2.75d+19) then
        tmp = a * ((-4.0d0) * (t / 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;
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 (b <= -1e+122) {
		tmp = b / (c_m * z);
	} else if (b <= -2.7e-55) {
		tmp = 9.0 * (x * (y / (c_m * z)));
	} else if (b <= -2.1e-248) {
		tmp = (t * (a * -4.0)) / c_m;
	} else if (b <= 2.75e+19) {
		tmp = a * (-4.0 * (t / 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])
def code(c_s, x, y, z, t, a, b, c_m):
	tmp = 0
	if b <= -1e+122:
		tmp = b / (c_m * z)
	elif b <= -2.7e-55:
		tmp = 9.0 * (x * (y / (c_m * z)))
	elif b <= -2.1e-248:
		tmp = (t * (a * -4.0)) / c_m
	elif b <= 2.75e+19:
		tmp = a * (-4.0 * (t / 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])
function code(c_s, x, y, z, t, a, b, c_m)
	tmp = 0.0
	if (b <= -1e+122)
		tmp = Float64(b / Float64(c_m * z));
	elseif (b <= -2.7e-55)
		tmp = Float64(9.0 * Float64(x * Float64(y / Float64(c_m * z))));
	elseif (b <= -2.1e-248)
		tmp = Float64(Float64(t * Float64(a * -4.0)) / c_m);
	elseif (b <= 2.75e+19)
		tmp = Float64(a * Float64(-4.0 * Float64(t / c_m)));
	else
		tmp = Float64(Float64(b / z) / c_m);
	end
	return Float64(c_s * tmp)
end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
	tmp = 0.0;
	if (b <= -1e+122)
		tmp = b / (c_m * z);
	elseif (b <= -2.7e-55)
		tmp = 9.0 * (x * (y / (c_m * z)));
	elseif (b <= -2.1e-248)
		tmp = (t * (a * -4.0)) / c_m;
	elseif (b <= 2.75e+19)
		tmp = a * (-4.0 * (t / 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.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[b, -1e+122], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2.7e-55], N[(9.0 * N[(x * N[(y / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2.1e-248], N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[b, 2.75e+19], N[(a * N[(-4.0 * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b / z), $MachinePrecision] / c$95$m), $MachinePrecision]]]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{+122}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\

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

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

\mathbf{elif}\;b \leq 2.75 \cdot 10^{+19}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c\_m}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -1.00000000000000001e122

    1. Initial program 85.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. Simplified87.3%

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

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

    if -1.00000000000000001e122 < b < -2.70000000000000004e-55

    1. Initial program 77.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. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative77.6%

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

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

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

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

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

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

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

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

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

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

    if -2.70000000000000004e-55 < b < -2.1e-248

    1. Initial program 72.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. Add Preprocessing
    3. Taylor expanded in z around inf 69.8%

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

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

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

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

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

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

    if -2.1e-248 < b < 2.75e19

    1. Initial program 87.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. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative87.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.75e19 < b

    1. Initial program 80.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*80.5%

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

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

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

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

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

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

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

Alternative 13: 83.0% accurate, 0.8× speedup?

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

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


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

    1. Initial program 83.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. Add Preprocessing

    if 8.0000000000000001e-119 < c

    1. Initial program 78.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. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative78.8%

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

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

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

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

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

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

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

Alternative 14: 50.1% 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])\\ \\ c\_s \cdot \begin{array}{l} \mathbf{if}\;b \leq -5500000000000:\\ \;\;\;\;\frac{\frac{b}{c\_m}}{z}\\ \mathbf{elif}\;b \leq -8.5 \cdot 10^{-51}:\\ \;\;\;\;y \cdot \left(9 \cdot \frac{\frac{x}{z}}{c\_m}\right)\\ \mathbf{elif}\;b \leq 8 \cdot 10^{+21}:\\ \;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c\_m}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b}{z}}{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.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (*
  c_s
  (if (<= b -5500000000000.0)
    (/ (/ b c_m) z)
    (if (<= b -8.5e-51)
      (* y (* 9.0 (/ (/ x z) c_m)))
      (if (<= b 8e+21) (* a (* -4.0 (/ t 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);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double tmp;
	if (b <= -5500000000000.0) {
		tmp = (b / c_m) / z;
	} else if (b <= -8.5e-51) {
		tmp = y * (9.0 * ((x / z) / c_m));
	} else if (b <= 8e+21) {
		tmp = a * (-4.0 * (t / 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.
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 (b <= (-5500000000000.0d0)) then
        tmp = (b / c_m) / z
    else if (b <= (-8.5d-51)) then
        tmp = y * (9.0d0 * ((x / z) / c_m))
    else if (b <= 8d+21) then
        tmp = a * ((-4.0d0) * (t / 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;
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 (b <= -5500000000000.0) {
		tmp = (b / c_m) / z;
	} else if (b <= -8.5e-51) {
		tmp = y * (9.0 * ((x / z) / c_m));
	} else if (b <= 8e+21) {
		tmp = a * (-4.0 * (t / 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])
def code(c_s, x, y, z, t, a, b, c_m):
	tmp = 0
	if b <= -5500000000000.0:
		tmp = (b / c_m) / z
	elif b <= -8.5e-51:
		tmp = y * (9.0 * ((x / z) / c_m))
	elif b <= 8e+21:
		tmp = a * (-4.0 * (t / 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])
function code(c_s, x, y, z, t, a, b, c_m)
	tmp = 0.0
	if (b <= -5500000000000.0)
		tmp = Float64(Float64(b / c_m) / z);
	elseif (b <= -8.5e-51)
		tmp = Float64(y * Float64(9.0 * Float64(Float64(x / z) / c_m)));
	elseif (b <= 8e+21)
		tmp = Float64(a * Float64(-4.0 * Float64(t / c_m)));
	else
		tmp = Float64(Float64(b / z) / c_m);
	end
	return Float64(c_s * tmp)
end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
	tmp = 0.0;
	if (b <= -5500000000000.0)
		tmp = (b / c_m) / z;
	elseif (b <= -8.5e-51)
		tmp = y * (9.0 * ((x / z) / c_m));
	elseif (b <= 8e+21)
		tmp = a * (-4.0 * (t / 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.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[b, -5500000000000.0], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, -8.5e-51], N[(y * N[(9.0 * N[(N[(x / z), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8e+21], N[(a * N[(-4.0 * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b / z), $MachinePrecision] / c$95$m), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -5500000000000:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\

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

\mathbf{elif}\;b \leq 8 \cdot 10^{+21}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c\_m}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -5.5e12

    1. Initial program 82.5%

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

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

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

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

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

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

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

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

    if -5.5e12 < b < -8.50000000000000036e-51

    1. Initial program 81.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. Add Preprocessing
    3. Taylor expanded in b around 0 73.8%

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

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

      \[\leadsto y \cdot \color{blue}{\left(9 \cdot \frac{x}{c \cdot z}\right)} \]
    6. Step-by-step derivation
      1. associate-/l/51.5%

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

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

    if -8.50000000000000036e-51 < b < 8e21

    1. Initial program 82.3%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative82.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8e21 < b

    1. Initial program 80.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*80.5%

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

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

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.60000000000000017e103 or 9.6000000000000007e-52 < t

    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. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative77.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.60000000000000017e103 < t < 9.6000000000000007e-52

    1. Initial program 85.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. Add Preprocessing
    3. Taylor expanded in x around inf 70.1%

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

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

Alternative 16: 49.5% 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])\\ \\ c\_s \cdot \begin{array}{l} \mathbf{if}\;b \leq -5.5 \cdot 10^{+127}:\\ \;\;\;\;\frac{b}{c\_m \cdot z}\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{+23}:\\ \;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c\_m}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b}{z}}{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.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (*
  c_s
  (if (<= b -5.5e+127)
    (/ b (* c_m z))
    (if (<= b 7.8e+23) (* a (* -4.0 (/ t 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);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double tmp;
	if (b <= -5.5e+127) {
		tmp = b / (c_m * z);
	} else if (b <= 7.8e+23) {
		tmp = a * (-4.0 * (t / 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.
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 (b <= (-5.5d+127)) then
        tmp = b / (c_m * z)
    else if (b <= 7.8d+23) then
        tmp = a * ((-4.0d0) * (t / 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;
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 (b <= -5.5e+127) {
		tmp = b / (c_m * z);
	} else if (b <= 7.8e+23) {
		tmp = a * (-4.0 * (t / 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])
def code(c_s, x, y, z, t, a, b, c_m):
	tmp = 0
	if b <= -5.5e+127:
		tmp = b / (c_m * z)
	elif b <= 7.8e+23:
		tmp = a * (-4.0 * (t / 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])
function code(c_s, x, y, z, t, a, b, c_m)
	tmp = 0.0
	if (b <= -5.5e+127)
		tmp = Float64(b / Float64(c_m * z));
	elseif (b <= 7.8e+23)
		tmp = Float64(a * Float64(-4.0 * Float64(t / c_m)));
	else
		tmp = Float64(Float64(b / z) / c_m);
	end
	return Float64(c_s * tmp)
end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
	tmp = 0.0;
	if (b <= -5.5e+127)
		tmp = b / (c_m * z);
	elseif (b <= 7.8e+23)
		tmp = a * (-4.0 * (t / 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.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[b, -5.5e+127], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.8e+23], N[(a * N[(-4.0 * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b / z), $MachinePrecision] / c$95$m), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -5.5 \cdot 10^{+127}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\

\mathbf{elif}\;b \leq 7.8 \cdot 10^{+23}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c\_m}\right)\\

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


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

    1. Initial program 84.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. Simplified86.5%

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

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

    if -5.50000000000000041e127 < b < 7.8000000000000001e23

    1. Initial program 81.8%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative81.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.8000000000000001e23 < b

    1. Initial program 80.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*80.5%

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{\color{blue}{b}}{z \cdot c} \]
  5. Final simplification34.9%

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

Developer target: 80.3% 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 2024097 
(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)))