-
Notifications
You must be signed in to change notification settings - Fork 145
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
The future is now #136
The future is now #136
Conversation
Add Real conformance for Float16.
These cases expose a bug in the current implementation; because the split of the exponent into high and low parts may produce numbers with different signs, if both parts overflow or underflow, we can end up with 0 * infinity = NaN, when the result should actually be either zero or infinity.
Just-added tests expose this issue, where the split of n into high/low parts could produce parts with different signs. If both x**high and x**low then overflow and underflow, the resulting computation would be 0*inf (or inf*0) and produce NaN instead of either zero or infinity.
Somewhat better implementation of pow(x,n) for Float16.
Make 'Complex' differentiable.
build: add initial CMake based build system
This isn't actually quite the right check; what we really want is to use availability on Darwin platforms, but swift version on other platforms (that don't have the standard library in an SDK). But there's no good way to do that, so we simply make it unconditionally unavailable for earlier versions of Swift.
@compnerd Can you sanity-check the windows build with this? |
@stephentyrone sure, I'll check it tomorrow. |
This seems to have caused some issues on Windows, specifically in the tests:
|
Fixed the build issue with #137. That uncovers a few failures:
|
Ok, I'll relax the tolerances for these tests on Windows for now. |
Merge the experimental 5.3 feature branch into master, behind a Swift version check.
This makes Swift Numerics extensions for Float16 available if the following criteria are satisfied:
This also adds a Swift version check for differentiable features; they are now only available when using Swift 5.3 or later, while previously they only checked if _Differentiation could be imported.