Skip to content

Commit

Permalink
[amd] in gg_tt.mad and CODEGEN, workaround for FPE madgraph5#1011 in …
Browse files Browse the repository at this point in the history
…vxxxxx on HIP: replace "pvec0 / ( vmass * pp )" by "pvec0 / vmass / pp"
  • Loading branch information
valassi committed Oct 3, 2024
1 parent be85363 commit dbb9940
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,10 @@
}
else
{
const fptype emp = pvec0 / ( vmass * pp );
//printf( "DEBUG1011 (before emp): pvec0=%f vmass=%f pp=%f vmass*pp=%f\n", pvec0, vmass, pp, vmass * pp );
//const fptype emp = pvec / ( vmass * pp ); // this may give a FPE #1011 (why?! maybe when vmass=+-epsilon?)
const fptype emp = pvec0 / vmass / pp; // workaround for FPE #1011
//printf( "DEBUG1011 (after emp): emp=%f\n", emp );
vc[2] = cxmake( hel0 * pp / vmass, 0. );
vc[5] = cxmake( hel0 * pvec3 * emp + hel * pt / pp * sqh, 0. );
if( pt != 0. )
Expand Down
5 changes: 4 additions & 1 deletion epochX/cudacpp/gg_tt.mad/src/HelAmps_sm.h
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,10 @@ namespace mg5amcCpu
}
else
{
const fptype emp = pvec0 / ( vmass * pp );
//printf( "DEBUG1011 (before emp): pvec0=%f vmass=%f pp=%f vmass*pp=%f\n", pvec0, vmass, pp, vmass * pp );
//const fptype emp = pvec / ( vmass * pp ); // this may give a FPE #1011 (why?! maybe when vmass=+-epsilon?)
const fptype emp = pvec0 / vmass / pp; // workaround for FPE #1011
//printf( "DEBUG1011 (after emp): emp=%f\n", emp );
vc[2] = cxmake( hel0 * pp / vmass, 0. );
vc[5] = cxmake( hel0 * pvec3 * emp + hel * pt / pp * sqh, 0. );
if( pt != 0. )
Expand Down

0 comments on commit dbb9940

Please sign in to comment.