Skip to content

Conversation

@speeddragon
Copy link
Contributor

This PR fix Ratio.ceil/1 bug when the remainder is 0 it doesn't increase by one, since the comparison is always false. I can remove this code since #99 fixes this also.

This also fixes Ratio.pow/2, when 0 is given, it returns 1 instead of 1 <|> 1.

@Qqwy Qqwy self-requested a review May 27, 2022 15:30
@Qqwy
Copy link
Owner

Qqwy commented May 27, 2022

Thank you very much!

I think it makes sense to keep the fix for Ratio.pow, and use the change to Ratio.ceil from PR #99.
So please remove that part of the code indeed 👍 .

EDIT: I prefer the approach of using rem as it probably is more readable (important) and it will also be a little faster (not super important but a little).

Great to see that you've add an extra example to the (doc)tests as well! Good work! 😄

@Qqwy
Copy link
Owner

Qqwy commented May 27, 2022

😍 Version 3.0.1 which includes this PR has been published.

@speeddragon
Copy link
Contributor Author

Thanks for the fast release.

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

Successfully merging this pull request may close these issues.

2 participants