File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ final class AugmentedArithmeticTests: XCTestCase {
72
72
var g = SystemRandomNumberGenerator ( )
73
73
let values : [ T ] = ( 0 ..< 100 ) . map { _ in
74
74
T . random (
75
- in: - T . greatestFiniteMagnitude / 2 ..< T . greatestFiniteMagnitude / 2 ,
75
+ in: T . ulpOfOne ..< 1 ,
76
76
using: & g)
77
77
}
78
78
for a in values {
@@ -107,8 +107,8 @@ final class AugmentedArithmeticTests: XCTestCase {
107
107
XCTAssertEqual ( Augmented . sum ( - 1.375 , 0.984375 ) . tail, 0.0 )
108
108
XCTAssertEqual ( Augmented . sum ( - 1.375 , - 0.984375 ) . head, - 2.359375 )
109
109
XCTAssertEqual ( Augmented . sum ( - 1.375 , - 0.984375 ) . tail, 0.0 )
110
- // Must handle cancellation when `b` is entirely unrepresentable in `a`
111
- // and we expect `b` to be lost entirely in the calculation of `a + b`.
110
+ // Must handle cancellation when `b` is not representable in `a` and
111
+ // we expect `b` to be lost entirely in the calculation of `a + b`.
112
112
var a : T = 1.0
113
113
var b : T = . ulpOfOne * . ulpOfOne
114
114
var twoSum = Augmented . sum ( a, b)
You can’t perform that action at this time.
0 commit comments