Ravi Sir's Cards › AWS
$(( )) vs bc
This comparison card contrasts $(( )) and bc. $(( )) is described as built in integers. bc is described as calculator with decimals. The card pairs $(( )) with counters, loops, and bc with money, percentages.
Read card text
What this card says
Maths
$(( ))
Built in integers.
bc
Calculator with decimals.
Key points
Fast, no process.
Set scale for decimals.
Example
echo $((7/2))
Use when
Counters, loops.
Money, percentages.