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

Feature request: please implement op_mod for Float and Double #1022

Open
gmlewis opened this issue Sep 19, 2024 · 0 comments
Open

Feature request: please implement op_mod for Float and Double #1022

gmlewis opened this issue Sep 19, 2024 · 0 comments
Labels
good first issue Good for newcomers

Comments

@gmlewis
Copy link
Contributor

gmlewis commented Sep 19, 2024

All the integer types implement op_mod but Float and Double do not.

According to this: https://pkg.go.dev/math#Mod

Mod returns the floating-point remainder of x/y. The magnitude of the result is less than y and its sign agrees with that of x.

Special cases are:

Mod(±Inf, y) = NaN
Mod(NaN, y) = NaN
Mod(x, 0) = NaN
Mod(x, ±Inf) = x
Mod(x, NaN) = NaN
@bobzhang bobzhang added the good first issue Good for newcomers label Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants