Skip to content

Commit

Permalink
wgsl: Add AbstractFloat mix execution tests
Browse files Browse the repository at this point in the history
Fixes #2566
  • Loading branch information
zoddicus committed Dec 6, 2023
1 parent db5a341 commit 5249a6d
Show file tree
Hide file tree
Showing 7 changed files with 246 additions and 127 deletions.
180 changes: 90 additions & 90 deletions src/resources/cache/hashes.json
Original file line number Diff line number Diff line change
@@ -1,103 +1,103 @@
{
"webgpu/shader/execution/binary/af_addition.bin": "ef2e6c52",
"webgpu/shader/execution/binary/af_addition.bin": "4f0134e8",
"webgpu/shader/execution/binary/af_logical.bin": "9ec85311",
"webgpu/shader/execution/binary/af_division.bin": "a7515906",
"webgpu/shader/execution/binary/af_matrix_addition.bin": "a0b28824",
"webgpu/shader/execution/binary/af_matrix_subtraction.bin": "e1dfeda9",
"webgpu/shader/execution/binary/af_multiplication.bin": "987f3e68",
"webgpu/shader/execution/binary/af_remainder.bin": "99d87052",
"webgpu/shader/execution/binary/af_subtraction.bin": "79a4fd72",
"webgpu/shader/execution/binary/f16_addition.bin": "20eb9391",
"webgpu/shader/execution/binary/af_division.bin": "4bfcbec9",
"webgpu/shader/execution/binary/af_matrix_addition.bin": "dd27b536",
"webgpu/shader/execution/binary/af_matrix_subtraction.bin": "72a0e5a8",
"webgpu/shader/execution/binary/af_multiplication.bin": "9e6d4fb8",
"webgpu/shader/execution/binary/af_remainder.bin": "5b84342d",
"webgpu/shader/execution/binary/af_subtraction.bin": "31bb871f",
"webgpu/shader/execution/binary/f16_addition.bin": "eb04a3c7",
"webgpu/shader/execution/binary/f16_logical.bin": "1edd08ec",
"webgpu/shader/execution/binary/f16_division.bin": "f136d2b0",
"webgpu/shader/execution/binary/f16_matrix_addition.bin": "987ba3a4",
"webgpu/shader/execution/binary/f16_matrix_matrix_multiplication.bin": "7ec8fc89",
"webgpu/shader/execution/binary/f16_matrix_scalar_multiplication.bin": "2c1b19cd",
"webgpu/shader/execution/binary/f16_matrix_subtraction.bin": "e7d23d12",
"webgpu/shader/execution/binary/f16_matrix_vector_multiplication.bin": "204bd09d",
"webgpu/shader/execution/binary/f16_multiplication.bin": "1dc5ca6e",
"webgpu/shader/execution/binary/f16_remainder.bin": "3c5b4d78",
"webgpu/shader/execution/binary/f16_subtraction.bin": "9713b267",
"webgpu/shader/execution/binary/f32_addition.bin": "8bf95f9f",
"webgpu/shader/execution/binary/f16_division.bin": "bf28d64b",
"webgpu/shader/execution/binary/f16_matrix_addition.bin": "b76629c",
"webgpu/shader/execution/binary/f16_matrix_matrix_multiplication.bin": "bd494c5e",
"webgpu/shader/execution/binary/f16_matrix_scalar_multiplication.bin": "92dc0420",
"webgpu/shader/execution/binary/f16_matrix_subtraction.bin": "a865820c",
"webgpu/shader/execution/binary/f16_matrix_vector_multiplication.bin": "dacd3978",
"webgpu/shader/execution/binary/f16_multiplication.bin": "2d5e7dbb",
"webgpu/shader/execution/binary/f16_remainder.bin": "ff900ec6",
"webgpu/shader/execution/binary/f16_subtraction.bin": "b55e7368",
"webgpu/shader/execution/binary/f32_addition.bin": "6f09c45b",
"webgpu/shader/execution/binary/f32_logical.bin": "fab7cfc5",
"webgpu/shader/execution/binary/f32_division.bin": "fa35e1e4",
"webgpu/shader/execution/binary/f32_matrix_addition.bin": "6abc60ef",
"webgpu/shader/execution/binary/f32_matrix_matrix_multiplication.bin": "1159a712",
"webgpu/shader/execution/binary/f32_matrix_scalar_multiplication.bin": "526fd220",
"webgpu/shader/execution/binary/f32_matrix_subtraction.bin": "ed8070dc",
"webgpu/shader/execution/binary/f32_matrix_vector_multiplication.bin": "46fc1443",
"webgpu/shader/execution/binary/f32_multiplication.bin": "9addc574",
"webgpu/shader/execution/binary/f32_remainder.bin": "42036b80",
"webgpu/shader/execution/binary/f32_subtraction.bin": "4c59d220",
"webgpu/shader/execution/binary/f32_division.bin": "2fb92572",
"webgpu/shader/execution/binary/f32_matrix_addition.bin": "3d32579f",
"webgpu/shader/execution/binary/f32_matrix_matrix_multiplication.bin": "53976f7c",
"webgpu/shader/execution/binary/f32_matrix_scalar_multiplication.bin": "ec364c1f",
"webgpu/shader/execution/binary/f32_matrix_subtraction.bin": "73cb986a",
"webgpu/shader/execution/binary/f32_matrix_vector_multiplication.bin": "c5dc1886",
"webgpu/shader/execution/binary/f32_multiplication.bin": "14006432",
"webgpu/shader/execution/binary/f32_remainder.bin": "4ccade04",
"webgpu/shader/execution/binary/f32_subtraction.bin": "cc23c7f8",
"webgpu/shader/execution/binary/i32_arithmetic.bin": "de93ee2a",
"webgpu/shader/execution/binary/i32_comparison.bin": "aaa1f21b",
"webgpu/shader/execution/binary/u32_arithmetic.bin": "d79a1011",
"webgpu/shader/execution/binary/u32_comparison.bin": "31764c75",
"webgpu/shader/execution/abs.bin": "577dee57",
"webgpu/shader/execution/acos.bin": "ed466b32",
"webgpu/shader/execution/acosh.bin": "7adc8bad",
"webgpu/shader/execution/asin.bin": "7bc9c6e9",
"webgpu/shader/execution/asinh.bin": "fe44149e",
"webgpu/shader/execution/atan.bin": "7af58326",
"webgpu/shader/execution/atan2.bin": "42d48544",
"webgpu/shader/execution/atanh.bin": "f2c05b30",
"webgpu/shader/execution/bitcast.bin": "33d212e1",
"webgpu/shader/execution/ceil.bin": "b3340e1b",
"webgpu/shader/execution/clamp.bin": "f6b1d6ec",
"webgpu/shader/execution/cos.bin": "d4c8dd2",
"webgpu/shader/execution/cosh.bin": "185ef65d",
"webgpu/shader/execution/cross.bin": "d0e3225c",
"webgpu/shader/execution/degrees.bin": "33ebf864",
"webgpu/shader/execution/determinant.bin": "c31a56ae",
"webgpu/shader/execution/distance.bin": "24c3253b",
"webgpu/shader/execution/dot.bin": "ed4fe8e4",
"webgpu/shader/execution/exp.bin": "66daa4b6",
"webgpu/shader/execution/exp2.bin": "24a2e1f2",
"webgpu/shader/execution/faceForward.bin": "93729f6f",
"webgpu/shader/execution/floor.bin": "d96954f3",
"webgpu/shader/execution/fma.bin": "825a9c10",
"webgpu/shader/execution/fract.bin": "d9d50930",
"webgpu/shader/execution/frexp.bin": "6554c8fe",
"webgpu/shader/execution/inverseSqrt.bin": "2b3ae150",
"webgpu/shader/execution/ldexp.bin": "b95be1b4",
"webgpu/shader/execution/length.bin": "c4143cf3",
"webgpu/shader/execution/log.bin": "ed9abbeb",
"webgpu/shader/execution/log2.bin": "7eeeb86a",
"webgpu/shader/execution/max.bin": "fd2d1e1",
"webgpu/shader/execution/min.bin": "d72b80c3",
"webgpu/shader/execution/mix.bin": "873ad84",
"webgpu/shader/execution/modf.bin": "425bf01a",
"webgpu/shader/execution/normalize.bin": "94da2f1",
"webgpu/shader/execution/abs.bin": "b38f9878",
"webgpu/shader/execution/acos.bin": "6851186b",
"webgpu/shader/execution/acosh.bin": "69f0d6f6",
"webgpu/shader/execution/asin.bin": "f6337ca",
"webgpu/shader/execution/asinh.bin": "8a145ae2",
"webgpu/shader/execution/atan.bin": "76ef1432",
"webgpu/shader/execution/atan2.bin": "297f844",
"webgpu/shader/execution/atanh.bin": "3f66e6d5",
"webgpu/shader/execution/bitcast.bin": "26f042fe",
"webgpu/shader/execution/ceil.bin": "caaee454",
"webgpu/shader/execution/clamp.bin": "23e0c149",
"webgpu/shader/execution/cos.bin": "aecdabda",
"webgpu/shader/execution/cosh.bin": "176694d4",
"webgpu/shader/execution/cross.bin": "e1fe892d",
"webgpu/shader/execution/degrees.bin": "263af760",
"webgpu/shader/execution/determinant.bin": "1c28aa40",
"webgpu/shader/execution/distance.bin": "6219c343",
"webgpu/shader/execution/dot.bin": "473c8887",
"webgpu/shader/execution/exp.bin": "5d8ea0ab",
"webgpu/shader/execution/exp2.bin": "663d6987",
"webgpu/shader/execution/faceForward.bin": "fd9f1fe5",
"webgpu/shader/execution/floor.bin": "ba732b0a",
"webgpu/shader/execution/fma.bin": "5449f726",
"webgpu/shader/execution/fract.bin": "f2d1ccb7",
"webgpu/shader/execution/frexp.bin": "3652c8a8",
"webgpu/shader/execution/inverseSqrt.bin": "d9fd0a8d",
"webgpu/shader/execution/ldexp.bin": "ef6af9e7",
"webgpu/shader/execution/length.bin": "9e0a2f7c",
"webgpu/shader/execution/log.bin": "12c41f51",
"webgpu/shader/execution/log2.bin": "8b32ed52",
"webgpu/shader/execution/max.bin": "b835bcbf",
"webgpu/shader/execution/min.bin": "f4b2e4f7",
"webgpu/shader/execution/mix.bin": "e9ff465c",
"webgpu/shader/execution/modf.bin": "7a15cf03",
"webgpu/shader/execution/normalize.bin": "54754b8c",
"webgpu/shader/execution/pack2x16float.bin": "b2cb12ea",
"webgpu/shader/execution/pow.bin": "283fdf05",
"webgpu/shader/execution/quantizeToF16.bin": "9a2fec0f",
"webgpu/shader/execution/radians.bin": "59fb817f",
"webgpu/shader/execution/reflect.bin": "dabab238",
"webgpu/shader/execution/refract.bin": "2176b8d",
"webgpu/shader/execution/round.bin": "43ec28fa",
"webgpu/shader/execution/saturate.bin": "52651163",
"webgpu/shader/execution/sign.bin": "89359702",
"webgpu/shader/execution/sin.bin": "1293fbfa",
"webgpu/shader/execution/sinh.bin": "40db9438",
"webgpu/shader/execution/smoothstep.bin": "772e5995",
"webgpu/shader/execution/sqrt.bin": "2b5a76f3",
"webgpu/shader/execution/step.bin": "99e65004",
"webgpu/shader/execution/tan.bin": "70b5d606",
"webgpu/shader/execution/tanh.bin": "799c055b",
"webgpu/shader/execution/transpose.bin": "f3743953",
"webgpu/shader/execution/trunc.bin": "a36d377e",
"webgpu/shader/execution/unpack2x16float.bin": "be592d50",
"webgpu/shader/execution/unpack2x16snorm.bin": "a4e9e980",
"webgpu/shader/execution/unpack2x16unorm.bin": "815f6f9d",
"webgpu/shader/execution/unpack4x8snorm.bin": "f21aa9f5",
"webgpu/shader/execution/unpack4x8unorm.bin": "828a5a9d",
"webgpu/shader/execution/unary/af_arithmetic.bin": "b01d807",
"webgpu/shader/execution/unary/af_assignment.bin": "ad9d8886",
"webgpu/shader/execution/pow.bin": "70ab3e4f",
"webgpu/shader/execution/quantizeToF16.bin": "67a81bfd",
"webgpu/shader/execution/radians.bin": "8f304b7a",
"webgpu/shader/execution/reflect.bin": "d553c68d",
"webgpu/shader/execution/refract.bin": "4504fe94",
"webgpu/shader/execution/round.bin": "d6a89955",
"webgpu/shader/execution/saturate.bin": "b1b46d2c",
"webgpu/shader/execution/sign.bin": "cb77a628",
"webgpu/shader/execution/sin.bin": "cc90972d",
"webgpu/shader/execution/sinh.bin": "e12a2eee",
"webgpu/shader/execution/smoothstep.bin": "76e4a5f6",
"webgpu/shader/execution/sqrt.bin": "36dc2eb3",
"webgpu/shader/execution/step.bin": "12755cbb",
"webgpu/shader/execution/tan.bin": "b0721aa4",
"webgpu/shader/execution/tanh.bin": "4d22c302",
"webgpu/shader/execution/transpose.bin": "2d86fdd",
"webgpu/shader/execution/trunc.bin": "987a6518",
"webgpu/shader/execution/unpack2x16float.bin": "92f5826d",
"webgpu/shader/execution/unpack2x16snorm.bin": "d165c1d",
"webgpu/shader/execution/unpack2x16unorm.bin": "5b3a54bc",
"webgpu/shader/execution/unpack4x8snorm.bin": "64c3c82f",
"webgpu/shader/execution/unpack4x8unorm.bin": "87f6298d",
"webgpu/shader/execution/unary/af_arithmetic.bin": "bc00dcfd",
"webgpu/shader/execution/unary/af_assignment.bin": "c651577e",
"webgpu/shader/execution/unary/bool_conversion.bin": "cb53bf65",
"webgpu/shader/execution/unary/f16_arithmetic.bin": "7129aba5",
"webgpu/shader/execution/unary/f16_conversion.bin": "70cdfaca",
"webgpu/shader/execution/unary/f32_arithmetic.bin": "d94275bc",
"webgpu/shader/execution/unary/f32_conversion.bin": "75b576ba",
"webgpu/shader/execution/unary/f16_arithmetic.bin": "7921b211",
"webgpu/shader/execution/unary/f16_conversion.bin": "609d6be1",
"webgpu/shader/execution/unary/f32_arithmetic.bin": "d13230c9",
"webgpu/shader/execution/unary/f32_conversion.bin": "256035a1",
"webgpu/shader/execution/unary/i32_arithmetic.bin": "d322b73d",
"webgpu/shader/execution/unary/i32_complement.bin": "c4e6cbb",
"webgpu/shader/execution/unary/i32_conversion.bin": "d6905a0f",
Expand Down
Binary file modified src/resources/cache/webgpu/shader/execution/mix.bin
Binary file not shown.
97 changes: 86 additions & 11 deletions src/unittests/floating_point.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5344,13 +5344,16 @@ const kMixImpreciseIntervalCases = {
{ input: [-1.0, 1.0, 0.9], expected: [reinterpretU64AsF64(0x3fe9_9999_8000_0000n), reinterpretU64AsF64(0x3fe9_9999_c000_0000n)] }, // ~0.8

// Showing how precise and imprecise versions diff
// Note that this expectation is 0 only in f32 as 10.0 is much smaller that f32.negative.min,
// So that 10 - f32.negative.min == f32.negative.min even in f64. But for f16, there is not
// a exactly-represenatble f16 value v that make v - f16.negative.min == f16.negative.min
// in f64, in fact that require v being smaller than 2**-37.
// Note that this expectation is 0 in f32 as 10.0 is much smaller that
// f32.negative.min.
// So that 10 - f32.negative.min == -f32.negative.min even in f64.
{ input: [kValue.f32.negative.min, 10.0, 1.0], expected: 0.0 },
// -10.0 is the same, much smaller than f32.negative.min
{ input: [kValue.f32.negative.min, -10.0, 1.0], expected: 0.0 },
{ input: [kValue.f32.negative.min, 10.0, 0.5], expected: 0.0 },
{ input: [kValue.f32.negative.min, -10.0, 0.5], expected: 0.0 },
{ input: [kValue.f32.negative.min, 10.0, 5.0], expected: 0.0 },
{ input: [kValue.f32.negative.min, -10.0, 5.0], expected: 0.0 },
] as ScalarTripleToIntervalCase[],
f16: [
// [0.0, 1.0] cases
Expand All @@ -5376,13 +5379,45 @@ const kMixImpreciseIntervalCases = {
// (y - x) * 1.0, where y = -10 and x = -65504, the result is 65494 rounded to 65472 or 65504.
// The result is -65504 + 65472 = -32 or -65504 + 65504 = 0.
{ input: [kValue.f16.negative.min, -10.0, 1.0], expected: [-32, 0] },
{ input: [kValue.f16.negative.min, 10.0, 0.5], expected: kUnboundedEndpoints },
{ input: [kValue.f16.negative.min, -10.0, 0.5], expected: [-16, 0] },
{ input: [kValue.f16.negative.min, 10.0, 5.0], expected: kUnboundedEndpoints },
{ input: [kValue.f16.negative.min, -10.0, 5.0], expected: [-160, 0] },
] as ScalarTripleToIntervalCase[],
abstract: [
// [0.0, 1.0] cases
{ input: [0.0, 1.0, 0.1], expected: 0.1 },
{ input: [0.0, 1.0, 0.9], expected: 0.9 },
// [1.0, 0.0] cases
{ input: [1.0, 0.0, 0.1], expected: 0.9 },
{ input: [1.0, 0.0, 0.9], expected: kMinusNULPFunctions['abstract'](0.1, 2) }, // This not being 0.1 is related to https://github.com/gpuweb/cts/issues/2993
// [0.0, 10.0] cases
{ input: [0.0, 10.0, 0.1], expected: 1 },
{ input: [0.0, 10.0, 0.9], expected: 9 },
// [2.0, 10.0] cases
{ input: [2.0, 10.0, 0.1], expected: 2.8 },
{ input: [2.0, 10.0, 0.9], expected: 9.2 },
// [-1.0, 1.0] cases
{ input: [-1.0, 1.0, 0.1], expected: -0.8 },
{ input: [-1.0, 1.0, 0.9], expected: 0.8 },

// Showing how precise and imprecise versions diff
// Note that this expectation is 0 in f64 as 10.0 is much smaller that
// f64.negative.min, so that 10 - f64.negative.min == -f64.negative.min
{ input: [kValue.f64.negative.min, 10.0, 1.0], expected: 0.0 },
// -10.0 is the same, much smaller than f64.negative.min
{ input: [kValue.f64.negative.min, -10.0, 1.0], expected: 0.0 },
{ input: [kValue.f64.negative.min, 10.0, 0.5], expected: 0.0 },
{ input: [kValue.f64.negative.min, -10.0, 0.5], expected: 0.0 },
{ input: [kValue.f64.negative.min, 10.0, 5.0], expected: 0.0 },
{ input: [kValue.f64.negative.min, -10.0, 5.0], expected: 0.0 },
] as ScalarTripleToIntervalCase[],
} as const;

g.test('mixImpreciseInterval')
.params(u =>
u
.combine('trait', ['f32', 'f16'] as const)
.combine('trait', ['f32', 'f16', 'abstract'] as const)
.beginSubcases()
.expandWithParams<ScalarTripleToIntervalCase>(p => {
const trait = FP[p.trait];
Expand Down Expand Up @@ -5438,8 +5473,8 @@ g.test('mixImpreciseInterval')
{ input: [0.0, 1.0, constants.positive.infinity], expected: kUnboundedEndpoints },
{ input: [1.0, 0.0, constants.positive.infinity], expected: kUnboundedEndpoints },

// The [negative.min, +/-10.0, 1.0] cases has different result for different trait on
// imprecise version.
// Intermediate OOB
{ input: [1.0, 2.0, trait.oneULP((constants.positive.max / 2)) + (constants.positive.max / 2)], expected: kUnboundedEndpoints },
];
})
)
Expand Down Expand Up @@ -5474,6 +5509,14 @@ const kMixPreciseIntervalCases = {
// [-1.0, 1.0] cases
{ input: [-1.0, 1.0, 0.1], expected: [reinterpretU64AsF64(0xbfe9_9999_c000_0000n), reinterpretU64AsF64(0xbfe9_9999_8000_0000n)] }, // ~-0.8
{ input: [-1.0, 1.0, 0.9], expected: [reinterpretU64AsF64(0x3fe9_9999_8000_0000n), reinterpretU64AsF64(0x3fe9_9999_c000_0000n)] }, // ~0.8

// Showing how precise and imprecise versions diff
{ input: [kValue.f32.negative.min, 10.0, 1.0], expected: 10.0 },
{ input: [kValue.f32.negative.min, -10.0, 1.0], expected: -10.0 },
{ input: [kValue.f32.negative.min, 10.0, 5.0], expected: kUnboundedEndpoints },
{ input: [kValue.f32.negative.min, -10.0, 5.0], expected: kUnboundedEndpoints },
{ input: [kValue.f32.negative.min, 10.0, 0.5], expected: kValue.f32.negative.min/2 },
{ input: [kValue.f32.negative.min, -10.0, 0.5], expected: kValue.f32.negative.min/2 },
] as ScalarTripleToIntervalCase[],
f16: [
// [0.0, 1.0] cases
Expand All @@ -5491,13 +5534,46 @@ const kMixPreciseIntervalCases = {
// [-1.0, 1.0] cases
{ input: [-1.0, 1.0, 0.1], expected: [reinterpretU64AsF64(0xbfe9_a000_0000_0000n), reinterpretU64AsF64(0xbfe9_9800_0000_0000n)] }, // ~-0.8
{ input: [-1.0, 1.0, 0.9], expected: [reinterpretU64AsF64(0x3fe9_9800_0000_0000n), reinterpretU64AsF64(0x3fe9_a000_0000_0000n)] }, // ~0.8

// Showing how precise and imprecise versions diff
{ input: [kValue.f64.negative.min, 10.0, 1.0], expected: 10.0 },
{ input: [kValue.f64.negative.min, -10.0, 1.0], expected: -10.0 },
{ input: [kValue.f64.negative.min, 10.0, 5.0], expected: kUnboundedEndpoints },
{ input: [kValue.f64.negative.min, -10.0, 5.0], expected: kUnboundedEndpoints },
{ input: [kValue.f64.negative.min, 10.0, 0.5], expected: kValue.f64.negative.min/2 },
{ input: [kValue.f64.negative.min, -10.0, 0.5], expected: kValue.f64.negative.min/2 },
] as ScalarTripleToIntervalCase[],
abstract: [
// [0.0, 1.0] cases
{ input: [0.0, 1.0, 0.1], expected: 0.1 },
{ input: [0.0, 1.0, 0.9], expected: 0.9 },
// [1.0, 0.0] cases
{ input: [1.0, 0.0, 0.1], expected: 0.9 },
{ input: [1.0, 0.0, 0.9], expected: kMinusNULPFunctions['abstract'](0.1, 2) }, // This not being 0.1 is related to https://github.com/gpuweb/cts/issues/2993
// [0.0, 10.0] cases
{ input: [0.0, 10.0, 0.1], expected: 1 },
{ input: [0.0, 10.0, 0.9], expected: 9 },
// [2.0, 10.0] cases
{ input: [2.0, 10.0, 0.1], expected: 2.8 },
{ input: [2.0, 10.0, 0.9], expected: 9.2 },
// [-1.0, 1.0] cases
{ input: [-1.0, 1.0, 0.1], expected: -0.8 },
{ input: [-1.0, 1.0, 0.9], expected: 0.8 },

// Showing how precise and imprecise versions diff
{ input: [kValue.f16.negative.min, 10.0, 1.0], expected: 10.0 },
{ input: [kValue.f16.negative.min, -10.0, 1.0], expected: -10.0 },
{ input: [kValue.f16.negative.min, 10.0, 5.0], expected: kUnboundedEndpoints },
{ input: [kValue.f16.negative.min, -10.0, 5.0], expected: kUnboundedEndpoints },
{ input: [kValue.f16.negative.min, 10.0, 0.5], expected: [-32747.0, 0] },
{ input: [kValue.f16.negative.min, -10.0, 0.5], expected: [-32757.0, 0] },
] as ScalarTripleToIntervalCase[],
} as const;

g.test('mixPreciseInterval')
.params(u =>
u
.combine('trait', ['f32', 'f16'] as const)
.combine('trait', ['f32', 'f16', 'abstract'] as const)
.beginSubcases()
.expandWithParams<ScalarTripleToIntervalCase>(p => {
const trait = FP[p.trait];
Expand Down Expand Up @@ -5553,9 +5629,8 @@ g.test('mixPreciseInterval')
{ input: [0.0, 1.0, constants.positive.infinity], expected: kUnboundedEndpoints },
{ input: [1.0, 0.0, constants.positive.infinity], expected: kUnboundedEndpoints },

// Showing how precise and imprecise versions diff
{ input: [constants.negative.min, 10.0, 1.0], expected: 10.0 },
{ input: [constants.negative.min, -10.0, 1.0], expected: -10.0 },
// Intermediate OOB
{ input: [1.0, 2.0, trait.oneULP((constants.positive.max / 2)) + (constants.positive.max / 2)], expected: kUnboundedEndpoints },
];
})
)
Expand Down
Loading

0 comments on commit 5249a6d

Please sign in to comment.