Skip to content

Change "%" op from integer to floating point #9

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
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CoeusCC
Copy link

@CoeusCC CoeusCC commented May 7, 2020

Details are in issue #8.

If accepted, users who are expecting {"%": [10.5, 2]} to result in 1 instead of 0.5 will be unhappy. Hence some might consider this a breaking change instead of a bugfix. JavaScript users are already receiving float modulo values, so this would align JS and PHP in terms of features.

An alternative would be to make two new ops for intmod and floatmod for explicit behaviors.

Details are in issue jwadhams#8.

If accepted, users who are expecting `{"%": [10.5, 2]}` to result in 1 instead of 0.5 will be unhappy. Hence some might consider this a breaking change instead of a bugfix. JavaScript users are already receiving float modulo values, so this would align JS and PHP in terms of features.

An alternative would be to make two new ops for `intmod` and `floatmod` for explicit behaviors.
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.

1 participant