Closed as duplicate of#42728
Closed as duplicate of#42728
Description
Previous ID | SR-3131 |
Radar | None |
Original Reporter | @lilyball |
Type | Bug |
Status | Resolved |
Resolution | Done |
Environment
Apple Swift version 3.0.1 (swiftlang-800.0.58.6 clang-800.0.42.1)
Target: x86_64-apple-macosx10.9
Additional Detail from JIRA
Votes | 0 |
Component/s | Standard Library |
Labels | Bug |
Assignee | @tbkka |
Priority | Medium |
md5: 1b1ce68db85995c555c91183810f4d55
duplicates:
Issue Description:
The string representation of a Double
incorrectly uses scientific notation for large integers that are still within the range that can be precisely represented using a Double. This happens at some point between 1 << 49
and 1 << 50
.
Example:
1> Double(1 << 50)
$R0: Double = 1125899906842624
2> Double(1 << 50).ulp
$R1: Double = 0.25
3> print(Double(1 << 50))
1.12589990684262e+15