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

Cmplx division by 0 and NaN #20

Closed
rust-highfive opened this issue Nov 2, 2014 · 2 comments
Closed

Cmplx division by 0 and NaN #20

rust-highfive opened this issue Nov 2, 2014 · 2 comments

Comments

@rust-highfive
Copy link

Issue by huonw
Friday Apr 05, 2013 at 08:26 GMT

For earlier discussion, see rust-lang/rust#5736

This issue was labelled with: A-libs, B-RFC, I-wrong in the Rust repository


Should 1/(0+0i) be NaN+NaN i or fail, or something else.

see also #1284

@ghost
Copy link

ghost commented Jun 19, 2015

There isn't much consensus among other languages:

  • C++ and Racket agree when dividing by ±0.0±0.0i, but they differ when dividing by ±inf±infi.
  • Python rejects division by ±0.0±0.0i, gives NaN+NaNi when dividing by a complex number where both components are infinite, and gives ±0.0±0.0i when dividing by a complex number with exactly one infinite component.
  • Julia gives NaN+NaNi when dividing by ±0.0±0.0i and gives ±0.0±0.0i when dividing by a complex number where one or both of the components is infinite.

@cuviper
Copy link
Member

cuviper commented Dec 19, 2017

This issue was moved to rust-num/num-complex#5

@cuviper cuviper closed this as completed Dec 19, 2017
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