3 ms·
I always use bc -l, as it gives more digits in the reply. Also available on macs/linux and most unixes. e.g.: $echo '1/2' | bc 0 $ echo '1/2' | bc -l .50
by acomjean 7y ago
I always use bc -l, as it gives more digits in the reply.
Also available on macs/linux and most unixes.
e.g.:
$echo '1/2' | bc
0
$ echo '1/2' | bc -l
.50000000000000000000
though honestlyI usually just type bc -l you enter into an interactive calculator similar to python.