You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The FloatingPoint protocol is flexible enough to allow radix-10 storage. (BinaryFloatingPoint has the radix-2-specific parts.) Decimal isn't-a FloatingPoint, though its public interface shares a great deal of similarity with FloatingPoint. It even implements parts of FloatingPoint which make no sense on their own, like "isInfinite" and "isSignalingNaN".
It looks like FloatingPoint conformance was the plan:
Foundation.Decimal cannot conform to FloatingPoint because its semantics are penned in by choices that predate Swift (and predate the IEEE 754 Decimal formats). It mirrors the FloatingPoint protocol where possible, but that's the best it can do.
Can the error messages at least be changed to not say "does not yet fully adopt FloatingPoint", if that isn't actually the plan?
It's awfully misleading for an API to "mirror" an existing protocol, but not implement it fully, or correctly, or compatibly – and make it sound like it will conform someday.
Additional Detail from JIRA
md5: d1384030a82997f828586050fabcfc76
Issue Description:
The FloatingPoint protocol is flexible enough to allow radix-10 storage. (BinaryFloatingPoint has the radix-2-specific parts.) Decimal isn't-a FloatingPoint, though its public interface shares a great deal of similarity with FloatingPoint. It even implements parts of FloatingPoint which make no sense on their own, like "isInfinite" and "isSignalingNaN".
It looks like FloatingPoint conformance was the plan:
I see a few bug reports for individual pieces of this (like SR-8173), but nothing for the whole shebang.
The text was updated successfully, but these errors were encountered: