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

Add more tests to divRound with negative numbers #174

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add more tests to divRound with negative numbers #174

wants to merge 1 commit into from

Conversation

axic
Copy link
Contributor

@axic axic commented Feb 2, 2018

No description provided.

@axic
Copy link
Contributor Author

axic commented Feb 2, 2018

These tests actually fail, because contrary to the name, the code seems to be rounding to ceiling. Is it supposed to be like that?

This was my first step at fixing #79. Modified divRound as: a.divRound(b, mode) - rounded division (mode can be set to round (default), floor or ceil)

@dcousens
Copy link
Contributor

dcousens commented Feb 2, 2018

@axic ceiling? or towards 0 for negatives?

@dcousens dcousens added the bug label Feb 2, 2018
@axic
Copy link
Contributor Author

axic commented Feb 2, 2018

Towards zero for negatives.

@dcousens
Copy link
Contributor

dcousens commented Jun 6, 2018

@axic what is left to do here? Do you have time?

@axic
Copy link
Contributor Author

axic commented Jul 17, 2018

I don't particularly have a lot of time, but I guess this PR could be changed to add tests for the current behaviour and update documentation to reflect that.

A separate PR could change behaviour as that is breaking - well, it could be just a bug too, if the document is to be the canon. Any opinions @indutny ?

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

Successfully merging this pull request may close these issues.

None yet

2 participants