Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different error messages for sqrt(-1) and sqrt(-1.0) #5815

Closed
prcastro opened this issue Feb 14, 2014 · 1 comment
Closed

Different error messages for sqrt(-1) and sqrt(-1.0) #5815

prcastro opened this issue Feb 14, 2014 · 1 comment

Comments

@prcastro
Copy link
Contributor

Is it a bug? (I'm on Julia 0.3.0-prerelease+1419)

julia> sqrt(-1)
ERROR: DomainError

julia> sqrt(-1.0)
ERROR: DomainError
sqrt will only return a complex result if called with a complex argument.
try sqrt(complex(x))
 in sqrt at math.jl:277
@JeffBezanson
Copy link
Member

This turns out to be due to #5354.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants