Better explanation of bc

This commit is contained in:
David Doblas Jiménez 2023-05-07 16:00:41 +02:00
parent 9499420af9
commit b6a9d83cf3
1 changed files with 1 additions and 1 deletions

View File

@ -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