-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Cleanup tgmath wrappers. #15304
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
Cleanup tgmath wrappers. #15304
Conversation
stephentyrone
commented
Mar 16, 2018
- Remove special-case gyb logic for lgamma on Darwin; the symbols we need are always present, even if not visible in the headers, so we only need a prototype.
- Add some deprecations for symbols that have direct stdlib analogues.
- Make some operations generic on [Binary]FloatingPoint, where they can map to the protocols instead of calling libm.
- Remove special-case gyb logic for lgamma on Darwin; the symbols we need are always present, even if not visible in the headers, so we only need a prototype. - Add some deprecations for symbols that have direct stdlib analogues. - Make some operations generic on [Binary]FloatingPoint, where they can map to the protocols instead of calling libm.
return (x.significand / 2, Int(x.exponent + 1)) | ||
} | ||
|
||
@available(swift, deprecated: 4.2, message: "Use scalbn<T>(:T,:Int).") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does scalbn
give the same result? If so, then maybe a renamed:
instead of message:
would provide a better developer experience (i.e. fix-it and migration).
UPD: It does look like the implementation for scalbn
is similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, they're identical in actual behavior for every current type. They would behave differently for decimal types, but we don't really want these to be the interfaces going forward anyway.
@swift-ci Please Test Source Compatibility |
@swift-ci please test |
@swift-ci please test |
Build failed |
Build failed |
@swift-ci Please smoke test OS X. |