Skip to content

Commit

Permalink
Merge pull request #4329 from tsbockman/isInfinity_fallback
Browse files Browse the repository at this point in the history
Fix the broken fallback algorithm for `std.math.isInfinity()`
  • Loading branch information
9il committed May 15, 2016
2 parents 8671e88 + 9ecb82e commit 778593d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion std/math.d
Original file line number Diff line number Diff line change
Expand Up @@ -5140,7 +5140,7 @@ bool isInfinity(X)(X x) @nogc @trusted pure nothrow
}
else
{
return (x - 1) == x;
return (x < -X.max) || (X.max < x);
}
}

Expand Down

0 comments on commit 778593d

Please sign in to comment.