Skip to content

Commit

Permalink
Relax tolerance on AmericanOption test
Browse files Browse the repository at this point in the history
The test tolerance is very strict and even small changes in floating point
order causes the test to fail (actual error is ~5e-15 rather than required 1e-15).
It is highly unlikely that failure in this case indicates invalid assembly.
This patch allows both AOCC with -O3 -zopt -amdveclib and ICPX with -O3 -xCORE-AVX512
-fp-model=precise to pass.
  • Loading branch information
amd-jadutoit committed May 3, 2024
1 parent 35f1b46 commit fe633cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test-suite/americanoption.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1542,7 +1542,7 @@ BOOST_AUTO_TEST_CASE(testQdEngineStandardExample) {
);
const Real calculated = americanOption.NPV() - europeanOption.NPV();

const Real tol = 1e-15;
const Real tol = 7e-15;
const Real diff = std::abs(calculated - expected[i]);

if (diff > tol) {
Expand Down

0 comments on commit fe633cd

Please sign in to comment.