std::sqrt is not constexpr until C++26

This commit is contained in:
Marek Roszko 2024-06-19 07:34:58 -04:00
parent cde153c75f
commit 7c35139505
1 changed files with 1 additions and 1 deletions

View File

@ -180,7 +180,7 @@ static double approx_int( double x )
return x / ( 1.0 - d + std::pow( d4 + x * x * 0.25, 0.25 ) );
}
static constexpr double approx_inv_int( double x )
static double approx_inv_int( double x )
{
const double p = 0.39538816;
return x * ( 1.0 - p + std::sqrt( p * p + 0.25 * x * x ) );