Merge pull request #81464 from AcatXIo/fix-sign-nan
Fix `SIGN(NAN)` returning 1
This commit is contained in:
commit
38ca83e16f
3 changed files with 8 additions and 3 deletions
|
|
@ -54,6 +54,8 @@ TEST_CASE("[Math] C++ macros") {
|
|||
CHECK(SIGN(-5) == -1.0);
|
||||
CHECK(SIGN(0) == 0.0);
|
||||
CHECK(SIGN(5) == 1.0);
|
||||
// Check that SIGN(NAN) returns 0.0.
|
||||
CHECK(SIGN(NAN) == 0.0);
|
||||
}
|
||||
|
||||
TEST_CASE("[Math] Power of two functions") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue