3 ms·
bc is a pretty misleading calculator, without specifying rounding it thinks 2^(40/1.5) is 67108864. It's not even close. If you trust your finances to that, y
by Aardwolf 14y ago
bc is a pretty misleading calculator, without specifying rounding it thinks 2^(40/1.5) is 67108864.
It's not even close.
If you trust your finances to that, you could get in trouble.
- keithpeter 14y agoThe man speaks the truth, but I do get a warning 2.0^(40.0/1.5) Runtime warning (func=(main), adr=18): non-zero scale in exponent 67108864.00000000000000000000 Apparently the ^ function only works with integer powers. The exponential and natural log functions work as expected http://www.johndcook.com/blog/2010/07/14/bc-math-library/ http://www.johndcook.com/blog/2010/07/14/bc-math-library/ keith@xeon4:~$ bc -l e(l(2)*(40.0/1.5)) 106528681.30999083085437360438 nice example.