-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
[SR-2010] Implement SE-0113: Add integral rounding functions to FloatingPoint #44619
Comments
@stephentyrone do you plan to tackle this? |
I can make some time for it early next week. Providing default implementations will require the new integer stuff, and I'm not sure we have a good way to support Float80 without the importer being able to map long double, but we can add the API to FloatingPoint and wire up Float and Double quickly enough. |
Assigning this to myself so that it has an owner; if someone else wants to jump on it, however, feel free. |
What do you mean that the importer can't map long double? Long double on X86 should come in as Float80. |
I agree that it should, but it doesn't seem to at present; there are some TODOs scattered in swift around this. I filed a radar yesterday when I became aware of the issue. |
Draft implementation (with horrible Float80 workaround) on Github. This is not an optimized implementation by any stretch of the imagination, but should get these working. |
Merged in 9c08fbf. |
Optimization opportunity: https://bugs.swift.org/browse/SR-2045 |
Additional Detail from JIRA
md5: 24ed902defe2791a46ea5c4e09deaf97
Issue Description:
SE-0113 has been accepted, we need an implementation:
https://github.com/apple/swift-evolution/blob/master/proposals/0113-rounding-functions-on-floatingpoint.md
The text was updated successfully, but these errors were encountered: