We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
md5: 90fff27aa26c010ed376b88af6f68045
relates to:
Issue Description:
Consider the following behavior of Double:
Double
let x = Double.leastNonzeroMagnitude print(Double(sign: .plus, exponent: -10, significand: x)) // 0.0 let y = Double.greatestFiniteMagnitude print(Double(sign: .plus, exponent: 10, significand: y)) // inf
Unfortunately, Decimal does not consider what happens when exponents are incremented out of range, and the result is dramatically wrong:
Decimal
import Foundation let a = Decimal.leastNonzeroMagnitude print(Decimal(sign: .plus, exponent: -10, significand: a)) // 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 let b = Decimal.greatestFiniteMagnitude print(Decimal(sign: .plus, exponent: 10, significand: b)) // 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000340282366920938463463374607431768211455
The text was updated successfully, but these errors were encountered:
#3068
Sorry, something went wrong.
xwu
No branches or pull requests
Additional Detail from JIRA
md5: 90fff27aa26c010ed376b88af6f68045
relates to:
Issue Description:
Consider the following behavior of
Double
:Unfortunately,
Decimal
does not consider what happens when exponents are incremented out of range, and the result is dramatically wrong:The text was updated successfully, but these errors were encountered: