Hacker News new | past | comments | ask | show | jobs | submit login

  > ln(-1)
  NaN
  > sqrt(-1)
  NaN
Hmmm...



Would you expect a complex number as an output? I wouldn't, if someone didn't tell me that it supported complex numbers.


From a scientific calculator I would definitely expect complex numbers.


Well, Emacs Calc does (as well as pretty much everything else).


Beyond getting a complex number as output: which complex number? (For example, is `i` or `-i` the correct answer to `sqrt(-1)`? If that seems too easy, how about the correct answer to `sqrt(-i)`?) It would be interesting to see a calculator that handled multi-valued functions properly, but I think that would require some major UI (and possibly even theoretical) advances in order to degenerate gracefully to the single-valued case.


Thank you for the feedback. I'm going to work on this. It is already addressed here: https://github.com/sharkdp/insect/issues/30




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

Search: