-
-
Notifications
You must be signed in to change notification settings - Fork 418
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
[RFC 61] Add Modulo Operator (and floored division) #2997
Conversation
and the corresponding checked and partial variants for integers.
also add fldc, fld_unsafe, fld_partial and modc, mod_unsafe, mod_partial
and add unsafe variants
Also i did not implement Also, outside the scope of this RFC, but what about |
Some properties mentioned in the RFC have been verified here (when run against ponyc built from this branch): https://github.com/mfelsche/stdlib-properties/blob/master/stdlib-properties/main.pony#L82-L100 |
@mfelsche RFC includes updates to the tutorial. I don't want to merge this until that is also available as the tutorial changes were part of the RFC that was accepted. |
tutorial PR is here: ponylang/pony-tutorial#347 |
Implementation of RFC 61.
This PR adds the following methods to the number classes hierarchy and adds the implementation to each stdlib implementation (U8, U16, ... I8, I16, ..., F32, F64):
Real
fld
mod
Integer
fld_unsafe
fld_partial
fldc
mod_unsafe
mod_partial
modc
FloatingPoint
fld_unsafe
mod_unsafe