Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BUG, ENH: Refine Nat checks and division by 0 setting in timedelta division code #17831

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

Open
ganesh-k13 opened this issue Nov 23, 2020 · 0 comments

Comments

@ganesh-k13
Copy link
Member

I would like to take this as a follow-up PR as we need to make two major changes:
For both timedeltas, we need to do this:

else {
if (((in1 > 0) != (in2 > 0)) && (in1 % in2 != 0)) {
*((@div_op_type@ *)op1) = in1/in2 - 1;

But as I mentioned in #17727 (comment), we are truncating instead of flooring. Second being the setting of invalid division.

Originally posted by @ganesh-k13 in #17727 (comment)

Refers: #17727, #16458
CC: @seberg , @mattip, @eric-wieser

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

No branches or pull requests

3 participants