Don't use $(( )) at all.
For instance, taking a relevant part of your calculation:
s=$(bc <<<"$s + ( ( ${flowx[a+1]} - ${flowx[a]} ) * ( ${flowy[a+1]} + ${flowy[a]} ) ) / 2")
As long as flowx and flowy are standard integer-indexed arrays rather than associative arrays, you don't even need to use $(( )) when indexing into them (or $ operators inside those indices), as the index of a nonassociative array in bash is a math context by default.
Or, more readably than all these nested parens, use dc (here, configured with 10 digits of precision):
s=$(dc <<EOF
10 k
${flowx[a+1]}
${flowx[a]}
-
${flowy[a+1]}
${flowy[a]}
+
*
$s +
2 /
p
EOF
)
See? Much more readable.
bc, which... well, yeah. Usebc, don't use$(( )). Since you already know thatbcexists, and that it can do floating-point math, how is this a question?dcgives you true arbitrary-precision math rather than the compromises inherent in IEEE floating-point. It's actually more accurate (if asked to be) than what awk/perl/python/ruby/etc. do out-of-the-box with floats.