-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
Description
Description
When converting 309485009821345068741558271, only 12 digits match.
Reproduction Steps
(double)UInt128.Parse("309485009821345068741558271")
Expected behavior
3.094850098213451E+26
Actual behavior
3.0948500982162654E+26
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
| double lower = BitConverter.UInt64BitsToDouble(TwoPow76Bits | ((ulong)(value >> 12) >> 12) | (value._lower & 0xFFFFFF)) - TwoPow76; |
Please change (value._lower & 0xFFFFFF) to (0u != (value._lower & 0xFFFFFF) ? 1u : 0u)