@@ -167,13 +167,13 @@ internal func _Float16ToASCII(
167
167
// Step 1: Handle various input cases:
168
168
let binaryExponent : Int
169
169
let significand : Float16 . RawSignificand
170
- let exponentBias = ( 1 << ( Float16 . exponentBitCount - 1 ) ) - 2 ; // 14
170
+ let exponentBias = ( 1 << ( Float16 . exponentBitCount - 1 ) ) - 2 // 14
171
171
if ( f. exponentBitPattern == 0x1f ) { // NaN or Infinity
172
172
if ( f. isInfinite) {
173
173
return _infinity ( buffer: & buffer, sign: f. sign)
174
174
} else { // f.isNaN
175
175
let quietBit =
176
- ( f. significandBitPattern >> ( Float16 . significandBitCount - 1 ) ) & 1 ;
176
+ ( f. significandBitPattern >> ( Float16 . significandBitCount - 1 ) ) & 1
177
177
let payloadMask = UInt16 ( 1 &<< ( Float16 . significandBitCount - 2 ) ) - 1
178
178
let payload16 = f. significandBitPattern & payloadMask
179
179
return nan_details (
@@ -456,7 +456,7 @@ internal func _Float32ToASCII(
456
456
457
457
let binaryExponent : Int
458
458
let significand : Float . RawSignificand
459
- let exponentBias = ( 1 << ( Float . exponentBitCount - 1 ) ) - 2 ; // 126
459
+ let exponentBias = ( 1 << ( Float . exponentBitCount - 1 ) ) - 2 // 126
460
460
if ( f. exponentBitPattern == 0xff ) {
461
461
if ( f. isInfinite) {
462
462
return _infinity ( buffer: & buffer, sign: f. sign)
@@ -615,7 +615,7 @@ internal func _Float32ToASCII(
615
615
}
616
616
let one = UInt64 ( 1 ) << ( 64 - integerBits)
617
617
let lastAccurateBit = UInt64 ( 1 ) << 24
618
- let fractionMask = ( one - 1 ) & ~ ( lastAccurateBit - 1 ) ;
618
+ let fractionMask = ( one - 1 ) & ~ ( lastAccurateBit - 1 )
619
619
let oneHalf = one >> 1
620
620
var lastDigit = unsafe buffer. unsafeLoad (
621
621
fromUncheckedByteOffset: nextDigit &- 1 ,
@@ -698,7 +698,7 @@ internal func _Float64ToASCII(
698
698
//
699
699
let binaryExponent : Int
700
700
let significand : Double . RawSignificand
701
- let exponentBias = ( 1 << ( Double . exponentBitCount - 1 ) ) - 2 ; // 1022
701
+ let exponentBias = ( 1 << ( Double . exponentBitCount - 1 ) ) - 2 // 1022
702
702
703
703
if ( d. exponentBitPattern == 0x7ff ) {
704
704
if ( d. isInfinite) {
@@ -1040,7 +1040,7 @@ internal func _Float64ToASCII(
1040
1040
// >90% of random binary64 values need at least 15 digits.
1041
1041
// We have seven so there's probably at least 8 more, which
1042
1042
// we can grab all at once.
1043
- let TenToTheEighth = 100000000 as UInt128 ; // 10^(15-bulkFirstDigits)
1043
+ let TenToTheEighth = 100000000 as UInt128 // 10^(15-bulkFirstDigits)
1044
1044
let d0 = delta * TenToTheEighth
1045
1045
var t0 = t * TenToTheEighth
1046
1046
// The integer part of t0 is the next 8 digits
@@ -1091,8 +1091,8 @@ internal func _Float64ToASCII(
1091
1091
truncatingIfNeeded: t >> ( 64 - integerBits + adjustIntegerBits) )
1092
1092
1093
1093
let one = UInt64 ( 1 ) << ( 64 - adjustIntegerBits)
1094
- let adjustFractionMask = one - 1 ;
1095
- let oneHalf = one >> 1 ;
1094
+ let adjustFractionMask = one - 1
1095
+ let oneHalf = one >> 1
1096
1096
if deltaHigh64 >= tHigh64 &+ one {
1097
1097
// The `skew` is the difference between our
1098
1098
// computed digits and the original exact value.
@@ -1203,7 +1203,7 @@ internal func _Float80ToASCII(
1203
1203
let rawSignificand = f. _representation. explicitSignificand
1204
1204
let binaryExponent : Int
1205
1205
let significand : Float80 . RawSignificand
1206
- let exponentBias = ( 1 << ( Float80 . exponentBitCount - 1 ) ) - 2 ; // 16382
1206
+ let exponentBias = ( 1 << ( Float80 . exponentBitCount - 1 ) ) - 2 // 16382
1207
1207
let isBoundary = f. significandBitPattern == 0
1208
1208
if f. exponentBitPattern == 0x7fff { // NaN or Infinity
1209
1209
// 80387 semantics and 80287 semantics differ somewhat;
0 commit comments