Skip to content
Snippets Groups Projects
Commit 5ba64b5c authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

Test of precomputed factorial vs tgamma outcommented because tgamma is too...

Test of precomputed factorial vs tgamma outcommented because tgamma is too unprecise under glibc 2.12. Instead, test 150! vs value from Wolfram Alpha.
parent 723b62d3
No related branches found
No related tags found
No related merge requests found
......@@ -19,8 +19,12 @@ TEST_F(PrecomputedTest, Factorial)
EXPECT_DOUBLE_EQ(precomputed.factorial[1], 1.);
EXPECT_DOUBLE_EQ(precomputed.factorial[2], 2.);
EXPECT_DOUBLE_EQ(precomputed.factorial[3], 6.);
/* the following disabled because tgamma is too unprecise under
old versions of glibc (at leat up to 2.12, but less than 2.22)
for( size_t k=4; k<precomputed.factorial.size(); ++k )
EXPECT_NEAR(precomputed.factorial[k], tgamma(k+1.), 12*eps*tgamma(k+1.) );
*/
EXPECT_NEAR(precomputed.factorial[150], 5.71338395644585459e262, 4*eps*precomputed.factorial[150]);
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment