Skip to content

Commit d4a440f

Browse files
committed
Update range of random values in test cases
1 parent f6e5563 commit d4a440f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Tests/RealTests/AugmentedArithmeticTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ final class AugmentedArithmeticTests: XCTestCase {
7272
var g = SystemRandomNumberGenerator()
7373
let values: [T] = (0 ..< 100).map { _ in
7474
T.random(
75-
in: -T.greatestFiniteMagnitude/2 ..< T.greatestFiniteMagnitude/2,
75+
in: T.ulpOfOne ..< 1,
7676
using: &g)
7777
}
7878
for a in values {
@@ -107,8 +107,8 @@ final class AugmentedArithmeticTests: XCTestCase {
107107
XCTAssertEqual(Augmented.sum(-1.375, 0.984375).tail, 0.0)
108108
XCTAssertEqual(Augmented.sum(-1.375,-0.984375).head,-2.359375)
109109
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`.
112112
var a: T = 1.0
113113
var b: T = .ulpOfOne * .ulpOfOne
114114
var twoSum = Augmented.sum(a, b)

0 commit comments

Comments
 (0)