| ... | ... | @@ -32,6 +32,8 @@ test "math.isInf" { |
| 32 | 32 | try expect(!isInf(@as(T, -0.0))); |
| 33 | 33 | try expect(isInf(math.inf(T))); |
| 34 | 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 | 46 | try expect(!isPositiveInf(@as(T, -0.0))); |
| 45 | 47 | try expect(isPositiveInf(math.inf(T))); |
| 46 | 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 | 60 | try expect(!isNegativeInf(@as(T, -0.0))); |
| 57 | 61 | try expect(!isNegativeInf(math.inf(T))); |
| 58 | 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 | } |