Skip to content

Commit

Permalink
Fix the completely broken fallback algorithm for `std.math.isInfinity…
Browse files Browse the repository at this point in the history
…()`.
  • Loading branch information
tsbockman committed May 15, 2016
1 parent 21dcf42 commit 9ecb82e
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 9ecb82e

Please sign in to comment.