-
Notifications
You must be signed in to change notification settings - Fork 1
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
quotientAndRemainderReportingOverflow(dividingBy:)
#88
Comments
Note: I've had some success playing with the idea of "throwing overflow" vs "reporting overflow", but that's not really a design direction I can entertain without decoupling from the standard library. It might be a fun side project, however. There's a lot of cool stuff you can do with this, especially considering that non-throwing methods can satisfy throwing method requirements. With , hire me. I'm idea rich, but resource poor (。•́︿•̀。) |
Also, I wish the remainder part defaulted to the divisor rather than the dividend. It would be symmetric, in a way, because then I would not have to create some unrelated value in my digit methods (every valid remainder has a smaller magnitude than the divisor). Alternatively, if "reporting overflow" were "throwing" you wouldn't need to produce a junk value. Edit: I suppose defaulting to the dividend makes sense when you consider mutating methods. |
7bcd36f Gotta add this method to ANKSigned too 🥱 |
Requested by (#84) and (#87). The former for performance and the latter for testability.
The text was updated successfully, but these errors were encountered: