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

[SR-2010] Implement SE-0113: Add integral rounding functions to FloatingPoint #44619

Closed
lattner mannequin opened this issue Jul 7, 2016 · 9 comments
Closed

[SR-2010] Implement SE-0113: Add integral rounding functions to FloatingPoint #44619

lattner mannequin opened this issue Jul 7, 2016 · 9 comments
Assignees
Labels
good first issue Good for newcomers standard library Area: Standard library umbrella task

Comments

@lattner
Copy link
Mannequin

lattner mannequin commented Jul 7, 2016

Previous ID SR-2010
Radar None
Original Reporter @lattner
Type Task
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Task, StarterBug
Assignee @stephentyrone
Priority Medium

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

@lattner
Copy link
Mannequin Author

lattner mannequin commented Jul 7, 2016

@stephentyrone do you plan to tackle this?

@stephentyrone
Copy link
Member

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.

@stephentyrone
Copy link
Member

Assigning this to myself so that it has an owner; if someone else wants to jump on it, however, feel free.

@lattner
Copy link
Mannequin Author

lattner mannequin commented Jul 7, 2016

What do you mean that the importer can't map long double? Long double on X86 should come in as Float80.

@stephentyrone
Copy link
Member

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.

@stephentyrone
Copy link
Member

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.

@stephentyrone
Copy link
Member

#3443

@stephentyrone
Copy link
Member

Merged in 9c08fbf.

@stephentyrone
Copy link
Member

Optimization opportunity: https://bugs.swift.org/browse/SR-2045

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
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 standard library Area: Standard library umbrella task
Projects
None yet
Development

No branches or pull requests

1 participant