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

Percentage Accurate: 80.2% → 94.0%
Time: 14.1s
Alternatives: 13
Speedup: 0.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

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

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


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

    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. Simplified85.1%

      \[\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. Step-by-step derivation
      1. associate-/r*88.0%

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

        \[\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 \frac{1}{c}} \]
      3. +-commutative88.0%

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

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

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

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

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

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

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

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

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

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

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

    if 1.3e5 < c

    1. Initial program 65.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. Simplified63.9%

      \[\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. Step-by-step derivation
      1. associate-/r*62.9%

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

        \[\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 \frac{1}{c}} \]
      3. +-commutative62.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c} + -1 \cdot \frac{-9 \cdot \frac{x \cdot y}{c} + -1 \cdot \frac{b}{c}}{z}} \]
    9. Step-by-step derivation
      1. mul-1-neg81.2%

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

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c} - \frac{-9 \cdot \frac{x \cdot y}{c} + -1 \cdot \frac{b}{c}}{z}} \]
      3. associate-*r/81.2%

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

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

        \[\leadsto \color{blue}{\frac{-4 \cdot a}{c} \cdot t} - \frac{-9 \cdot \frac{x \cdot y}{c} + -1 \cdot \frac{b}{c}}{z} \]
      6. associate-*r/84.8%

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

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

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

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

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

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

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

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

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

Alternative 2: 88.9% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 74.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. Simplified67.9%

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

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

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

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

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

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

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

    if -inf.0 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 5.0000000000000003e288

    1. Initial program 82.6%

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

      \[\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. Step-by-step derivation
      1. associate-/r*86.3%

        \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(x, 9 \cdot y, z \cdot \left(a \cdot \left(t \cdot -4\right)\right)\right) + b}{z}}{c}} \]
      2. div-inv86.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 \frac{1}{c}} \]
      3. +-commutative86.3%

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

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

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

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

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

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

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

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

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

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

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

    if 5.0000000000000003e288 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 49.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. Simplified49.4%

      \[\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. Step-by-step derivation
      1. associate-/r*50.0%

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

        \[\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 \frac{1}{c}} \]
      3. +-commutative50.0%

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

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

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

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

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

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

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

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

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

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

Alternative 3: 50.3% accurate, 0.7× speedup?

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

\mathbf{elif}\;z \leq -1.02 \cdot 10^{-227}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 6.2 \cdot 10^{-151}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\

\mathbf{elif}\;z \leq 0.0017:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.4e7

    1. Initial program 67.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. Simplified77.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 z around inf 53.6%

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

    if -2.4e7 < z < -1.02e-227 or 6.19999999999999969e-151 < z < 0.00169999999999999991

    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. Simplified86.2%

      \[\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 x around inf 52.8%

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

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

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

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

    if -1.02e-227 < z < 6.19999999999999969e-151

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

      \[\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. Step-by-step derivation
      1. associate-/r*82.1%

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

        \[\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 \frac{1}{c}} \]
      3. +-commutative82.1%

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

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

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

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

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

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

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

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

    if 0.00169999999999999991 < z

    1. Initial program 59.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. Simplified63.2%

      \[\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. Step-by-step derivation
      1. associate-/r*76.9%

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

        \[\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 \frac{1}{c}} \]
      3. +-commutative76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 94.1% accurate, 0.7× speedup?

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

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


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

    1. Initial program 83.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. Simplified85.2%

      \[\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. Step-by-step derivation
      1. associate-/r*88.1%

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

        \[\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 \frac{1}{c}} \]
      3. +-commutative88.1%

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

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

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

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

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

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

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

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

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

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

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

    if 4e6 < c

    1. Initial program 64.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. Simplified63.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. Step-by-step derivation
      1. associate-/r*62.3%

        \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(x, 9 \cdot y, z \cdot \left(a \cdot \left(t \cdot -4\right)\right)\right) + b}{z}}{c}} \]
      2. div-inv62.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 \frac{1}{c}} \]
      3. +-commutative62.3%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c} + -1 \cdot \frac{-9 \cdot \frac{x \cdot y}{c} + -1 \cdot \frac{b}{c}}{z}} \]
    8. Step-by-step derivation
      1. mul-1-neg80.9%

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

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

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

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

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

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

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

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

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

Alternative 5: 72.3% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -6.9999999999999994e-95

    1. Initial program 83.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. Simplified83.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. Step-by-step derivation
      1. associate-/r*78.7%

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

        \[\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 \frac{1}{c}} \]
      3. +-commutative78.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.9999999999999994e-95 < b < 1.99999999999999996e-12

    1. Initial program 74.1%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Simplified77.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. Step-by-step derivation
      1. associate-/r*87.4%

        \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(x, 9 \cdot y, z \cdot \left(a \cdot \left(t \cdot -4\right)\right)\right) + b}{z}}{c}} \]
      2. div-inv87.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 \frac{1}{c}} \]
      3. +-commutative87.3%

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

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

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

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

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

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

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

    if 1.99999999999999996e-12 < b

    1. Initial program 82.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 67.6% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.6e114

    1. Initial program 74.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. Simplified68.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 z around inf 58.9%

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

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

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

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

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

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

    if -1.6e114 < t < 9.5000000000000001e-98

    1. Initial program 83.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. Simplified84.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 z around 0 75.6%

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

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

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

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

    if 9.5000000000000001e-98 < t

    1. Initial program 74.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. Simplified77.8%

      \[\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. Step-by-step derivation
      1. associate-/r*83.1%

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

        \[\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 \frac{1}{c}} \]
      3. +-commutative83.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 67.8% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -7.00000000000000033e118

    1. Initial program 74.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. Simplified68.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 z around inf 58.9%

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

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

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

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

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

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

    if -7.00000000000000033e118 < t < 8.6e-97

    1. Initial program 83.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. Simplified84.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 z around 0 75.6%

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

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

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

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

    if 8.6e-97 < t

    1. Initial program 74.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 50.3% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;t \leq 5.5 \cdot 10^{-86}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -6.19999999999999973e118

    1. Initial program 74.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. Simplified68.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 z around inf 58.9%

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

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

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

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

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

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

    if -6.19999999999999973e118 < t < -1.1499999999999999e-71

    1. Initial program 77.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. Simplified79.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 x around inf 46.8%

      \[\leadsto \color{blue}{9 \cdot \frac{x \cdot y}{c \cdot z}} \]
    5. Step-by-step derivation
      1. times-frac48.5%

        \[\leadsto 9 \cdot \color{blue}{\left(\frac{x}{c} \cdot \frac{y}{z}\right)} \]
    6. Applied egg-rr48.5%

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

    if -1.1499999999999999e-71 < t < 5.5e-86

    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. Simplified86.1%

      \[\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. Step-by-step derivation
      1. associate-/r*87.3%

        \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(x, 9 \cdot y, z \cdot \left(a \cdot \left(t \cdot -4\right)\right)\right) + b}{z}}{c}} \]
      2. div-inv87.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 \frac{1}{c}} \]
      3. +-commutative87.3%

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

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

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

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

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

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

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

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

    if 5.5e-86 < t

    1. Initial program 74.9%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Simplified78.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. Step-by-step derivation
      1. associate-/r*82.7%

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

        \[\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 \frac{1}{c}} \]
      3. +-commutative82.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 68.3% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.90000000000000006e115

    1. Initial program 74.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. Simplified68.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 z around inf 58.9%

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

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

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

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

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

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

    if -3.90000000000000006e115 < t < 2.6999999999999999e-84

    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. Simplified84.1%

      \[\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 z around 0 75.3%

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

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

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

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

    if 2.6999999999999999e-84 < t

    1. Initial program 74.9%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Simplified78.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. Step-by-step derivation
      1. associate-/r*82.7%

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

        \[\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 \frac{1}{c}} \]
      3. +-commutative82.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 50.8% accurate, 1.1× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.2000000000000001e-82 or 2.20000000000000016e56 < a

    1. Initial program 76.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. Simplified73.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. Step-by-step derivation
      1. associate-/r*77.2%

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

        \[\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 \frac{1}{c}} \]
      3. +-commutative77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.2000000000000001e-82 < a < 2.20000000000000016e56

    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. Simplified88.0%

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

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

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

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

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

Alternative 11: 50.8% accurate, 1.1× speedup?

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

\mathbf{elif}\;a \leq 1.1 \cdot 10^{+56}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.99999999999999995e-83

    1. Initial program 71.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. Simplified70.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 z around inf 45.9%

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

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

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

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

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

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

    if -8.99999999999999995e-83 < a < 1.10000000000000008e56

    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. Simplified88.0%

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

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

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

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

    if 1.10000000000000008e56 < a

    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. Simplified80.0%

      \[\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. Step-by-step derivation
      1. associate-/r*72.7%

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

        \[\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 \frac{1}{c}} \]
      3. +-commutative72.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 35.1% accurate, 3.8× speedup?

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

    \[\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. Step-by-step derivation
    1. associate-/r*81.9%

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

      \[\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 \frac{1}{c}} \]
    3. +-commutative81.9%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{b}{c}}{z}} \]
  8. Simplified38.1%

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

Alternative 13: 35.5% accurate, 3.8× speedup?

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

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

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

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

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

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

Developer Target 1: 80.8% 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 2024170 
(FPCore (x y z t a b c)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, J"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) -220031348160821/200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 0) (/ (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 365902434742109/31250000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 28768236795461370000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (+ (* (* 9 (/ y c)) (/ x z)) (/ b (* c z))) (* 4 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 138385150424563190000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (- (+ (* 9 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4 (/ (* a t) c)))))))))

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