authorgravatar for hi@viri.moeviri <hi@viri.moe> 2022-04-08 20:13:30-06:00
committergravatar for hi@viri.moeviri <hi@viri.moe> 2022-04-08 20:13:30-06:00
logf9a9e8ba7375a6e4c7e9fa50902a897387212dbb
treeaeb256ec45edf9e892f56d63a11dc7e897f9cdce
parente46c61250332e615afc5aed6e4ebe57b8e6713eb
signature Commit is signed but in an unrecognized format.

std.math.isInf: add tests for +-NaN


1 files changed, 6 insertions(+), 0 deletions(-)

lib/std/math/isinf.zig+6
......@@ -32,6 +32,8 @@ test "math.isInf" {
3232 try expect(!isInf(@as(T, -0.0)));
3333 try expect(isInf(math.inf(T)));
3434 try expect(isInf(-math.inf(T)));
35 try expect(!isInf(math.nan(T)));
36 try expect(!isInf(-math.nan(T)));
3537 }
3638}
3739
......@@ -44,6 +46,8 @@ test "math.isPositiveInf" {
4446 try expect(!isPositiveInf(@as(T, -0.0)));
4547 try expect(isPositiveInf(math.inf(T)));
4648 try expect(!isPositiveInf(-math.inf(T)));
49 try expect(!isInf(math.nan(T)));
50 try expect(!isInf(-math.nan(T)));
4751 }
4852}
4953
......@@ -56,5 +60,7 @@ test "math.isNegativeInf" {
5660 try expect(!isNegativeInf(@as(T, -0.0)));
5761 try expect(!isNegativeInf(math.inf(T)));
5862 try expect(isNegativeInf(-math.inf(T)));
63 try expect(!isInf(math.nan(T)));
64 try expect(!isInf(-math.nan(T)));
5965 }
6066}