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
[C++] Can divide (optionally?) return Inf when dividing by integer 0? #29427
Comments
Eduardo Ponce / @edponce: |
Antoine Pitrou / @pitrou: |
Joris Van den Bossche / @jorisvandenbossche: Note that 0/0 will then give NaN. I don't know the details of R integers, but can they also contain NaN? |
Neal Richardson / @nealrichardson: |
Joris Van den Bossche / @jorisvandenbossche: BTW, also in pandas/numpy, division of integers results in float typed array. |
Neal Richardson / @nealrichardson: I'll rewrite the issue to change how R handles |
Neal Richardson / @nealrichardson: |
See also ARROW-13800. In R, both integer and float division by 0 results in Inf. Maybe that only makes sense because of how R finesses the difference between integer and float. But it would be nice if there were a way to achieve this behavior instead of failing with an error. (Or maybe that's the behavior we support: if you get an error, cast to float and retry?)
Reporter: Neal Richardson / @nealrichardson
Related issues:
Note: This issue was originally created as ARROW-13801. Please see the migration documentation for further details.
The text was updated successfully, but these errors were encountered: