cultmath tests: a reference value moved by one ulp fails its sampled-form family through the recorded bits
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
352bf5b27e
commit
84589e0c05
1 changed files with 13 additions and 0 deletions
|
|
@ -685,4 +685,17 @@ public sealed partial class GlslMirrorTests
|
|||
var failures = Judge(device, device).Failures;
|
||||
Assert.Equal(holds ? 0 : DeviceRoutes.Length, failures.Count);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AChangeInTheReferenceBitsOfASampledFormFailsItsFamily()
|
||||
{
|
||||
// One ulp in one reference value stays inside the form's enclosure, so only the recorded bits can see it.
|
||||
var sampled = Array.FindIndex(Families, IsSampledForm);
|
||||
using var faithful = Simulate();
|
||||
Record(faithful);
|
||||
using var moved = Simulate((_, item, words) => item.Index == "ref:" + sampled ? Alter(item, words, w => w + 1u, 1) : words);
|
||||
var failures = Judge(moved, faithful).Failures;
|
||||
Assert.Equal(DeviceRoutes.Length, failures.Count);
|
||||
Assert.All(failures, line => { Assert.Contains($"#{sampled} ", line); Assert.Contains("result bits differ", line); });
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue