| ... | @@ -32,6 +32,8 @@ test "math.isInf" { | ... | @@ -32,6 +32,8 @@ test "math.isInf" { |
| 32 | try expect(!isInf(@as(T, -0.0))); | 32 | try expect(!isInf(@as(T, -0.0))); |
| 33 | try expect(isInf(math.inf(T))); | 33 | try expect(isInf(math.inf(T))); |
| 34 | try expect(isInf(-math.inf(T))); | 34 | try expect(isInf(-math.inf(T))); |
| | 35 | try expect(!isInf(math.nan(T))); |
| | 36 | try expect(!isInf(-math.nan(T))); |
| 35 | } | 37 | } |
| 36 | } | 38 | } |
| 37 | | 39 | |
| ... | @@ -44,6 +46,8 @@ test "math.isPositiveInf" { | ... | @@ -44,6 +46,8 @@ test "math.isPositiveInf" { |
| 44 | try expect(!isPositiveInf(@as(T, -0.0))); | 46 | try expect(!isPositiveInf(@as(T, -0.0))); |
| 45 | try expect(isPositiveInf(math.inf(T))); | 47 | try expect(isPositiveInf(math.inf(T))); |
| 46 | try expect(!isPositiveInf(-math.inf(T))); | 48 | try expect(!isPositiveInf(-math.inf(T))); |
| | 49 | try expect(!isInf(math.nan(T))); |
| | 50 | try expect(!isInf(-math.nan(T))); |
| 47 | } | 51 | } |
| 48 | } | 52 | } |
| 49 | | 53 | |
| ... | @@ -56,5 +60,7 @@ test "math.isNegativeInf" { | ... | @@ -56,5 +60,7 @@ test "math.isNegativeInf" { |
| 56 | try expect(!isNegativeInf(@as(T, -0.0))); | 60 | try expect(!isNegativeInf(@as(T, -0.0))); |
| 57 | try expect(!isNegativeInf(math.inf(T))); | 61 | try expect(!isNegativeInf(math.inf(T))); |
| 58 | try expect(isNegativeInf(-math.inf(T))); | 62 | try expect(isNegativeInf(-math.inf(T))); |
| | 63 | try expect(!isInf(math.nan(T))); |
| | 64 | try expect(!isInf(-math.nan(T))); |
| 59 | } | 65 | } |
| 60 | } | 66 | } |