I see what's going on here. Since the 1990's I've been writing all my shell scripts in KSH. I was first introduced to it on the IBM RS6000. The KSH scripts don't translate too well to BASH. Bash can't handle math equations as easily as KSH (IMHO). At times, the decimal point seems give Bash indigestion.

Forgive me for being bold, but IMHO, KSH is WAY more powerful, intuitive and can handle math MUCH better then BASH.
The content of my post from yesterday was written for KSH.
As you might have heard, my system crashed a few weeks ago. I haven't recovered all of my script files as yet. I'm waiting until I'm comfortable with it before I restore stuff. :^) Once I do, I'll give my take on some of the differences between the two.
NOTE: I actually did start in BASH. However at the time, it could NOT return a variable from a subroutine. I literally had to write the output from the expression to a file and read it back in afterwards. Seemed silly to me.