Skip to content

Commit bcbdac7

Browse files
committed
[fix-arm-support] eemumu/ggtt.mad: use higher tolerance for constexpr_tan tests (#2) on aarch64 (with DanieleM)
1 parent 8831215 commit bcbdac7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

epochX/cudacpp/ee_mumu.mad/SubProcesses/testmisc.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,14 +462,16 @@ TEST( XTESTID( MG_EPOCH_PROCESS_ID ), testmisc )
462462
<< std::setprecision( 40 ) << "x=" << x << ", x(0to2Pi)=" << mapIn0to2Pi( x ) << ",\n istep=" << istep << ", distance4=" << distance4( x );
463463
EXPECT_NEAR( std::cos( x ), constexpr_cos( x ), std::max( std::abs( std::cos( x ) * tolerance ), 3E-15 ) )
464464
<< std::setprecision( 40 ) << "x=" << x << ", x(0to2Pi)=" << mapIn0to2Pi( x ) << ",\n istep=" << istep << ", distance4=" << distance4( x );
465+
#ifndef __aarch64__
465466
if( !RUNNING_ON_VALGRIND )
466467
{
467468
EXPECT_NEAR( std::tan( x ), constexpr_tan( x ), std::max( std::abs( std::tan( x ) * tolerance ), 3E-15 ) )
468469
<< std::setprecision( 40 ) << "x=" << x << ", x(0to2Pi)=" << mapIn0to2Pi( x ) << ",\n istep=" << istep << ", distance4=" << distance4( x );
469470
}
470471
else
472+
#endif
471473
{
472-
// Higher tolerance when running through valgrind #906
474+
// Higher tolerance when running through valgrind #906 (or on aarch64 #1064)
473475
const long double ctanx = constexpr_tan( x );
474476
const long double taninf = 4E14; // declare tan(x) as "infinity if above this threshold
475477
if( ctanx > -taninf && ctanx < taninf )

epochX/cudacpp/gg_ttgg.mad/SubProcesses/testmisc.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,14 +462,16 @@ TEST( XTESTID( MG_EPOCH_PROCESS_ID ), testmisc )
462462
<< std::setprecision( 40 ) << "x=" << x << ", x(0to2Pi)=" << mapIn0to2Pi( x ) << ",\n istep=" << istep << ", distance4=" << distance4( x );
463463
EXPECT_NEAR( std::cos( x ), constexpr_cos( x ), std::max( std::abs( std::cos( x ) * tolerance ), 3E-15 ) )
464464
<< std::setprecision( 40 ) << "x=" << x << ", x(0to2Pi)=" << mapIn0to2Pi( x ) << ",\n istep=" << istep << ", distance4=" << distance4( x );
465+
#ifndef __aarch64__
465466
if( !RUNNING_ON_VALGRIND )
466467
{
467468
EXPECT_NEAR( std::tan( x ), constexpr_tan( x ), std::max( std::abs( std::tan( x ) * tolerance ), 3E-15 ) )
468469
<< std::setprecision( 40 ) << "x=" << x << ", x(0to2Pi)=" << mapIn0to2Pi( x ) << ",\n istep=" << istep << ", distance4=" << distance4( x );
469470
}
470471
else
472+
#endif
471473
{
472-
// Higher tolerance when running through valgrind #906
474+
// Higher tolerance when running through valgrind #906 (or on aarch64 #1064)
473475
const long double ctanx = constexpr_tan( x );
474476
const long double taninf = 4E14; // declare tan(x) as "infinity if above this threshold
475477
if( ctanx > -taninf && ctanx < taninf )

0 commit comments

Comments
 (0)