What you probably want are the rules for ARITHMETIC EXPANSION and ARITHMETIC EVALUATION from the bash man page.
In particular, you need to see the syntax for the let
statement, and its equivalent ((...))
To get you going, start here in man bash:
A compound command is one of the following:
The expression is evaluated according to the rules described below under ARITHMETIC EVALUATION.
If the value of the expression is non-zero, the return status is 0; otherwise the return status
is 1. This is exactly equivalent to let "expression".
Now, bash only produces integer results, so if you really need the floating point result bc is still the way to go, but maybe with a simpler evaluation.
Here is a free example to jump-start you:
CVAR=$(bc <<< "scale=2; 17/3")