by tromp · 2y ago · 0 comments
$ bc -l
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software
Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
9999999999999999.0 - 9999999999999998.0
1.0function calc2 { if [ $# -eq 0 ]; then echo 'pass commands for math evaluation, like calc l(2^32/17) + 3'; fi; echo $* | bc -l; }
= () { printf "%'.f\n" $(echo $1 | bc); }; alias calc==
It also gives the math result here of course.
% dc
9999999999999999.0 9999999999999998.0 - p
1.0
%