math 5/2
returns 2.
I want 2.5 -- how do I get decimal values?
You can "force" math
to return fractions by default -- use the -l
option to bc
:
$ math 5/2
2
$ function bc
command bc -l $argv
end
$ math 5/2
2.50000000000000000000
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With