Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by NooneAtAll3

11 hours ago

for arbitrary complex values sqrt() gives 2 answers with +- signs

so sqrt(square(-i)) = +-i, one of which is x

2 comments

NooneAtAll3

Reply

syockit  10 hours ago

I've never seen a CAS that gives two answers for sqrt. Mathematica doesn't, sympy doesn't, and IIRC Maxima also doesn't.

Armisael16  8 hours ago

The sqrt function returns the principle square root, not both. That’s true for all numbers, positive, negative, and complex alike.

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities