What range were you expecting the answer to be in? In the shell, all you get is integer maths, so anything less than 1 is rounded down to 0.
There is
bc, which is an arbitrary precision calculator. A little fiddly to use, but something like this would work:
Code:
FN_result=$( echo "scale=5; ($target_ppm - $current_ppm) / $target_ppm \
* 8 * $res_gallons "| bc -l)
Here, the echoed string states the required precision (5 d.p.), and then the calculation.
bc can do pretty complex things - the man page is quite comprehensive, and has lots of examples.
However, if you are going to be doing a lot of this sort of thing, I would recommend learning a bit of something like Perl or (shudder!) Python.
Hope this helps,
Rob