Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I did some digging. it was in this thread in a comment about bc and exponents (although I can't use a non rpn calculator on computers I just tend to type the formulas in):

https://news.ycombinator.com/item?id=5054618

a couple of replies to my comment there about exponents. specifically.

"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. "



Ah, thanks for digging that up. I was not aware that they didn't support fractions in exponents; I don't think I had ever tried them for that. Luckily they do give warnings, though only if you have already set the precision (via "bc -l" or something like "10 k" in dc).

Sadly, since dc doesn't have a math library, it looks like you can't use the "e" function workaround unless you implement it yourself.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: