Better explanation of bc
This commit is contained in:
parent
9499420af9
commit
b6a9d83cf3
|
@ -23,7 +23,7 @@ then
|
|||
do
|
||||
grains_on_square=$(echo "2^($square-1)" | bc)
|
||||
|
||||
# use floating point arithmetic (bc)
|
||||
# use arbitrary precision arithmetic using basic calculator (bc)
|
||||
total_grains=$(echo "$total_grains + $grains_on_square" | bc)
|
||||
done
|
||||
echo $total_grains
|
||||
|
|
Loading…
Reference in New Issue