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

Percentage Accurate: 79.7% → 86.8%
Time: 14.5s
Alternatives: 14
Speedup: 0.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 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.7% 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: 86.8% accurate, 0.5× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{+111}:\\ \;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{+141}:\\ \;\;\;\;\frac{b + \left(\left(x \cdot 9\right) \cdot y - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot \left(-4 \cdot \frac{a \cdot t}{x} + \left(9 \cdot \frac{y}{z} + \frac{b}{z \cdot x}\right)\right)\right) \cdot \frac{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.
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 (<= z -4.8e+111)
   (/ (+ (* -4.0 (* a t)) (/ b z)) c)
   (if (<= z 3.3e+141)
     (/ (+ b (- (* (* x 9.0) y) (* a (* t (* z 4.0))))) (* z c))
     (*
      (* x (+ (* -4.0 (/ (* a t) x)) (+ (* 9.0 (/ y z)) (/ b (* z x)))))
      (/ 1.0 c)))))
assert(x < y && y < z && z < t && t < a && a < b && b < 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 <= -4.8e+111) {
		tmp = ((-4.0 * (a * t)) + (b / z)) / c;
	} else if (z <= 3.3e+141) {
		tmp = (b + (((x * 9.0) * y) - (a * (t * (z * 4.0))))) / (z * c);
	} else {
		tmp = (x * ((-4.0 * ((a * t) / x)) + ((9.0 * (y / z)) + (b / (z * x))))) * (1.0 / c);
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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 <= (-4.8d+111)) then
        tmp = (((-4.0d0) * (a * t)) + (b / z)) / c
    else if (z <= 3.3d+141) then
        tmp = (b + (((x * 9.0d0) * y) - (a * (t * (z * 4.0d0))))) / (z * c)
    else
        tmp = (x * (((-4.0d0) * ((a * t) / x)) + ((9.0d0 * (y / z)) + (b / (z * x))))) * (1.0d0 / c)
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
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 <= -4.8e+111) {
		tmp = ((-4.0 * (a * t)) + (b / z)) / c;
	} else if (z <= 3.3e+141) {
		tmp = (b + (((x * 9.0) * y) - (a * (t * (z * 4.0))))) / (z * c);
	} else {
		tmp = (x * ((-4.0 * ((a * t) / x)) + ((9.0 * (y / z)) + (b / (z * x))))) * (1.0 / c);
	}
	return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, 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):
	tmp = 0
	if z <= -4.8e+111:
		tmp = ((-4.0 * (a * t)) + (b / z)) / c
	elif z <= 3.3e+141:
		tmp = (b + (((x * 9.0) * y) - (a * (t * (z * 4.0))))) / (z * c)
	else:
		tmp = (x * ((-4.0 * ((a * t) / x)) + ((9.0 * (y / z)) + (b / (z * x))))) * (1.0 / c)
	return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, 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)
	tmp = 0.0
	if (z <= -4.8e+111)
		tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c);
	elseif (z <= 3.3e+141)
		tmp = Float64(Float64(b + Float64(Float64(Float64(x * 9.0) * y) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c));
	else
		tmp = Float64(Float64(x * Float64(Float64(-4.0 * Float64(Float64(a * t) / x)) + Float64(Float64(9.0 * Float64(y / z)) + Float64(b / Float64(z * x))))) * Float64(1.0 / c));
	end
	return tmp
end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
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 <= -4.8e+111)
		tmp = ((-4.0 * (a * t)) + (b / z)) / c;
	elseif (z <= 3.3e+141)
		tmp = (b + (((x * 9.0) * y) - (a * (t * (z * 4.0))))) / (z * c);
	else
		tmp = (x * ((-4.0 * ((a * t) / x)) + ((9.0 * (y / z)) + (b / (z * x))))) * (1.0 / 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.
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[z, -4.8e+111], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 3.3e+141], N[(N[(b + N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[(-4.0 * N[(N[(a * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(b / N[(z * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+111}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.80000000000000011e111

    1. Initial program 49.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. Simplified58.9%

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

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

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

    if -4.80000000000000011e111 < z < 3.2999999999999997e141

    1. Initial program 94.0%

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

    if 3.2999999999999997e141 < z

    1. Initial program 56.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. Simplified65.0%

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

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

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

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

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

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

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

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

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

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

Alternative 2: 79.0% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := -4 \cdot \left(a \cdot t\right)\\ t_2 := \left(x \cdot 9\right) \cdot y\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+76} \lor \neg \left(t\_2 \leq 5 \cdot 10^{+59}\right):\\ \;\;\;\;\frac{t\_1 + 9 \cdot \left(x \cdot \frac{y}{z}\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_1 + \frac{b}{z}}{c}\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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 (* a t))) (t_2 (* (* x 9.0) y)))
   (if (or (<= t_2 -2e+76) (not (<= t_2 5e+59)))
     (/ (+ t_1 (* 9.0 (* x (/ y z)))) c)
     (/ (+ t_1 (/ b z)) c))))
assert(x < y && y < z && z < t && t < a && a < b && b < 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 * (a * t);
	double t_2 = (x * 9.0) * y;
	double tmp;
	if ((t_2 <= -2e+76) || !(t_2 <= 5e+59)) {
		tmp = (t_1 + (9.0 * (x * (y / z)))) / c;
	} else {
		tmp = (t_1 + (b / z)) / c;
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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) :: tmp
    t_1 = (-4.0d0) * (a * t)
    t_2 = (x * 9.0d0) * y
    if ((t_2 <= (-2d+76)) .or. (.not. (t_2 <= 5d+59))) then
        tmp = (t_1 + (9.0d0 * (x * (y / z)))) / c
    else
        tmp = (t_1 + (b / z)) / c
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
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 * (a * t);
	double t_2 = (x * 9.0) * y;
	double tmp;
	if ((t_2 <= -2e+76) || !(t_2 <= 5e+59)) {
		tmp = (t_1 + (9.0 * (x * (y / z)))) / c;
	} else {
		tmp = (t_1 + (b / z)) / c;
	}
	return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, 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):
	t_1 = -4.0 * (a * t)
	t_2 = (x * 9.0) * y
	tmp = 0
	if (t_2 <= -2e+76) or not (t_2 <= 5e+59):
		tmp = (t_1 + (9.0 * (x * (y / z)))) / c
	else:
		tmp = (t_1 + (b / z)) / c
	return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, 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)
	t_1 = Float64(-4.0 * Float64(a * t))
	t_2 = Float64(Float64(x * 9.0) * y)
	tmp = 0.0
	if ((t_2 <= -2e+76) || !(t_2 <= 5e+59))
		tmp = Float64(Float64(t_1 + Float64(9.0 * Float64(x * Float64(y / z)))) / c);
	else
		tmp = Float64(Float64(t_1 + Float64(b / z)) / c);
	end
	return tmp
end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
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 * (a * t);
	t_2 = (x * 9.0) * y;
	tmp = 0.0;
	if ((t_2 <= -2e+76) || ~((t_2 <= 5e+59)))
		tmp = (t_1 + (9.0 * (x * (y / z)))) / c;
	else
		tmp = (t_1 + (b / 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.
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[(a * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[Or[LessEqual[t$95$2, -2e+76], N[Not[LessEqual[t$95$2, 5e+59]], $MachinePrecision]], N[(N[(t$95$1 + N[(9.0 * N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(t$95$1 + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(a \cdot t\right)\\
t_2 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+76} \lor \neg \left(t\_2 \leq 5 \cdot 10^{+59}\right):\\
\;\;\;\;\frac{t\_1 + 9 \cdot \left(x \cdot \frac{y}{z}\right)}{c}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -2.0000000000000001e76 or 4.9999999999999997e59 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 75.1%

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

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

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

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

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

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

    if -2.0000000000000001e76 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 4.9999999999999997e59

    1. Initial program 81.9%

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

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

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

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

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

Alternative 3: 79.2% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := -4 \cdot \left(a \cdot t\right)\\ t_2 := \left(x \cdot 9\right) \cdot y\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+76}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right) - -9 \cdot \left(y \cdot \frac{x}{z \cdot c}\right)\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+59}:\\ \;\;\;\;\frac{t\_1 + \frac{b}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_1 + 9 \cdot \left(x \cdot \frac{y}{z}\right)}{c}\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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 (* a t))) (t_2 (* (* x 9.0) y)))
   (if (<= t_2 -2e+76)
     (- (* -4.0 (* t (/ a c))) (* -9.0 (* y (/ x (* z c)))))
     (if (<= t_2 5e+59)
       (/ (+ t_1 (/ b z)) c)
       (/ (+ t_1 (* 9.0 (* x (/ y z)))) c)))))
assert(x < y && y < z && z < t && t < a && a < b && b < 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 * (a * t);
	double t_2 = (x * 9.0) * y;
	double tmp;
	if (t_2 <= -2e+76) {
		tmp = (-4.0 * (t * (a / c))) - (-9.0 * (y * (x / (z * c))));
	} else if (t_2 <= 5e+59) {
		tmp = (t_1 + (b / z)) / c;
	} else {
		tmp = (t_1 + (9.0 * (x * (y / z)))) / c;
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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) :: tmp
    t_1 = (-4.0d0) * (a * t)
    t_2 = (x * 9.0d0) * y
    if (t_2 <= (-2d+76)) then
        tmp = ((-4.0d0) * (t * (a / c))) - ((-9.0d0) * (y * (x / (z * c))))
    else if (t_2 <= 5d+59) then
        tmp = (t_1 + (b / z)) / c
    else
        tmp = (t_1 + (9.0d0 * (x * (y / z)))) / c
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
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 * (a * t);
	double t_2 = (x * 9.0) * y;
	double tmp;
	if (t_2 <= -2e+76) {
		tmp = (-4.0 * (t * (a / c))) - (-9.0 * (y * (x / (z * c))));
	} else if (t_2 <= 5e+59) {
		tmp = (t_1 + (b / z)) / c;
	} else {
		tmp = (t_1 + (9.0 * (x * (y / z)))) / c;
	}
	return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, 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):
	t_1 = -4.0 * (a * t)
	t_2 = (x * 9.0) * y
	tmp = 0
	if t_2 <= -2e+76:
		tmp = (-4.0 * (t * (a / c))) - (-9.0 * (y * (x / (z * c))))
	elif t_2 <= 5e+59:
		tmp = (t_1 + (b / z)) / c
	else:
		tmp = (t_1 + (9.0 * (x * (y / z)))) / c
	return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, 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)
	t_1 = Float64(-4.0 * Float64(a * t))
	t_2 = Float64(Float64(x * 9.0) * y)
	tmp = 0.0
	if (t_2 <= -2e+76)
		tmp = Float64(Float64(-4.0 * Float64(t * Float64(a / c))) - Float64(-9.0 * Float64(y * Float64(x / Float64(z * c)))));
	elseif (t_2 <= 5e+59)
		tmp = Float64(Float64(t_1 + Float64(b / z)) / c);
	else
		tmp = Float64(Float64(t_1 + Float64(9.0 * Float64(x * Float64(y / z)))) / c);
	end
	return tmp
end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
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 * (a * t);
	t_2 = (x * 9.0) * y;
	tmp = 0.0;
	if (t_2 <= -2e+76)
		tmp = (-4.0 * (t * (a / c))) - (-9.0 * (y * (x / (z * c))));
	elseif (t_2 <= 5e+59)
		tmp = (t_1 + (b / z)) / c;
	else
		tmp = (t_1 + (9.0 * (x * (y / 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.
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[(a * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+76], N[(N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-9.0 * N[(y * N[(x / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+59], N[(N[(t$95$1 + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(t$95$1 + N[(9.0 * N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(a \cdot t\right)\\
t_2 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+76}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right) - -9 \cdot \left(y \cdot \frac{x}{z \cdot c}\right)\\

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

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


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

    1. Initial program 76.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. Simplified81.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.0000000000000001e76 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 4.9999999999999997e59

    1. Initial program 81.9%

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

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

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

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

    if 4.9999999999999997e59 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 73.5%

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

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

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

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

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

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

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

Alternative 4: 86.4% accurate, 0.7× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := -4 \cdot \left(a \cdot t\right)\\ \mathbf{if}\;z \leq -2.2 \cdot 10^{+111}:\\ \;\;\;\;\frac{t\_1 + \frac{b}{z}}{c}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+141}:\\ \;\;\;\;\frac{b + \left(\left(x \cdot 9\right) \cdot y - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_1 + 9 \cdot \left(x \cdot \frac{y}{z}\right)}{c}\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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 (* a t))))
   (if (<= z -2.2e+111)
     (/ (+ t_1 (/ b z)) c)
     (if (<= z 3.8e+141)
       (/ (+ b (- (* (* x 9.0) y) (* a (* t (* z 4.0))))) (* z c))
       (/ (+ t_1 (* 9.0 (* x (/ y z)))) c)))))
assert(x < y && y < z && z < t && t < a && a < b && b < 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 * (a * t);
	double tmp;
	if (z <= -2.2e+111) {
		tmp = (t_1 + (b / z)) / c;
	} else if (z <= 3.8e+141) {
		tmp = (b + (((x * 9.0) * y) - (a * (t * (z * 4.0))))) / (z * c);
	} else {
		tmp = (t_1 + (9.0 * (x * (y / z)))) / c;
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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) * (a * t)
    if (z <= (-2.2d+111)) then
        tmp = (t_1 + (b / z)) / c
    else if (z <= 3.8d+141) then
        tmp = (b + (((x * 9.0d0) * y) - (a * (t * (z * 4.0d0))))) / (z * c)
    else
        tmp = (t_1 + (9.0d0 * (x * (y / z)))) / c
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
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 * (a * t);
	double tmp;
	if (z <= -2.2e+111) {
		tmp = (t_1 + (b / z)) / c;
	} else if (z <= 3.8e+141) {
		tmp = (b + (((x * 9.0) * y) - (a * (t * (z * 4.0))))) / (z * c);
	} else {
		tmp = (t_1 + (9.0 * (x * (y / z)))) / c;
	}
	return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, 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):
	t_1 = -4.0 * (a * t)
	tmp = 0
	if z <= -2.2e+111:
		tmp = (t_1 + (b / z)) / c
	elif z <= 3.8e+141:
		tmp = (b + (((x * 9.0) * y) - (a * (t * (z * 4.0))))) / (z * c)
	else:
		tmp = (t_1 + (9.0 * (x * (y / z)))) / c
	return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, 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)
	t_1 = Float64(-4.0 * Float64(a * t))
	tmp = 0.0
	if (z <= -2.2e+111)
		tmp = Float64(Float64(t_1 + Float64(b / z)) / c);
	elseif (z <= 3.8e+141)
		tmp = Float64(Float64(b + Float64(Float64(Float64(x * 9.0) * y) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c));
	else
		tmp = Float64(Float64(t_1 + Float64(9.0 * Float64(x * Float64(y / z)))) / c);
	end
	return tmp
end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
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 * (a * t);
	tmp = 0.0;
	if (z <= -2.2e+111)
		tmp = (t_1 + (b / z)) / c;
	elseif (z <= 3.8e+141)
		tmp = (b + (((x * 9.0) * y) - (a * (t * (z * 4.0))))) / (z * c);
	else
		tmp = (t_1 + (9.0 * (x * (y / 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.
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[(a * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.2e+111], N[(N[(t$95$1 + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 3.8e+141], N[(N[(b + N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 + N[(9.0 * N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(a \cdot t\right)\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+111}:\\
\;\;\;\;\frac{t\_1 + \frac{b}{z}}{c}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.19999999999999999e111

    1. Initial program 49.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. Simplified58.9%

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

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

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

    if -2.19999999999999999e111 < z < 3.79999999999999976e141

    1. Initial program 94.0%

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

    if 3.79999999999999976e141 < z

    1. Initial program 56.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. Simplified65.0%

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

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

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

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

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

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

Alternative 5: 85.3% accurate, 0.7× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := -4 \cdot \left(a \cdot t\right)\\ \mathbf{if}\;z \leq -1.4 \cdot 10^{+112}:\\ \;\;\;\;\frac{t\_1 + \frac{b}{z}}{c}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+142}:\\ \;\;\;\;\frac{b - \left(\left(a \cdot t\right) \cdot \left(z \cdot 4\right) - x \cdot \left(9 \cdot y\right)\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_1 + 9 \cdot \left(x \cdot \frac{y}{z}\right)}{c}\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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 (* a t))))
   (if (<= z -1.4e+112)
     (/ (+ t_1 (/ b z)) c)
     (if (<= z 6.5e+142)
       (/ (- b (- (* (* a t) (* z 4.0)) (* x (* 9.0 y)))) (* z c))
       (/ (+ t_1 (* 9.0 (* x (/ y z)))) c)))))
assert(x < y && y < z && z < t && t < a && a < b && b < 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 * (a * t);
	double tmp;
	if (z <= -1.4e+112) {
		tmp = (t_1 + (b / z)) / c;
	} else if (z <= 6.5e+142) {
		tmp = (b - (((a * t) * (z * 4.0)) - (x * (9.0 * y)))) / (z * c);
	} else {
		tmp = (t_1 + (9.0 * (x * (y / z)))) / c;
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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) * (a * t)
    if (z <= (-1.4d+112)) then
        tmp = (t_1 + (b / z)) / c
    else if (z <= 6.5d+142) then
        tmp = (b - (((a * t) * (z * 4.0d0)) - (x * (9.0d0 * y)))) / (z * c)
    else
        tmp = (t_1 + (9.0d0 * (x * (y / z)))) / c
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
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 * (a * t);
	double tmp;
	if (z <= -1.4e+112) {
		tmp = (t_1 + (b / z)) / c;
	} else if (z <= 6.5e+142) {
		tmp = (b - (((a * t) * (z * 4.0)) - (x * (9.0 * y)))) / (z * c);
	} else {
		tmp = (t_1 + (9.0 * (x * (y / z)))) / c;
	}
	return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, 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):
	t_1 = -4.0 * (a * t)
	tmp = 0
	if z <= -1.4e+112:
		tmp = (t_1 + (b / z)) / c
	elif z <= 6.5e+142:
		tmp = (b - (((a * t) * (z * 4.0)) - (x * (9.0 * y)))) / (z * c)
	else:
		tmp = (t_1 + (9.0 * (x * (y / z)))) / c
	return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, 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)
	t_1 = Float64(-4.0 * Float64(a * t))
	tmp = 0.0
	if (z <= -1.4e+112)
		tmp = Float64(Float64(t_1 + Float64(b / z)) / c);
	elseif (z <= 6.5e+142)
		tmp = Float64(Float64(b - Float64(Float64(Float64(a * t) * Float64(z * 4.0)) - Float64(x * Float64(9.0 * y)))) / Float64(z * c));
	else
		tmp = Float64(Float64(t_1 + Float64(9.0 * Float64(x * Float64(y / z)))) / c);
	end
	return tmp
end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
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 * (a * t);
	tmp = 0.0;
	if (z <= -1.4e+112)
		tmp = (t_1 + (b / z)) / c;
	elseif (z <= 6.5e+142)
		tmp = (b - (((a * t) * (z * 4.0)) - (x * (9.0 * y)))) / (z * c);
	else
		tmp = (t_1 + (9.0 * (x * (y / 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.
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[(a * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.4e+112], N[(N[(t$95$1 + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 6.5e+142], N[(N[(b - N[(N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision] - N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 + N[(9.0 * N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(a \cdot t\right)\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{+112}:\\
\;\;\;\;\frac{t\_1 + \frac{b}{z}}{c}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.4000000000000001e112

    1. Initial program 49.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. Simplified58.9%

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

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

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

    if -1.4000000000000001e112 < z < 6.4999999999999997e142

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

    if 6.4999999999999997e142 < z

    1. Initial program 56.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. Simplified65.0%

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

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

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

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

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

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

Alternative 6: 74.5% accurate, 0.7× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+168}:\\ \;\;\;\;\frac{y \cdot \left(9 \cdot \frac{x}{c}\right)}{z}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+297}:\\ \;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z} \cdot \frac{x \cdot 9}{c}\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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) y)))
   (if (<= t_1 -4e+168)
     (/ (* y (* 9.0 (/ x c))) z)
     (if (<= t_1 5e+297)
       (/ (+ (* -4.0 (* a t)) (/ b z)) c)
       (* (/ y z) (/ (* x 9.0) c))))))
assert(x < y && y < z && z < t && t < a && a < b && b < 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 = (x * 9.0) * y;
	double tmp;
	if (t_1 <= -4e+168) {
		tmp = (y * (9.0 * (x / c))) / z;
	} else if (t_1 <= 5e+297) {
		tmp = ((-4.0 * (a * t)) + (b / z)) / c;
	} else {
		tmp = (y / z) * ((x * 9.0) / c);
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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) * y
    if (t_1 <= (-4d+168)) then
        tmp = (y * (9.0d0 * (x / c))) / z
    else if (t_1 <= 5d+297) then
        tmp = (((-4.0d0) * (a * t)) + (b / z)) / c
    else
        tmp = (y / z) * ((x * 9.0d0) / c)
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
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) * y;
	double tmp;
	if (t_1 <= -4e+168) {
		tmp = (y * (9.0 * (x / c))) / z;
	} else if (t_1 <= 5e+297) {
		tmp = ((-4.0 * (a * t)) + (b / z)) / c;
	} else {
		tmp = (y / z) * ((x * 9.0) / c);
	}
	return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, 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):
	t_1 = (x * 9.0) * y
	tmp = 0
	if t_1 <= -4e+168:
		tmp = (y * (9.0 * (x / c))) / z
	elif t_1 <= 5e+297:
		tmp = ((-4.0 * (a * t)) + (b / z)) / c
	else:
		tmp = (y / z) * ((x * 9.0) / c)
	return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, 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)
	t_1 = Float64(Float64(x * 9.0) * y)
	tmp = 0.0
	if (t_1 <= -4e+168)
		tmp = Float64(Float64(y * Float64(9.0 * Float64(x / c))) / z);
	elseif (t_1 <= 5e+297)
		tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c);
	else
		tmp = Float64(Float64(y / z) * Float64(Float64(x * 9.0) / c));
	end
	return tmp
end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
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) * y;
	tmp = 0.0;
	if (t_1 <= -4e+168)
		tmp = (y * (9.0 * (x / c))) / z;
	elseif (t_1 <= 5e+297)
		tmp = ((-4.0 * (a * t)) + (b / z)) / c;
	else
		tmp = (y / z) * ((x * 9.0) / 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.
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 * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+168], N[(N[(y * N[(9.0 * N[(x / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, 5e+297], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(y / z), $MachinePrecision] * N[(N[(x * 9.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+168}:\\
\;\;\;\;\frac{y \cdot \left(9 \cdot \frac{x}{c}\right)}{z}\\

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

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


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

    1. Initial program 75.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. Simplified79.8%

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

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

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

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

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

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

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

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

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

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

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

    if -3.9999999999999997e168 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 4.9999999999999998e297

    1. Initial program 81.4%

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

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

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

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

    if 4.9999999999999998e297 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 61.7%

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

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

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

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

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

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

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

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

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

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

Alternative 7: 84.3% accurate, 0.7× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} \mathbf{if}\;c \leq 3.7 \cdot 10^{+67}:\\ \;\;\;\;\frac{b - \left(\left(a \cdot t\right) \cdot \left(z \cdot 4\right) - x \cdot \left(9 \cdot y\right)\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right) - \frac{\left(x \cdot y\right) \cdot \frac{-9}{c} - \frac{b}{c}}{z}\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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 (<= c 3.7e+67)
   (/ (- b (- (* (* a t) (* z 4.0)) (* x (* 9.0 y)))) (* z c))
   (- (* -4.0 (* t (/ a c))) (/ (- (* (* x y) (/ -9.0 c)) (/ b c)) z))))
assert(x < y && y < z && z < t && t < a && a < b && b < 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 (c <= 3.7e+67) {
		tmp = (b - (((a * t) * (z * 4.0)) - (x * (9.0 * y)))) / (z * c);
	} else {
		tmp = (-4.0 * (t * (a / c))) - ((((x * y) * (-9.0 / c)) - (b / c)) / z);
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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 (c <= 3.7d+67) then
        tmp = (b - (((a * t) * (z * 4.0d0)) - (x * (9.0d0 * y)))) / (z * c)
    else
        tmp = ((-4.0d0) * (t * (a / c))) - ((((x * y) * ((-9.0d0) / c)) - (b / c)) / z)
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
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 (c <= 3.7e+67) {
		tmp = (b - (((a * t) * (z * 4.0)) - (x * (9.0 * y)))) / (z * c);
	} else {
		tmp = (-4.0 * (t * (a / c))) - ((((x * y) * (-9.0 / c)) - (b / c)) / z);
	}
	return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, 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):
	tmp = 0
	if c <= 3.7e+67:
		tmp = (b - (((a * t) * (z * 4.0)) - (x * (9.0 * y)))) / (z * c)
	else:
		tmp = (-4.0 * (t * (a / c))) - ((((x * y) * (-9.0 / c)) - (b / c)) / z)
	return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, 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)
	tmp = 0.0
	if (c <= 3.7e+67)
		tmp = Float64(Float64(b - Float64(Float64(Float64(a * t) * Float64(z * 4.0)) - Float64(x * Float64(9.0 * y)))) / Float64(z * c));
	else
		tmp = Float64(Float64(-4.0 * Float64(t * Float64(a / c))) - Float64(Float64(Float64(Float64(x * y) * Float64(-9.0 / c)) - Float64(b / c)) / z));
	end
	return tmp
end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
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 (c <= 3.7e+67)
		tmp = (b - (((a * t) * (z * 4.0)) - (x * (9.0 * y)))) / (z * c);
	else
		tmp = (-4.0 * (t * (a / c))) - ((((x * y) * (-9.0 / c)) - (b / c)) / 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.
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[c, 3.7e+67], N[(N[(b - N[(N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision] - N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(x * y), $MachinePrecision] * N[(-9.0 / c), $MachinePrecision]), $MachinePrecision] - N[(b / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;c \leq 3.7 \cdot 10^{+67}:\\
\;\;\;\;\frac{b - \left(\left(a \cdot t\right) \cdot \left(z \cdot 4\right) - x \cdot \left(9 \cdot y\right)\right)}{z \cdot c}\\

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


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

    1. Initial program 81.5%

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

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

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

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

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

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

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

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

    if 3.6999999999999997e67 < c

    1. Initial program 70.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. Simplified71.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 49.1% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := a \cdot \left(-4 \cdot \frac{t}{c}\right)\\ \mathbf{if}\;a \leq -1.76 \cdot 10^{-69}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{-86}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;a \leq 0.00042:\\ \;\;\;\;\frac{9 \cdot \frac{x \cdot y}{z}}{c}\\ \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.
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 (* a (* -4.0 (/ t c)))))
   (if (<= a -1.76e-69)
     t_1
     (if (<= a 1.55e-86)
       (/ b (* z c))
       (if (<= a 0.00042) (/ (* 9.0 (/ (* x y) z)) c) t_1)))))
assert(x < y && y < z && z < t && t < a && a < b && b < 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 = a * (-4.0 * (t / c));
	double tmp;
	if (a <= -1.76e-69) {
		tmp = t_1;
	} else if (a <= 1.55e-86) {
		tmp = b / (z * c);
	} else if (a <= 0.00042) {
		tmp = (9.0 * ((x * y) / z)) / 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.
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 = a * ((-4.0d0) * (t / c))
    if (a <= (-1.76d-69)) then
        tmp = t_1
    else if (a <= 1.55d-86) then
        tmp = b / (z * c)
    else if (a <= 0.00042d0) then
        tmp = (9.0d0 * ((x * y) / z)) / c
    else
        tmp = t_1
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
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 = a * (-4.0 * (t / c));
	double tmp;
	if (a <= -1.76e-69) {
		tmp = t_1;
	} else if (a <= 1.55e-86) {
		tmp = b / (z * c);
	} else if (a <= 0.00042) {
		tmp = (9.0 * ((x * y) / z)) / c;
	} else {
		tmp = t_1;
	}
	return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, 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):
	t_1 = a * (-4.0 * (t / c))
	tmp = 0
	if a <= -1.76e-69:
		tmp = t_1
	elif a <= 1.55e-86:
		tmp = b / (z * c)
	elif a <= 0.00042:
		tmp = (9.0 * ((x * y) / z)) / c
	else:
		tmp = t_1
	return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, 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)
	t_1 = Float64(a * Float64(-4.0 * Float64(t / c)))
	tmp = 0.0
	if (a <= -1.76e-69)
		tmp = t_1;
	elseif (a <= 1.55e-86)
		tmp = Float64(b / Float64(z * c));
	elseif (a <= 0.00042)
		tmp = Float64(Float64(9.0 * Float64(Float64(x * y) / z)) / 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])){:}
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 = a * (-4.0 * (t / c));
	tmp = 0.0;
	if (a <= -1.76e-69)
		tmp = t_1;
	elseif (a <= 1.55e-86)
		tmp = b / (z * c);
	elseif (a <= 0.00042)
		tmp = (9.0 * ((x * y) / z)) / 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.
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[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.76e-69], t$95$1, If[LessEqual[a, 1.55e-86], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.00042], N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\mathbf{if}\;a \leq -1.76 \cdot 10^{-69}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.55 \cdot 10^{-86}:\\
\;\;\;\;\frac{b}{z \cdot c}\\

\mathbf{elif}\;a \leq 0.00042:\\
\;\;\;\;\frac{9 \cdot \frac{x \cdot y}{z}}{c}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.7599999999999999e-69 or 4.2000000000000002e-4 < a

    1. Initial program 75.3%

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

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

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

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

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

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

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

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

    if -1.7599999999999999e-69 < a < 1.54999999999999994e-86

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

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

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

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

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

    if 1.54999999999999994e-86 < a < 4.2000000000000002e-4

    1. Initial program 99.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. Simplified99.9%

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

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

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

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

Alternative 9: 49.1% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := a \cdot \left(-4 \cdot \frac{t}{c}\right)\\ \mathbf{if}\;a \leq -8 \cdot 10^{-69}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-86}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;a \leq 0.0005:\\ \;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\ \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.
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 (* a (* -4.0 (/ t c)))))
   (if (<= a -8e-69)
     t_1
     (if (<= a 1.9e-86)
       (/ b (* z c))
       (if (<= a 0.0005) (* 9.0 (/ (* x y) (* z c))) t_1)))))
assert(x < y && y < z && z < t && t < a && a < b && b < 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 = a * (-4.0 * (t / c));
	double tmp;
	if (a <= -8e-69) {
		tmp = t_1;
	} else if (a <= 1.9e-86) {
		tmp = b / (z * c);
	} else if (a <= 0.0005) {
		tmp = 9.0 * ((x * y) / (z * 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.
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 = a * ((-4.0d0) * (t / c))
    if (a <= (-8d-69)) then
        tmp = t_1
    else if (a <= 1.9d-86) then
        tmp = b / (z * c)
    else if (a <= 0.0005d0) then
        tmp = 9.0d0 * ((x * y) / (z * c))
    else
        tmp = t_1
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
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 = a * (-4.0 * (t / c));
	double tmp;
	if (a <= -8e-69) {
		tmp = t_1;
	} else if (a <= 1.9e-86) {
		tmp = b / (z * c);
	} else if (a <= 0.0005) {
		tmp = 9.0 * ((x * y) / (z * c));
	} else {
		tmp = t_1;
	}
	return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, 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):
	t_1 = a * (-4.0 * (t / c))
	tmp = 0
	if a <= -8e-69:
		tmp = t_1
	elif a <= 1.9e-86:
		tmp = b / (z * c)
	elif a <= 0.0005:
		tmp = 9.0 * ((x * y) / (z * c))
	else:
		tmp = t_1
	return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, 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)
	t_1 = Float64(a * Float64(-4.0 * Float64(t / c)))
	tmp = 0.0
	if (a <= -8e-69)
		tmp = t_1;
	elseif (a <= 1.9e-86)
		tmp = Float64(b / Float64(z * c));
	elseif (a <= 0.0005)
		tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(z * 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])){:}
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 = a * (-4.0 * (t / c));
	tmp = 0.0;
	if (a <= -8e-69)
		tmp = t_1;
	elseif (a <= 1.9e-86)
		tmp = b / (z * c);
	elseif (a <= 0.0005)
		tmp = 9.0 * ((x * y) / (z * 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.
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[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8e-69], t$95$1, If[LessEqual[a, 1.9e-86], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.0005], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * 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])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\mathbf{if}\;a \leq -8 \cdot 10^{-69}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.9 \cdot 10^{-86}:\\
\;\;\;\;\frac{b}{z \cdot c}\\

\mathbf{elif}\;a \leq 0.0005:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -7.9999999999999997e-69 or 5.0000000000000001e-4 < a

    1. Initial program 75.3%

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

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

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

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

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

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

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

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

    if -7.9999999999999997e-69 < a < 1.9e-86

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

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

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

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

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

    if 1.9e-86 < a < 5.0000000000000001e-4

    1. Initial program 99.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. Simplified99.9%

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

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

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

Alternative 10: 75.1% accurate, 0.9× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1.22 \cdot 10^{+57} \lor \neg \left(z \leq 8.4 \cdot 10^{-66}\right):\\ \;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\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.
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 -1.22e+57) (not (<= z 8.4e-66)))
   (/ (+ (* -4.0 (* a t)) (/ b z)) c)
   (/ (+ b (* 9.0 (* x y))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < 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 <= -1.22e+57) || !(z <= 8.4e-66)) {
		tmp = ((-4.0 * (a * t)) + (b / z)) / c;
	} else {
		tmp = (b + (9.0 * (x * y))) / (z * c);
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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 <= (-1.22d+57)) .or. (.not. (z <= 8.4d-66))) then
        tmp = (((-4.0d0) * (a * t)) + (b / z)) / c
    else
        tmp = (b + (9.0d0 * (x * y))) / (z * c)
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
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 <= -1.22e+57) || !(z <= 8.4e-66)) {
		tmp = ((-4.0 * (a * t)) + (b / z)) / c;
	} else {
		tmp = (b + (9.0 * (x * y))) / (z * c);
	}
	return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, 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):
	tmp = 0
	if (z <= -1.22e+57) or not (z <= 8.4e-66):
		tmp = ((-4.0 * (a * t)) + (b / z)) / c
	else:
		tmp = (b + (9.0 * (x * y))) / (z * c)
	return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, 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)
	tmp = 0.0
	if ((z <= -1.22e+57) || !(z <= 8.4e-66))
		tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c);
	else
		tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c));
	end
	return tmp
end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
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 <= -1.22e+57) || ~((z <= 8.4e-66)))
		tmp = ((-4.0 * (a * t)) + (b / z)) / c;
	else
		tmp = (b + (9.0 * (x * y))) / (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.
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, -1.22e+57], N[Not[LessEqual[z, 8.4e-66]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(9.0 * N[(x * y), $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])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.22 \cdot 10^{+57} \lor \neg \left(z \leq 8.4 \cdot 10^{-66}\right):\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.22e57 or 8.4000000000000001e-66 < z

    1. Initial program 67.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. Simplified73.4%

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

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

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

    if -1.22e57 < z < 8.4000000000000001e-66

    1. Initial program 95.3%

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

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

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

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

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

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

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

Alternative 11: 49.5% accurate, 1.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} \mathbf{if}\;a \leq -5.2 \cdot 10^{-69} \lor \neg \left(a \leq 1.02 \cdot 10^{+40}\right):\\ \;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{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.
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 (<= a -5.2e-69) (not (<= a 1.02e+40)))
   (* a (* -4.0 (/ t c)))
   (/ b (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < 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 ((a <= -5.2e-69) || !(a <= 1.02e+40)) {
		tmp = a * (-4.0 * (t / c));
	} else {
		tmp = b / (z * c);
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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 ((a <= (-5.2d-69)) .or. (.not. (a <= 1.02d+40))) then
        tmp = a * ((-4.0d0) * (t / c))
    else
        tmp = b / (z * c)
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
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 ((a <= -5.2e-69) || !(a <= 1.02e+40)) {
		tmp = a * (-4.0 * (t / c));
	} else {
		tmp = b / (z * c);
	}
	return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, 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):
	tmp = 0
	if (a <= -5.2e-69) or not (a <= 1.02e+40):
		tmp = a * (-4.0 * (t / c))
	else:
		tmp = b / (z * c)
	return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, 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)
	tmp = 0.0
	if ((a <= -5.2e-69) || !(a <= 1.02e+40))
		tmp = Float64(a * Float64(-4.0 * Float64(t / c)));
	else
		tmp = Float64(b / Float64(z * c));
	end
	return tmp
end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
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 ((a <= -5.2e-69) || ~((a <= 1.02e+40)))
		tmp = a * (-4.0 * (t / c));
	else
		tmp = b / (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.
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[a, -5.2e-69], N[Not[LessEqual[a, 1.02e+40]], $MachinePrecision]], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.2 \cdot 10^{-69} \lor \neg \left(a \leq 1.02 \cdot 10^{+40}\right):\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.2000000000000004e-69 or 1.02e40 < a

    1. Initial program 75.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. Simplified74.0%

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

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

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

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

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

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

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

    if -5.2000000000000004e-69 < a < 1.02e40

    1. Initial program 85.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. Simplified92.2%

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

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

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

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

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

Alternative 12: 50.3% accurate, 1.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} \mathbf{if}\;a \leq -7.2 \cdot 10^{-69} \lor \neg \left(a \leq 10^{+40}\right):\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{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.
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 (<= a -7.2e-69) (not (<= a 1e+40)))
   (* -4.0 (* t (/ a c)))
   (/ b (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < 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 ((a <= -7.2e-69) || !(a <= 1e+40)) {
		tmp = -4.0 * (t * (a / c));
	} else {
		tmp = b / (z * c);
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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 ((a <= (-7.2d-69)) .or. (.not. (a <= 1d+40))) then
        tmp = (-4.0d0) * (t * (a / c))
    else
        tmp = b / (z * c)
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
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 ((a <= -7.2e-69) || !(a <= 1e+40)) {
		tmp = -4.0 * (t * (a / c));
	} else {
		tmp = b / (z * c);
	}
	return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, 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):
	tmp = 0
	if (a <= -7.2e-69) or not (a <= 1e+40):
		tmp = -4.0 * (t * (a / c))
	else:
		tmp = b / (z * c)
	return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, 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)
	tmp = 0.0
	if ((a <= -7.2e-69) || !(a <= 1e+40))
		tmp = Float64(-4.0 * Float64(t * Float64(a / c)));
	else
		tmp = Float64(b / Float64(z * c));
	end
	return tmp
end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
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 ((a <= -7.2e-69) || ~((a <= 1e+40)))
		tmp = -4.0 * (t * (a / c));
	else
		tmp = b / (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.
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[a, -7.2e-69], N[Not[LessEqual[a, 1e+40]], $MachinePrecision]], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.2 \cdot 10^{-69} \lor \neg \left(a \leq 10^{+40}\right):\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.20000000000000035e-69 or 1.00000000000000003e40 < a

    1. Initial program 75.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. Simplified74.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.20000000000000035e-69 < a < 1.00000000000000003e40

    1. Initial program 85.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. Simplified92.2%

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

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

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

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

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

Alternative 13: 35.9% accurate, 1.9× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [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^{-17}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{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.
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 (<= z -5e-17) (/ (/ b z) c) (/ b (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < 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-17) {
		tmp = (b / z) / c;
	} else {
		tmp = b / (z * c);
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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 <= (-5d-17)) then
        tmp = (b / z) / c
    else
        tmp = b / (z * c)
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
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 <= -5e-17) {
		tmp = (b / z) / c;
	} else {
		tmp = b / (z * c);
	}
	return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, 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):
	tmp = 0
	if z <= -5e-17:
		tmp = (b / z) / c
	else:
		tmp = b / (z * c)
	return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, 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)
	tmp = 0.0
	if (z <= -5e-17)
		tmp = Float64(Float64(b / z) / c);
	else
		tmp = Float64(b / Float64(z * c));
	end
	return tmp
end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
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 <= -5e-17)
		tmp = (b / z) / c;
	else
		tmp = b / (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.
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[z, -5e-17], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], 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])\\\\
[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^{-17}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.9999999999999999e-17

    1. Initial program 63.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. Simplified69.8%

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

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

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

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

    if -4.9999999999999999e-17 < z

    1. Initial program 86.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. Simplified87.4%

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

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

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

      \[\leadsto \color{blue}{\frac{b}{z \cdot c}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 14: 35.4% accurate, 3.8× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [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.
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);
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.
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;
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])
[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])
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])){:}
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.
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])\\\\
[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 79.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. Simplified82.1%

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

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

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

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

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

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

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