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
SR-15228 Inconsistent behaviour of Decimal.significand on Darwin and Linux
SR-15134 Decimal.init(sign:exponent:significand:) gives incorrect values when exponent overflow or underflows
Issue Description:
The significand of a floating-point value should never be negative. Decimal, despite mimicking FloatingPoint APIs, returns negative significands for negative values:
import Foundation
letx=-42asDouble
x.significand.sign // pluslety=-42asDecimal
y.significand.sign // minus (!)
This issue was discovering when trying to fix the implementation of Decimal.ulp, where it would have been nice to be able to use this API but for this incorrect sign.
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: 9fe3b53ff06ecf828b17b88ad46a4d30
relates to:
Issue Description:
The significand of a floating-point value should never be negative. Decimal, despite mimicking FloatingPoint APIs, returns negative significands for negative values:
This issue was discovering when trying to fix the implementation of Decimal.ulp, where it would have been nice to be able to use this API but for this incorrect sign.
The text was updated successfully, but these errors were encountered: