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

Percentage Accurate: 79.2% → 91.3%
Time: 15.7s
Alternatives: 18
Speedup: 1.1×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 79.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: 91.3% accurate, 0.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+189} \lor \neg \left(z \leq 1.1 \cdot 10^{-7}\right):\\ \;\;\;\;\frac{\mathsf{fma}\left(9, x \cdot \frac{y}{z}, \frac{b}{z} + t \cdot \left(a \cdot -4\right)\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (if (or (<= z -3.6e+189) (not (<= z 1.1e-7)))
   (/ (fma 9.0 (* x (/ y z)) (+ (/ b z) (* t (* a -4.0)))) c)
   (/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if ((z <= -3.6e+189) || !(z <= 1.1e-7)) {
		tmp = fma(9.0, (x * (y / z)), ((b / z) + (t * (a * -4.0)))) / c;
	} else {
		tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
	}
	return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if ((z <= -3.6e+189) || !(z <= 1.1e-7))
		tmp = Float64(fma(9.0, Float64(x * Float64(y / z)), Float64(Float64(b / z) + Float64(t * Float64(a * -4.0)))) / c);
	else
		tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c));
	end
	return tmp
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -3.6e+189], N[Not[LessEqual[z, 1.1e-7]], $MachinePrecision]], N[(N[(9.0 * N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(N[(b / z), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{+189} \lor \neg \left(z \leq 1.1 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{\mathsf{fma}\left(9, x \cdot \frac{y}{z}, \frac{b}{z} + t \cdot \left(a \cdot -4\right)\right)}{c}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.60000000000000008e189 or 1.1000000000000001e-7 < z

    1. Initial program 62.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.60000000000000008e189 < z < 1.1000000000000001e-7

    1. Initial program 97.2%

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

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

Alternative 2: 91.4% accurate, 0.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{+41} \lor \neg \left(z \leq 1.1 \cdot 10^{-59}\right):\\ \;\;\;\;\frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{z} - 4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{b + \mathsf{fma}\left(x, 9 \cdot y, t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right)}{z \cdot c}\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (if (or (<= z -5e+41) (not (<= z 1.1e-59)))
   (/ (- (/ (+ b (* 9.0 (* x y))) z) (* 4.0 (* t a))) c)
   (/ (+ b (fma x (* 9.0 y) (* t (* a (* z -4.0))))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if ((z <= -5e+41) || !(z <= 1.1e-59)) {
		tmp = (((b + (9.0 * (x * y))) / z) - (4.0 * (t * a))) / c;
	} else {
		tmp = (b + fma(x, (9.0 * y), (t * (a * (z * -4.0))))) / (z * c);
	}
	return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if ((z <= -5e+41) || !(z <= 1.1e-59))
		tmp = Float64(Float64(Float64(Float64(b + Float64(9.0 * Float64(x * y))) / z) - Float64(4.0 * Float64(t * a))) / c);
	else
		tmp = Float64(Float64(b + fma(x, Float64(9.0 * y), Float64(t * Float64(a * Float64(z * -4.0))))) / Float64(z * c));
	end
	return tmp
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -5e+41], N[Not[LessEqual[z, 1.1e-59]], $MachinePrecision]], N[(N[(N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision] + N[(t * N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+41} \lor \neg \left(z \leq 1.1 \cdot 10^{-59}\right):\\
\;\;\;\;\frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{z} - 4 \cdot \left(t \cdot a\right)}{c}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.00000000000000022e41 or 1.0999999999999999e-59 < z

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.00000000000000022e41 < z < 1.0999999999999999e-59

    1. Initial program 98.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. Simplified98.2%

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

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

Alternative 3: 48.1% accurate, 0.5× speedup?

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

\mathbf{elif}\;x \leq -1.05 \cdot 10^{-10}:\\
\;\;\;\;-4 \cdot \frac{1}{\frac{\frac{c}{a}}{t}}\\

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

\mathbf{elif}\;x \leq -2 \cdot 10^{-216}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq 3 \cdot 10^{-257}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 3.6 \cdot 10^{-88}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.1e32 or 3.5999999999999999e-88 < x

    1. Initial program 79.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.1e32 < x < -1.05e-10

    1. Initial program 73.1%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}{z \cdot c} \]
      9. associate-*l*73.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} \]
      10. *-commutative73.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. Simplified73.1%

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

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

        \[\leadsto -4 \cdot \color{blue}{\frac{1}{\frac{c}{a \cdot t}}} \]
      2. inv-pow40.2%

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

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

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

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

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

    if -1.05e-10 < x < -5.79999999999999945e-51 or -2.0000000000000001e-216 < x < 2.9999999999999999e-257

    1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.79999999999999945e-51 < x < -2.0000000000000001e-216 or 2.9999999999999999e-257 < x < 3.5999999999999999e-88

    1. Initial program 84.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.1 \cdot 10^{+32}:\\ \;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\ \mathbf{elif}\;x \leq -1.05 \cdot 10^{-10}:\\ \;\;\;\;-4 \cdot \frac{1}{\frac{\frac{c}{a}}{t}}\\ \mathbf{elif}\;x \leq -5.8 \cdot 10^{-51}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;x \leq -2 \cdot 10^{-216}:\\ \;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\ \mathbf{elif}\;x \leq 3 \cdot 10^{-257}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;x \leq 3.6 \cdot 10^{-88}:\\ \;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\ \mathbf{else}:\\ \;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 66.6% accurate, 0.6× speedup?

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

\mathbf{elif}\;t \leq -1.05 \cdot 10^{+174} \lor \neg \left(t \leq -3.2 \cdot 10^{+99}\right) \land t \leq 2.8 \cdot 10^{+37}:\\
\;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c}\\

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


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

    1. Initial program 23.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.39999999999999997e217 < t < -1.05000000000000008e174 or -3.19999999999999999e99 < t < 2.7999999999999998e37

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.05000000000000008e174 < t < -3.19999999999999999e99 or 2.7999999999999998e37 < t

    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. +-commutative82.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.4 \cdot 10^{+217}:\\ \;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\ \mathbf{elif}\;t \leq -1.05 \cdot 10^{+174} \lor \neg \left(t \leq -3.2 \cdot 10^{+99}\right) \land t \leq 2.8 \cdot 10^{+37}:\\ \;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 89.4% accurate, 0.7× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.2000000000000001e115 or 3.6999999999999999e-59 < z

    1. Initial program 67.3%

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

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

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

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

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

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

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

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

        \[\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} \]
      9. associate-*l*67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.2000000000000001e115 < z < 3.6999999999999999e-59

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 91.4% accurate, 0.7× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.2000000000000001e41 or 2.90000000000000016e-59 < z

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.2000000000000001e41 < z < 2.90000000000000016e-59

    1. Initial program 98.2%

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

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

Alternative 7: 45.3% accurate, 0.7× speedup?

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

\mathbf{elif}\;y \leq 6.5 \cdot 10^{-155}:\\
\;\;\;\;\frac{b}{z \cdot c}\\

\mathbf{elif}\;y \leq 4.7 \cdot 10^{+92}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -5.6999999999999998e-182

    1. Initial program 86.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.6999999999999998e-182 < y < 6.5e-155

    1. Initial program 89.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.5e-155 < y < 4.7e92

    1. Initial program 73.7%

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

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

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

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

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

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

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

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

        \[\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} \]
      9. associate-*l*74.0%

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

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

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

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

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

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

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

    if 4.7e92 < y

    1. Initial program 80.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\left(x \cdot \frac{9}{z}\right) \cdot y}{c}} \]
    10. Step-by-step derivation
      1. clear-num53.1%

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

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

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

      \[\leadsto \color{blue}{{\left(\frac{c}{x \cdot \left(\frac{9}{z} \cdot y\right)}\right)}^{-1}} \]
    12. Step-by-step derivation
      1. unpow-153.2%

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

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

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

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

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

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

Alternative 8: 75.1% accurate, 0.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -7.9999999999999997e35 or 3.5999999999999999e-88 < x

    1. Initial program 78.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.9999999999999997e35 < x < 3.5999999999999999e-88

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 47.6% accurate, 0.8× speedup?

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

\mathbf{elif}\;y \leq 1.48 \cdot 10^{-152}:\\
\;\;\;\;\frac{b}{z \cdot c}\\

\mathbf{elif}\;y \leq 2.15 \cdot 10^{+95}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.60000000000000065e-126 or 2.15e95 < y

    1. Initial program 84.1%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}{z \cdot c} \]
      9. associate-*l*82.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} \]
      10. *-commutative82.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. Simplified82.1%

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

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

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

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

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

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

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

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

    if -8.60000000000000065e-126 < y < 1.4800000000000001e-152

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.4800000000000001e-152 < y < 2.15e95

    1. Initial program 73.7%

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

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

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

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

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

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

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

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

        \[\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} \]
      9. associate-*l*74.0%

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

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

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

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

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

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

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

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

Alternative 10: 47.1% accurate, 0.8× speedup?

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

\mathbf{elif}\;y \leq 5.7 \cdot 10^{-161}:\\
\;\;\;\;\frac{b}{z \cdot c}\\

\mathbf{elif}\;y \leq 5.5 \cdot 10^{+92}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -8.49999999999999938e-126

    1. Initial program 86.4%

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
      8. associate-*l*81.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} \]
      9. associate-*l*83.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} \]
      10. *-commutative83.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. Simplified83.1%

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

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

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

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

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

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

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

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

    if -8.49999999999999938e-126 < y < 5.70000000000000022e-161

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.70000000000000022e-161 < y < 5.50000000000000053e92

    1. Initial program 73.7%

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

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

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

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

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

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

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

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

        \[\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} \]
      9. associate-*l*74.0%

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

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

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

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

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

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

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

    if 5.50000000000000053e92 < y

    1. Initial program 80.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 45.4% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq 2.2 \cdot 10^{+94}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.64999999999999997e-179

    1. Initial program 86.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\left(x \cdot \frac{9}{z}\right) \cdot y}{c}} \]
    10. Taylor expanded in x around 0 46.6%

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

    if -2.64999999999999997e-179 < y < 2.1e-161

    1. Initial program 89.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.1e-161 < y < 2.20000000000000012e94

    1. Initial program 73.7%

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

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

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

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

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

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

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

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

        \[\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} \]
      9. associate-*l*74.0%

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

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

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

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

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

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

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

    if 2.20000000000000012e94 < y

    1. Initial program 80.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 45.3% accurate, 0.8× speedup?

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

\mathbf{elif}\;y \leq 3.7 \cdot 10^{-157}:\\
\;\;\;\;\frac{b}{z \cdot c}\\

\mathbf{elif}\;y \leq 1.04 \cdot 10^{+93}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.8000000000000001e-179

    1. Initial program 86.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.8000000000000001e-179 < y < 3.6999999999999998e-157

    1. Initial program 89.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.6999999999999998e-157 < y < 1.04e93

    1. Initial program 73.7%

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

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

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

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

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

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

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

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

        \[\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} \]
      9. associate-*l*74.0%

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

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

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

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

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

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

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

    if 1.04e93 < y

    1. Initial program 80.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 68.8% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.20000000000000004e44 < x < 2.7e18

    1. Initial program 87.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.7e18 < x

    1. Initial program 75.0%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}{z \cdot c} \]
      9. associate-*l*76.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} \]
      10. *-commutative76.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. Simplified76.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 48.9% accurate, 1.1× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.40000000000000006e-79 or 3.7999999999999999e46 < b

    1. Initial program 88.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.40000000000000006e-79 < b < 3.7999999999999999e46

    1. Initial program 77.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 49.3% accurate, 1.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} \mathbf{if}\;b \leq -2.4 \cdot 10^{-79} \lor \neg \left(b \leq 3.9 \cdot 10^{+46}\right):\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c}\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (if (or (<= b -2.4e-79) (not (<= b 3.9e+46)))
   (/ b (* z c))
   (* t (* -4.0 (/ a c)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if ((b <= -2.4e-79) || !(b <= 3.9e+46)) {
		tmp = b / (z * c);
	} else {
		tmp = t * (-4.0 * (a / c));
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if ((b <= (-2.4d-79)) .or. (.not. (b <= 3.9d+46))) then
        tmp = b / (z * c)
    else
        tmp = t * ((-4.0d0) * (a / c))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if ((b <= -2.4e-79) || !(b <= 3.9e+46)) {
		tmp = b / (z * c);
	} else {
		tmp = t * (-4.0 * (a / c));
	}
	return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
def code(x, y, z, t, a, b, c):
	tmp = 0
	if (b <= -2.4e-79) or not (b <= 3.9e+46):
		tmp = b / (z * c)
	else:
		tmp = t * (-4.0 * (a / c))
	return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if ((b <= -2.4e-79) || !(b <= 3.9e+46))
		tmp = Float64(b / Float64(z * c));
	else
		tmp = Float64(t * Float64(-4.0 * Float64(a / c)));
	end
	return tmp
end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
	tmp = 0.0;
	if ((b <= -2.4e-79) || ~((b <= 3.9e+46)))
		tmp = b / (z * c);
	else
		tmp = t * (-4.0 * (a / c));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -2.4e-79], N[Not[LessEqual[b, 3.9e+46]], $MachinePrecision]], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(t * N[(-4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.4 \cdot 10^{-79} \lor \neg \left(b \leq 3.9 \cdot 10^{+46}\right):\\
\;\;\;\;\frac{b}{z \cdot c}\\

\mathbf{else}:\\
\;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.40000000000000006e-79 or 3.89999999999999995e46 < b

    1. Initial program 88.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. +-commutative88.4%

        \[\leadsto \frac{\color{blue}{b + \left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)}}{z \cdot c} \]
      2. associate-+r-88.4%

        \[\leadsto \frac{\color{blue}{\left(b + \left(x \cdot 9\right) \cdot y\right) - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}}{z \cdot c} \]
      3. *-commutative88.4%

        \[\leadsto \frac{\left(b + \left(x \cdot 9\right) \cdot y\right) - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}}{z \cdot c} \]
      4. associate-*r*85.6%

        \[\leadsto \frac{\left(b + \left(x \cdot 9\right) \cdot y\right) - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t}}{z \cdot c} \]
      5. *-commutative85.6%

        \[\leadsto \frac{\left(b + \left(x \cdot 9\right) \cdot y\right) - \color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t}{z \cdot c} \]
      6. associate-+r-85.6%

        \[\leadsto \frac{\color{blue}{b + \left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right)}}{z \cdot c} \]
      7. +-commutative85.6%

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
      8. associate-*l*85.6%

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}{z \cdot c} \]
      9. associate-*l*87.0%

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{\left(z \cdot 4\right) \cdot \left(a \cdot t\right)}\right) + b}{z \cdot c} \]
      10. *-commutative87.0%

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified87.0%

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 53.4%

      \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
    6. Step-by-step derivation
      1. *-commutative53.4%

        \[\leadsto \frac{b}{\color{blue}{z \cdot c}} \]
    7. Simplified53.4%

      \[\leadsto \color{blue}{\frac{b}{z \cdot c}} \]

    if -2.40000000000000006e-79 < b < 3.89999999999999995e46

    1. Initial program 77.7%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. +-commutative77.7%

        \[\leadsto \frac{\color{blue}{b + \left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)}}{z \cdot c} \]
      2. associate-+r-77.7%

        \[\leadsto \frac{\color{blue}{\left(b + \left(x \cdot 9\right) \cdot y\right) - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}}{z \cdot c} \]
      3. *-commutative77.7%

        \[\leadsto \frac{\left(b + \left(x \cdot 9\right) \cdot y\right) - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}}{z \cdot c} \]
      4. associate-*r*76.2%

        \[\leadsto \frac{\left(b + \left(x \cdot 9\right) \cdot y\right) - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t}}{z \cdot c} \]
      5. *-commutative76.2%

        \[\leadsto \frac{\left(b + \left(x \cdot 9\right) \cdot y\right) - \color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t}{z \cdot c} \]
      6. associate-+r-76.2%

        \[\leadsto \frac{\color{blue}{b + \left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right)}}{z \cdot c} \]
      7. +-commutative76.2%

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
      8. associate-*l*75.4%

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}{z \cdot c} \]
      9. associate-*l*76.3%

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{\left(z \cdot 4\right) \cdot \left(a \cdot t\right)}\right) + b}{z \cdot c} \]
      10. *-commutative76.3%

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified76.3%

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-+l-76.3%

        \[\leadsto \frac{\color{blue}{x \cdot \left(9 \cdot y\right) - \left(\left(z \cdot 4\right) \cdot \left(t \cdot a\right) - b\right)}}{z \cdot c} \]
      2. div-sub71.1%

        \[\leadsto \color{blue}{\frac{x \cdot \left(9 \cdot y\right)}{z \cdot c} - \frac{\left(z \cdot 4\right) \cdot \left(t \cdot a\right) - b}{z \cdot c}} \]
      3. associate-*r*71.9%

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y}}{z \cdot c} - \frac{\left(z \cdot 4\right) \cdot \left(t \cdot a\right) - b}{z \cdot c} \]
      4. *-commutative71.9%

        \[\leadsto \frac{\color{blue}{\left(9 \cdot x\right)} \cdot y}{z \cdot c} - \frac{\left(z \cdot 4\right) \cdot \left(t \cdot a\right) - b}{z \cdot c} \]
      5. associate-*l*71.9%

        \[\leadsto \frac{\color{blue}{9 \cdot \left(x \cdot y\right)}}{z \cdot c} - \frac{\left(z \cdot 4\right) \cdot \left(t \cdot a\right) - b}{z \cdot c} \]
      6. *-commutative71.9%

        \[\leadsto \frac{9 \cdot \left(x \cdot y\right)}{z \cdot c} - \frac{\color{blue}{\left(4 \cdot z\right)} \cdot \left(t \cdot a\right) - b}{z \cdot c} \]
      7. associate-*l*71.9%

        \[\leadsto \frac{9 \cdot \left(x \cdot y\right)}{z \cdot c} - \frac{\color{blue}{4 \cdot \left(z \cdot \left(t \cdot a\right)\right)} - b}{z \cdot c} \]
    6. Applied egg-rr71.9%

      \[\leadsto \color{blue}{\frac{9 \cdot \left(x \cdot y\right)}{z \cdot c} - \frac{4 \cdot \left(z \cdot \left(t \cdot a\right)\right) - b}{z \cdot c}} \]
    7. Taylor expanded in z around inf 48.6%

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    8. Step-by-step derivation
      1. associate-*r/48.6%

        \[\leadsto \color{blue}{\frac{-4 \cdot \left(a \cdot t\right)}{c}} \]
      2. *-commutative48.6%

        \[\leadsto \frac{\color{blue}{\left(a \cdot t\right) \cdot -4}}{c} \]
      3. *-commutative48.6%

        \[\leadsto \frac{\color{blue}{\left(t \cdot a\right)} \cdot -4}{c} \]
      4. associate-*r*47.8%

        \[\leadsto \frac{\color{blue}{t \cdot \left(a \cdot -4\right)}}{c} \]
      5. *-commutative47.8%

        \[\leadsto \frac{t \cdot \color{blue}{\left(-4 \cdot a\right)}}{c} \]
      6. associate-*r/48.3%

        \[\leadsto \color{blue}{t \cdot \frac{-4 \cdot a}{c}} \]
      7. associate-*r/48.2%

        \[\leadsto t \cdot \color{blue}{\left(-4 \cdot \frac{a}{c}\right)} \]
      8. *-commutative48.2%

        \[\leadsto t \cdot \color{blue}{\left(\frac{a}{c} \cdot -4\right)} \]
    9. Simplified48.2%

      \[\leadsto \color{blue}{t \cdot \left(\frac{a}{c} \cdot -4\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification51.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.4 \cdot 10^{-79} \lor \neg \left(b \leq 3.9 \cdot 10^{+46}\right):\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 49.2% accurate, 1.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-97}:\\ \;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\ \mathbf{elif}\;t \leq 2.95 \cdot 10^{-6}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c}\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (if (<= t -5e-97)
   (* -4.0 (* a (/ t c)))
   (if (<= t 2.95e-6) (/ b (* z c)) (* t (* -4.0 (/ a c))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if (t <= -5e-97) {
		tmp = -4.0 * (a * (t / c));
	} else if (t <= 2.95e-6) {
		tmp = b / (z * c);
	} else {
		tmp = t * (-4.0 * (a / c));
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (t <= (-5d-97)) then
        tmp = (-4.0d0) * (a * (t / c))
    else if (t <= 2.95d-6) then
        tmp = b / (z * c)
    else
        tmp = t * ((-4.0d0) * (a / c))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if (t <= -5e-97) {
		tmp = -4.0 * (a * (t / c));
	} else if (t <= 2.95e-6) {
		tmp = b / (z * c);
	} else {
		tmp = t * (-4.0 * (a / c));
	}
	return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
def code(x, y, z, t, a, b, c):
	tmp = 0
	if t <= -5e-97:
		tmp = -4.0 * (a * (t / c))
	elif t <= 2.95e-6:
		tmp = b / (z * c)
	else:
		tmp = t * (-4.0 * (a / c))
	return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if (t <= -5e-97)
		tmp = Float64(-4.0 * Float64(a * Float64(t / c)));
	elseif (t <= 2.95e-6)
		tmp = Float64(b / Float64(z * c));
	else
		tmp = Float64(t * Float64(-4.0 * Float64(a / c)));
	end
	return tmp
end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
	tmp = 0.0;
	if (t <= -5e-97)
		tmp = -4.0 * (a * (t / c));
	elseif (t <= 2.95e-6)
		tmp = b / (z * c);
	else
		tmp = t * (-4.0 * (a / c));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -5e-97], N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.95e-6], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(t * N[(-4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-97}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\

\mathbf{elif}\;t \leq 2.95 \cdot 10^{-6}:\\
\;\;\;\;\frac{b}{z \cdot c}\\

\mathbf{else}:\\
\;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.9999999999999995e-97

    1. Initial program 75.0%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. +-commutative75.0%

        \[\leadsto \frac{\color{blue}{b + \left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)}}{z \cdot c} \]
      2. associate-+r-75.0%

        \[\leadsto \frac{\color{blue}{\left(b + \left(x \cdot 9\right) \cdot y\right) - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}}{z \cdot c} \]
      3. *-commutative75.0%

        \[\leadsto \frac{\left(b + \left(x \cdot 9\right) \cdot y\right) - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}}{z \cdot c} \]
      4. associate-*r*76.6%

        \[\leadsto \frac{\left(b + \left(x \cdot 9\right) \cdot y\right) - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t}}{z \cdot c} \]
      5. *-commutative76.6%

        \[\leadsto \frac{\left(b + \left(x \cdot 9\right) \cdot y\right) - \color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t}{z \cdot c} \]
      6. associate-+r-76.6%

        \[\leadsto \frac{\color{blue}{b + \left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right)}}{z \cdot c} \]
      7. +-commutative76.6%

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
      8. associate-*l*75.2%

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}{z \cdot c} \]
      9. associate-*l*72.4%

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{\left(z \cdot 4\right) \cdot \left(a \cdot t\right)}\right) + b}{z \cdot c} \]
      10. *-commutative72.4%

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified72.4%

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 39.7%

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    6. Step-by-step derivation
      1. *-commutative39.7%

        \[\leadsto \color{blue}{\frac{a \cdot t}{c} \cdot -4} \]
      2. associate-/l*49.0%

        \[\leadsto \color{blue}{\left(a \cdot \frac{t}{c}\right)} \cdot -4 \]
    7. Simplified49.0%

      \[\leadsto \color{blue}{\left(a \cdot \frac{t}{c}\right) \cdot -4} \]

    if -4.9999999999999995e-97 < t < 2.95000000000000013e-6

    1. Initial program 87.2%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. +-commutative87.2%

        \[\leadsto \frac{\color{blue}{b + \left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)}}{z \cdot c} \]
      2. associate-+r-87.2%

        \[\leadsto \frac{\color{blue}{\left(b + \left(x \cdot 9\right) \cdot y\right) - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}}{z \cdot c} \]
      3. *-commutative87.2%

        \[\leadsto \frac{\left(b + \left(x \cdot 9\right) \cdot y\right) - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}}{z \cdot c} \]
      4. associate-*r*79.3%

        \[\leadsto \frac{\left(b + \left(x \cdot 9\right) \cdot y\right) - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t}}{z \cdot c} \]
      5. *-commutative79.3%

        \[\leadsto \frac{\left(b + \left(x \cdot 9\right) \cdot y\right) - \color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t}{z \cdot c} \]
      6. associate-+r-79.3%

        \[\leadsto \frac{\color{blue}{b + \left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right)}}{z \cdot c} \]
      7. +-commutative79.3%

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
      8. associate-*l*79.3%

        \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}{z \cdot c} \]
      9. associate-*l*86.3%

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{\left(z \cdot 4\right) \cdot \left(a \cdot t\right)}\right) + b}{z \cdot c} \]
      10. *-commutative86.3%

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified86.3%

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 42.4%

      \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
    6. Step-by-step derivation
      1. *-commutative42.4%

        \[\leadsto \frac{b}{\color{blue}{z \cdot c}} \]
    7. Simplified42.4%

      \[\leadsto \color{blue}{\frac{b}{z \cdot c}} \]

    if 2.95000000000000013e-6 < t

    1. Initial program 85.3%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. +-commutative85.3%

        \[\leadsto \frac{\color{blue}{b + \left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)}}{z \cdot c} \]
      2. associate-+r-85.3%

        \[\leadsto \frac{\color{blue}{\left(b + \left(x \cdot 9\right) \cdot y\right) - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}}{z \cdot c} \]
      3. *-commutative85.3%

        \[\leadsto \frac{\left(b + \left(x \cdot 9\right) \cdot y\right) - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}}{z \cdot c} \]
      4. associate-*r*87.7%

        \[\leadsto \frac{\left(b + \left(x \cdot 9\right) \cdot y\right) - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t}}{z \cdot c} \]
      5. *-commutative87.7%

        \[\leadsto \frac{\left(b + \left(x \cdot 9\right) \cdot y\right) - \color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t}{z \cdot c} \]
      6. associate-+r-87.7%

        \[\leadsto \frac{\color{blue}{b + \left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right)}}{z \cdot c} \]
      7. +-commutative87.7%

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
      8. associate-*l*87.8%

        \[\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} \]
      9. associate-*l*84.2%

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{\left(z \cdot 4\right) \cdot \left(a \cdot t\right)}\right) + b}{z \cdot c} \]
      10. *-commutative84.2%

        \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Simplified84.2%

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-+l-84.2%

        \[\leadsto \frac{\color{blue}{x \cdot \left(9 \cdot y\right) - \left(\left(z \cdot 4\right) \cdot \left(t \cdot a\right) - b\right)}}{z \cdot c} \]
      2. div-sub79.2%

        \[\leadsto \color{blue}{\frac{x \cdot \left(9 \cdot y\right)}{z \cdot c} - \frac{\left(z \cdot 4\right) \cdot \left(t \cdot a\right) - b}{z \cdot c}} \]
      3. associate-*r*79.1%

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y}}{z \cdot c} - \frac{\left(z \cdot 4\right) \cdot \left(t \cdot a\right) - b}{z \cdot c} \]
      4. *-commutative79.1%

        \[\leadsto \frac{\color{blue}{\left(9 \cdot x\right)} \cdot y}{z \cdot c} - \frac{\left(z \cdot 4\right) \cdot \left(t \cdot a\right) - b}{z \cdot c} \]
      5. associate-*l*79.2%

        \[\leadsto \frac{\color{blue}{9 \cdot \left(x \cdot y\right)}}{z \cdot c} - \frac{\left(z \cdot 4\right) \cdot \left(t \cdot a\right) - b}{z \cdot c} \]
      6. *-commutative79.2%

        \[\leadsto \frac{9 \cdot \left(x \cdot y\right)}{z \cdot c} - \frac{\color{blue}{\left(4 \cdot z\right)} \cdot \left(t \cdot a\right) - b}{z \cdot c} \]
      7. associate-*l*79.2%

        \[\leadsto \frac{9 \cdot \left(x \cdot y\right)}{z \cdot c} - \frac{\color{blue}{4 \cdot \left(z \cdot \left(t \cdot a\right)\right)} - b}{z \cdot c} \]
    6. Applied egg-rr79.2%

      \[\leadsto \color{blue}{\frac{9 \cdot \left(x \cdot y\right)}{z \cdot c} - \frac{4 \cdot \left(z \cdot \left(t \cdot a\right)\right) - b}{z \cdot c}} \]
    7. Taylor expanded in z around inf 47.9%

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    8. Step-by-step derivation
      1. associate-*r/47.9%

        \[\leadsto \color{blue}{\frac{-4 \cdot \left(a \cdot t\right)}{c}} \]
      2. *-commutative47.9%

        \[\leadsto \frac{\color{blue}{\left(a \cdot t\right) \cdot -4}}{c} \]
      3. *-commutative47.9%

        \[\leadsto \frac{\color{blue}{\left(t \cdot a\right)} \cdot -4}{c} \]
      4. associate-*r*47.9%

        \[\leadsto \frac{\color{blue}{t \cdot \left(a \cdot -4\right)}}{c} \]
      5. *-commutative47.9%

        \[\leadsto \frac{t \cdot \color{blue}{\left(-4 \cdot a\right)}}{c} \]
      6. associate-*r/50.4%

        \[\leadsto \color{blue}{t \cdot \frac{-4 \cdot a}{c}} \]
      7. associate-*r/50.4%

        \[\leadsto t \cdot \color{blue}{\left(-4 \cdot \frac{a}{c}\right)} \]
      8. *-commutative50.4%

        \[\leadsto t \cdot \color{blue}{\left(\frac{a}{c} \cdot -4\right)} \]
    9. Simplified50.4%

      \[\leadsto \color{blue}{t \cdot \left(\frac{a}{c} \cdot -4\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification46.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-97}:\\ \;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\ \mathbf{elif}\;t \leq 2.95 \cdot 10^{-6}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 86.6% accurate, 1.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{z} - 4 \cdot \left(t \cdot a\right)}{c} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (/ (- (/ (+ b (* 9.0 (* x y))) z) (* 4.0 (* t a))) c))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
	return (((b + (9.0 * (x * y))) / z) - (4.0 * (t * a))) / c;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = (((b + (9.0d0 * (x * y))) / z) - (4.0d0 * (t * a))) / c
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	return (((b + (9.0 * (x * y))) / z) - (4.0 * (t * a))) / c;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
def code(x, y, z, t, a, b, c):
	return (((b + (9.0 * (x * y))) / z) - (4.0 * (t * a))) / c
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
function code(x, y, z, t, a, b, c)
	return Float64(Float64(Float64(Float64(b + Float64(9.0 * Float64(x * y))) / z) - Float64(4.0 * Float64(t * a))) / c)
end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp = code(x, y, z, t, a, b, c)
	tmp = (((b + (9.0 * (x * y))) / z) - (4.0 * (t * a))) / c;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{z} - 4 \cdot \left(t \cdot a\right)}{c}
\end{array}
Derivation
  1. Initial program 83.4%

    \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
  2. Step-by-step derivation
    1. +-commutative83.4%

      \[\leadsto \frac{\color{blue}{b + \left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)}}{z \cdot c} \]
    2. associate-+r-83.4%

      \[\leadsto \frac{\color{blue}{\left(b + \left(x \cdot 9\right) \cdot y\right) - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}}{z \cdot c} \]
    3. *-commutative83.4%

      \[\leadsto \frac{\left(b + \left(x \cdot 9\right) \cdot y\right) - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}}{z \cdot c} \]
    4. associate-*r*81.2%

      \[\leadsto \frac{\left(b + \left(x \cdot 9\right) \cdot y\right) - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t}}{z \cdot c} \]
    5. *-commutative81.2%

      \[\leadsto \frac{\left(b + \left(x \cdot 9\right) \cdot y\right) - \color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t}{z \cdot c} \]
    6. associate-+r-81.2%

      \[\leadsto \frac{\color{blue}{b + \left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right)}}{z \cdot c} \]
    7. +-commutative81.2%

      \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
    8. associate-*l*80.9%

      \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}{z \cdot c} \]
    9. associate-*l*82.0%

      \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{\left(z \cdot 4\right) \cdot \left(a \cdot t\right)}\right) + b}{z \cdot c} \]
    10. *-commutative82.0%

      \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
  3. Simplified82.0%

    \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. associate-+l-82.0%

      \[\leadsto \frac{\color{blue}{x \cdot \left(9 \cdot y\right) - \left(\left(z \cdot 4\right) \cdot \left(t \cdot a\right) - b\right)}}{z \cdot c} \]
    2. div-sub76.9%

      \[\leadsto \color{blue}{\frac{x \cdot \left(9 \cdot y\right)}{z \cdot c} - \frac{\left(z \cdot 4\right) \cdot \left(t \cdot a\right) - b}{z \cdot c}} \]
    3. associate-*r*77.3%

      \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y}}{z \cdot c} - \frac{\left(z \cdot 4\right) \cdot \left(t \cdot a\right) - b}{z \cdot c} \]
    4. *-commutative77.3%

      \[\leadsto \frac{\color{blue}{\left(9 \cdot x\right)} \cdot y}{z \cdot c} - \frac{\left(z \cdot 4\right) \cdot \left(t \cdot a\right) - b}{z \cdot c} \]
    5. associate-*l*77.3%

      \[\leadsto \frac{\color{blue}{9 \cdot \left(x \cdot y\right)}}{z \cdot c} - \frac{\left(z \cdot 4\right) \cdot \left(t \cdot a\right) - b}{z \cdot c} \]
    6. *-commutative77.3%

      \[\leadsto \frac{9 \cdot \left(x \cdot y\right)}{z \cdot c} - \frac{\color{blue}{\left(4 \cdot z\right)} \cdot \left(t \cdot a\right) - b}{z \cdot c} \]
    7. associate-*l*77.3%

      \[\leadsto \frac{9 \cdot \left(x \cdot y\right)}{z \cdot c} - \frac{\color{blue}{4 \cdot \left(z \cdot \left(t \cdot a\right)\right)} - b}{z \cdot c} \]
  6. Applied egg-rr77.3%

    \[\leadsto \color{blue}{\frac{9 \cdot \left(x \cdot y\right)}{z \cdot c} - \frac{4 \cdot \left(z \cdot \left(t \cdot a\right)\right) - b}{z \cdot c}} \]
  7. Taylor expanded in c around 0 85.7%

    \[\leadsto \color{blue}{\frac{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right) - 4 \cdot \left(a \cdot t\right)}{c}} \]
  8. Taylor expanded in z around 0 86.8%

    \[\leadsto \frac{\color{blue}{\frac{b + 9 \cdot \left(x \cdot y\right)}{z}} - 4 \cdot \left(a \cdot t\right)}{c} \]
  9. Final simplification86.8%

    \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{z} - 4 \cdot \left(t \cdot a\right)}{c} \]
  10. Add Preprocessing

Alternative 18: 35.0% accurate, 3.8× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \frac{b}{z \cdot c} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c) :precision binary64 (/ b (* z c)))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
	return b / (z * c);
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = b / (z * c)
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	return b / (z * c);
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
def code(x, y, z, t, a, b, c):
	return b / (z * c)
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
function code(x, y, z, t, a, b, c)
	return Float64(b / Float64(z * c))
end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp = code(x, y, z, t, a, b, c)
	tmp = b / (z * c);
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{b}{z \cdot c}
\end{array}
Derivation
  1. Initial program 83.4%

    \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
  2. Step-by-step derivation
    1. +-commutative83.4%

      \[\leadsto \frac{\color{blue}{b + \left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)}}{z \cdot c} \]
    2. associate-+r-83.4%

      \[\leadsto \frac{\color{blue}{\left(b + \left(x \cdot 9\right) \cdot y\right) - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}}{z \cdot c} \]
    3. *-commutative83.4%

      \[\leadsto \frac{\left(b + \left(x \cdot 9\right) \cdot y\right) - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}}{z \cdot c} \]
    4. associate-*r*81.2%

      \[\leadsto \frac{\left(b + \left(x \cdot 9\right) \cdot y\right) - \color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t}}{z \cdot c} \]
    5. *-commutative81.2%

      \[\leadsto \frac{\left(b + \left(x \cdot 9\right) \cdot y\right) - \color{blue}{\left(\left(z \cdot 4\right) \cdot a\right)} \cdot t}{z \cdot c} \]
    6. associate-+r-81.2%

      \[\leadsto \frac{\color{blue}{b + \left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right)}}{z \cdot c} \]
    7. +-commutative81.2%

      \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}}{z \cdot c} \]
    8. associate-*l*80.9%

      \[\leadsto \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot a\right) \cdot t\right) + b}{z \cdot c} \]
    9. associate-*l*82.0%

      \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{\left(z \cdot 4\right) \cdot \left(a \cdot t\right)}\right) + b}{z \cdot c} \]
    10. *-commutative82.0%

      \[\leadsto \frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \color{blue}{\left(t \cdot a\right)}\right) + b}{z \cdot c} \]
  3. Simplified82.0%

    \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}} \]
  4. Add Preprocessing
  5. Taylor expanded in b around inf 37.1%

    \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
  6. Step-by-step derivation
    1. *-commutative37.1%

      \[\leadsto \frac{b}{\color{blue}{z \cdot c}} \]
  7. Simplified37.1%

    \[\leadsto \color{blue}{\frac{b}{z \cdot c}} \]
  8. Final simplification37.1%

    \[\leadsto \frac{b}{z \cdot c} \]
  9. Add Preprocessing

Developer target: 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 2024081 
(FPCore (x y z t a b c)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, J"
  :precision binary64

  :alt
  (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) -1.100156740804105e-171) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 0.0) (/ (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.1708877911747488e-53) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 2.876823679546137e+130) (- (+ (* (* 9.0 (/ y c)) (/ x z)) (/ b (* c z))) (* 4.0 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.3838515042456319e+158) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (- (+ (* 9.0 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4.0 (/ (* a t) c))))))))

  (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))