Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
masak opened this Issue · 0 comments

2 participants

@masak
Collaborator
<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
@sorear sorear referenced this issue from a commit in perl6/roast
@sorear [S32-num/sqrt] Unfudges for sorear/niecza#64 040fce3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.