Commit 7f4af266 authored by Sebastian Wolf's avatar Sebastian Wolf

Relaxed accuray for SparseTensor test case

parent b231113d
Pipeline #644 failed with stages
in 3 minutes and 33 seconds
......@@ -62,35 +62,35 @@ static misc::UnitTest sparse_creation("SparseTensor", "Creation", [](){
fullX += fullA;
sparseX += sparseA;
TEST(approx_entrywise_equal(fullX, sparseX, 1e-16));
TEST(approx_entrywise_equal(fullX, sparseX, 1e-13));
fullX -= fullB;
sparseX -= sparseB;
TEST(approx_entrywise_equal(fullX, sparseX, 1e-16));
TEST(approx_entrywise_equal(fullX, sparseX, 1e-13));
fullX = fullA + fullB;
sparseX = sparseA + sparseB;
TEST(approx_entrywise_equal(fullX, sparseX, 1e-16));
TEST(approx_entrywise_equal(fullX, sparseX, 1e-13));
fullX = fullA - fullB;
sparseX = sparseA - sparseB;
TEST(approx_entrywise_equal(fullX, sparseX, 1e-16));
TEST(approx_entrywise_equal(fullX, sparseX, 1e-13));
fullX = 2.0*fullA;
sparseX = 2.0*sparseA;
TEST(approx_entrywise_equal(fullX, sparseX, 1e-16));
TEST(approx_entrywise_equal(fullX, sparseX, 1e-13));
fullX = 10.0*fullA*2;
sparseX = 10.0*sparseA*2;
MTEST(approx_entrywise_equal(fullX, sparseX, 1e-16), std::scientific << frob_norm(fullX-sparseX));
MTEST(approx_entrywise_equal(fullX, sparseX, 1e-13), std::scientific << frob_norm(fullX-sparseX));
fullX = fullA/10.0;
sparseX = sparseA/10.0;
MTEST(approx_entrywise_equal(fullX, sparseX, 1e-16), std::scientific << frob_norm(fullX-sparseX));
MTEST(approx_entrywise_equal(fullX, sparseX, 1e-13), std::scientific << frob_norm(fullX-sparseX));
fullX = 0*fullA + fullB;
sparseX = 0*sparseA + sparseB;
MTEST(approx_entrywise_equal(fullX, sparseX, 1e-16), std::scientific << frob_norm(fullX-sparseX));
MTEST(approx_entrywise_equal(fullX, sparseX, 1e-13), std::scientific << frob_norm(fullX-sparseX));
fullX = 7.3*fullA + fullB*5;
sparseX = 7.3*sparseA + sparseB*5;
......@@ -100,8 +100,8 @@ static misc::UnitTest sparse_creation("SparseTensor", "Creation", [](){
sparseX = 7.9*sparseA/13.7 + sparseB*5;
TEST(approx_entrywise_equal(fullX, sparseX, 1e-13));
TEST(approx_entrywise_equal(fullA, sparseA, 1e-16));
TEST(approx_entrywise_equal(fullB, sparseB, 1e-16));
TEST(approx_entrywise_equal(fullA, sparseA, 1e-13));
TEST(approx_entrywise_equal(fullB, sparseB, 1e-13));
// Two times to be sure
......@@ -115,27 +115,27 @@ static misc::UnitTest sparse_creation("SparseTensor", "Creation", [](){
fullX = fullA + fullB;
sparseX = sparseA + sparseB;
TEST(approx_entrywise_equal(fullX, sparseX, 1e-16));
TEST(approx_entrywise_equal(fullX, sparseX, 1e-13));
fullX = fullA - fullB;
sparseX = sparseA - sparseB;
TEST(approx_entrywise_equal(fullX, sparseX, 1e-16));
TEST(approx_entrywise_equal(fullX, sparseX, 1e-13));
fullX = 2.0*fullA;
sparseX = 2.0*sparseA;
TEST(approx_entrywise_equal(fullX, sparseX, 1e-16));
TEST(approx_entrywise_equal(fullX, sparseX, 1e-13));
fullX = 10.0*fullA*2;
sparseX = 10.0*sparseA*2;
TEST(approx_entrywise_equal(fullX, sparseX, 1e-16));
TEST(approx_entrywise_equal(fullX, sparseX, 1e-13));
fullX = fullA/10.0;
sparseX = sparseA/10.0;
TEST(approx_entrywise_equal(fullX, sparseX, 1e-16));
TEST(approx_entrywise_equal(fullX, sparseX, 1e-13));
fullX = 0*fullA + fullB;
sparseX = 0*sparseA + sparseB;
TEST(approx_entrywise_equal(fullX, sparseX, 1e-16));
TEST(approx_entrywise_equal(fullX, sparseX, 1e-13));
fullX = 7.3*fullA + fullB*5;
sparseX = 7.3*sparseA + sparseB*5;
......@@ -145,6 +145,6 @@ static misc::UnitTest sparse_creation("SparseTensor", "Creation", [](){
sparseX = 7.9*sparseA/13.7 + sparseB*5;
TEST(approx_entrywise_equal(fullX, sparseX, 1e-13));
TEST(approx_entrywise_equal(fullA, sparseA, 1e-16));
TEST(approx_entrywise_equal(fullB, sparseB, 1e-16));
TEST(approx_entrywise_equal(fullA, sparseA, 1e-13));
TEST(approx_entrywise_equal(fullB, sparseB, 1e-13));
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment