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
[Experimental] Replace FloatingPoint Formatter and add support Float80 #151
Conversation
Support `Float80` as `ScalarConstructible` and `ScalarRepresentable`.
Since `swift_decompose_float80()` does not exists on Swift 4.1 or earlier.
d7f531b
to
e829e15
Compare
Not only on Linux, but also Apple Platforms… |
…_t' (aka 'unsigned long long') to 'uint32_t' (aka 'unsigned int')
13b9dff
to
3ea8001
Compare
I am not sure if we should adopt this. Pros:
Cons:
|
Agreed 😄 |
This was really cool. I'm sad to see it go :/ |
I will leave the branch for the time being. :) |
filed a request as SR-9610 to exporting |
It seems that "Swift Evolution Process" is necessary to realize that. But for me it feels that it requires too much effort. 🤔 |
Would it be an option to add Float80 support to NumberFormatter instead? |
I don't think |
I'm curious, other than being spec compliant with the YAML specification, is there a real world motivation for supporting Float80? |
No. |
opened #152 for indicating current formatting results. |
|
Oops!: Correct link is here. |
It's really just a difference of significant digits printed -1.79769313486232e+308
-2.2250738585072e-308
+1.7976931348623157e+308
+2.2250738585072014e-308 I guess if you're doing Yams for scientific computing (which is also basically the only reason to use Float80), then SwiftDtoa's implementation would be slightly better. I just don't think it's worth the extra complexity personally. |
👍 Let's forget this until |
SwiftDtoa.(h|cpp)
for formattingFloatingPoint
intoString
Float80
asScalarConstructible
andScalarRepresentable
On Linux,SupportingFloat80
requires Swift 4.2+, sinceswift_decompose_float80()
does not exists on Swift 4.1 or earlier.Is this a good opportunity to drop supporting Swift 4.0/4.1?