From b6a9d83cf387b35a00d33b30bfe6d31b47c09526 Mon Sep 17 00:00:00 2001 From: daviddoji Date: Sun, 7 May 2023 16:00:41 +0200 Subject: [PATCH] Better explanation of bc --- bash/grains/grains.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bash/grains/grains.sh b/bash/grains/grains.sh index 9fc364a..00856d4 100644 --- a/bash/grains/grains.sh +++ b/bash/grains/grains.sh @@ -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