sqrt -1 gives a complex number, not NaN #64

masak opened this Issue Oct 4, 2011 · 0 comments


None yet
2 participants

masak commented Oct 4, 2011

<masak> perl6: say sqrt -1
<p6eval> pugs, rakudo 545638: OUTPUT«NaN␤»
<p6eval> ..niecza v10-36-g241a2d8: OUTPUT«0+1i␤»
* masak submits nieczabug

This may or may not be spec, but it's been said on the channel many times: complex calculations are opt-in. sqrt -1+0i should give 0+1i as the answer, but sqrt -1 shouldn't.

@sorear sorear closed this in c599e5a Nov 4, 2011

sorear added a commit to perl6/roast that referenced this issue Nov 4, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment