diff options
| author | LemonBoy <thatlemon@gmail.com> | 2021-04-11 21:27:39 +0200 |
|---|---|---|
| committer | LemonBoy <thatlemon@gmail.com> | 2021-04-11 21:27:39 +0200 |
| commit | 44f8ce690ddd406fc1a9caa63d9c0741f4afb3a0 (patch) | |
| tree | bf5dfad2c0a52184f6e1e9ccea51362cf718c9be /test | |
| parent | 8d94dc625b34832af0e85c16fe4d64ee19c2e74e (diff) | |
| download | zig-44f8ce690ddd406fc1a9caa63d9c0741f4afb3a0.tar.gz zig-44f8ce690ddd406fc1a9caa63d9c0741f4afb3a0.zip | |
std: Fix typo in sqrt implementation
The code initializes twice `t` instead of `t1`, leaving the latter
uninitialized. The problem manifested itself by corrupting the LSBs of
the result in unpredictable ways.
Diffstat (limited to 'test')
| -rw-r--r-- | test/stage1/behavior/bugs/920.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/stage1/behavior/bugs/920.zig b/test/stage1/behavior/bugs/920.zig index 10c002f6ba..72854956a1 100644 --- a/test/stage1/behavior/bugs/920.zig +++ b/test/stage1/behavior/bugs/920.zig @@ -60,6 +60,6 @@ test "bug 920 fixed" { }; for (NormalDist1.f) |_, i| { - std.testing.expect(NormalDist1.f[i] == NormalDist.f[i]); + std.testing.expectEqual(NormalDist1.f[i], NormalDist.f[i]); } } |
