Skip to content

Commit

Permalink
w/a mingw-w64 sqrt bug
Browse files Browse the repository at this point in the history
  • Loading branch information
srz-zumix committed Aug 25, 2017
1 parent 7c547e4 commit 49dced6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/floatingpoint_tests.cpp
Expand Up @@ -6,7 +6,7 @@
*
* @author t.shirayanagi
* @par copyright
* Copyright (C) 2012-2016, Takazumi Shirayanagi\n
* Copyright (C) 2012-2017, Takazumi Shirayanagi\n
* This software is released under the new BSD License,
* see LICENSE
*/
Expand Down Expand Up @@ -59,13 +59,17 @@ IUTEST_TYPED_TEST(FloatingpointTest, NINF)
IUTEST_EXPECT_EQ(FloatType(log(b)), TestFixture::ftype::NINF());
}

// MinGW-w64 sqrt bug
// https://sourceforge.net/p/mingw/bugs/2337/
#if !defined(__MINGW64__)
IUTEST_TYPED_TEST(FloatingpointTest, NQNAN)
{
typedef typename TestFixture::ftype FloatType;
TypeParam a=TestFixture::ONE;

IUTEST_EXPECT_EQ(FloatType(sqrt(-a)), TestFixture::ftype::NQNAN());
}
#endif

} // end of namespace floatingpoint_test

Expand Down

0 comments on commit 49dced6

Please sign in to comment.