-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Should sinpi
and cospi
return integers for integer input?
#35820
Comments
I fully agree that |
Changing the type of a function like this would be potentially eligible for a minor release, but we'd have to run PkgEval to see if there's any negative fallout in the ecosystem. If there aren't any problems, then we could potentially change it before 2.0. |
@StefanKarpinski would you mind to run PkgEval on #35823, please? Thanks! |
I will once it passes its own tests. PkgEval is pretty expensive. |
Yes, sorry, I made an embarrassing sign error before. 🙈 The doctest failure now should be unrelated though. |
Rejected in #35823 |
I think returning floating point numbers for integer inputs doesn't make much sense, since the results are always integer.
sinpi
is especially weird, since it returns differently signed zeros for positive and negative integer inputs. In #33341, it was also discussed thatcospi
is actually the inverse ofsignbit
, in which case integer output would also make a lot more sense. Is there a particular reason for the current behavior? Changing the output type might be too breaking for a minor release, but it would at least make sense to reconsider for 2.0.The text was updated successfully, but these errors were encountered: