Skip to content

Commit

Permalink
Try to fix sabsliceinteg test on intel
Browse files Browse the repository at this point in the history
  • Loading branch information
tkittel committed Oct 28, 2024
1 parent 570006a commit 577285e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions tests/src/app_sabsliceinteg/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,15 @@ namespace {
double calc = NC::SABUtils::integrateAlphaInterval(a0,f0, a1, f1 );
double calc_fast = NC::SABUtils::integrateAlphaInterval_fast(a0,f0, a1, f1, std::log(f0), std::log(f1) );
double expect = func_f_defintegral_(a0,a1);
std::cout<<" integrateAlphaInterval : "<<calc<<" vs. "<<calc_fast<<" vs. "<<expect<<" reldiff: "
<<100.0*(calc/expect-1.0)<<"% and "<<100.0*(calc_fast/expect-1.0)<<"%"<<std::endl;
constexpr double tol = 3e-14;
auto rd_ok = [expect,tol](double v)
{
return ( ( v==expect || NC::ncabs(v/expect-1.0) < 3e-14 )
? "yes" : "no" );
};

std::cout<<" integrateAlphaInterval : "<<calc<<" vs. "<<calc_fast<<" vs. "<<expect<<" reldiff < "<<tol<<": "
<<rd_ok(calc)<<" and "<<rd_ok(calc_fast)<<std::endl;
}
}

Expand Down
4 changes: 2 additions & 2 deletions tests/src/app_sabsliceinteg/test.log
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ makeTailedBreakdown DBG: aidx_low=0, aidx_upp=19
checkXS(15): xs_front = 0.116232 xs_middle = 5.46449 xs_back = 0.703162 xs_sum = 6.28389 expected = 6.28389 reldiff<1e-15? = yes%
makeTailedBreakdown DBG: aidx_low=9, aidx_upp=19
checkXS(16): xs_front = 0.146515 xs_middle = 3.68173 xs_back = 0.703162 xs_sum = 4.5314 expected = 4.5314 reldiff<1e-15? = yes%
integrateAlphaInterval : 2.27091 vs. 2.27091 vs. 2.27091 reldiff: -2.22045e-14% and 0%
integrateAlphaInterval : 6.28389 vs. 6.28389 vs. 6.28389 reldiff: 2.22045e-14% and 2.22045e-14%
integrateAlphaInterval : 2.27091 vs. 2.27091 vs. 2.27091 reldiff < 3e-14: yes and yes
integrateAlphaInterval : 6.28389 vs. 6.28389 vs. 6.28389 reldiff < 3e-14: yes and yes

0 comments on commit 577285e

Please sign in to comment.