Commit fe2adbd4 authored by Berenger Bramas's avatar Berenger Bramas

Update exponential - use const expr instead of array for coef and write factor...

Update exponential - use const expr instead of array for coef and write factor computation in a single line
parent 8cc89dfa
......@@ -15,9 +15,8 @@
#include <iostream>
int main(int /*argc*/, char* /*argv*/ []) {
using RealType = double;
template <class RealType>
void compareExpTime(){
const size_t NbOverLoop = 5;
const size_t NbExp = 1000000;
......@@ -89,6 +88,14 @@ int main(int /*argc*/, char* /*argv*/ []) {
std::cout << "Vector low acc " << InaVecBestType<RealType>::GetName() << " for " << NbExp * NbOverLoop
<< " exp took " << timer.getElapsed() << "s (" << timer.getElapsed()/double(NbExp * NbOverLoop) << "s per exp)\n";
}
}
int main(int /*argc*/, char* /*argv*/ []) {
std::cout << "In Float:" << std::endl;
compareExpTime<float>();
std::cout << "In Double:" << std::endl;
compareExpTime<double>();
return 0;
}
......@@ -54,16 +54,11 @@ for n = 2:10
disp(x0)
end
printf("constexpr static std::array<double,%d> GetCoefficient%d() {\n", n+1, n+1);
printf(" return {{\n");
for i = 1:(n+1)
sep=","
if i == n+1 then
sep=""
end
printf(" %.20e%s\n", -x0(i), sep);
for i = 1:(n+1)
printf("inline constexpr static double GetCoefficient%d_%d() {\n", n+1, i-1);
printf(" return %.20e;\n", -x0(i));
printf("}\n");
end
printf(" }};\n");
printf("}\n\n");
printf("\n");
end
......@@ -258,32 +258,28 @@ public:
#ifdef __INTEL_COMPILER
return _mm256_exp_pd(vec);
#else
static const __m256d COEFF_LOG2E = _mm256_set1_pd(double(InaFastExp::CoeffLog2E()));
static const __m256d COEFF_A = _mm256_set1_pd(double(InaFastExp::CoeffA64()));
static const __m256d COEFF_B = _mm256_set1_pd(double(InaFastExp::CoeffB64()));
static const __m256d COEFF_P5_X = _mm256_set1_pd(double(InaFastExp::GetCoefficient9()[8]));
static const __m256d COEFF_P5_Y = _mm256_set1_pd(double(InaFastExp::GetCoefficient9()[7]));
static const __m256d COEFF_P5_Z = _mm256_set1_pd(double(InaFastExp::GetCoefficient9()[6]));
static const __m256d COEFF_P5_A = _mm256_set1_pd(double(InaFastExp::GetCoefficient9()[5]));
static const __m256d COEFF_P5_B = _mm256_set1_pd(double(InaFastExp::GetCoefficient9()[4]));
static const __m256d COEFF_P5_C = _mm256_set1_pd(double(InaFastExp::GetCoefficient9()[3]));
static const __m256d COEFF_P5_D = _mm256_set1_pd(double(InaFastExp::GetCoefficient9()[2]));
static const __m256d COEFF_P5_E = _mm256_set1_pd(double(InaFastExp::GetCoefficient9()[1]));
static const __m256d COEFF_P5_F = _mm256_set1_pd(double(InaFastExp::GetCoefficient9()[0]));
const __m256d COEFF_LOG2E = _mm256_set1_pd(double(InaFastExp::CoeffLog2E()));
const __m256d COEFF_A = _mm256_set1_pd(double(InaFastExp::CoeffA64()));
const __m256d COEFF_B = _mm256_set1_pd(double(InaFastExp::CoeffB64()));
const __m256d COEFF_P5_X = _mm256_set1_pd(double(InaFastExp::GetCoefficient9_8()));
const __m256d COEFF_P5_Y = _mm256_set1_pd(double(InaFastExp::GetCoefficient9_7()));
const __m256d COEFF_P5_Z = _mm256_set1_pd(double(InaFastExp::GetCoefficient9_6()));
const __m256d COEFF_P5_A = _mm256_set1_pd(double(InaFastExp::GetCoefficient9_5()));
const __m256d COEFF_P5_B = _mm256_set1_pd(double(InaFastExp::GetCoefficient9_4()));
const __m256d COEFF_P5_C = _mm256_set1_pd(double(InaFastExp::GetCoefficient9_3()));
const __m256d COEFF_P5_D = _mm256_set1_pd(double(InaFastExp::GetCoefficient9_2()));
const __m256d COEFF_P5_E = _mm256_set1_pd(double(InaFastExp::GetCoefficient9_1()));
const __m256d COEFF_P5_F = _mm256_set1_pd(double(InaFastExp::GetCoefficient9_0()));
__m256d x = vec * COEFF_LOG2E;
const __m256d fractional_part = x - InaVecAVX(x).floor().vec;
__m256d factor = COEFF_P5_X;
factor = (factor * fractional_part + COEFF_P5_Y);
factor = (factor * fractional_part + COEFF_P5_Z);
factor = (factor * fractional_part + COEFF_P5_A);
factor = (factor * fractional_part + COEFF_P5_B);
factor = (factor * fractional_part + COEFF_P5_C);
factor = (factor * fractional_part + COEFF_P5_D);
factor = (factor * fractional_part + COEFF_P5_E);
factor = (factor * fractional_part + COEFF_P5_F);
__m256d factor = ((((((((COEFF_P5_X * fractional_part + COEFF_P5_Y)
* fractional_part + COEFF_P5_Z) * fractional_part + COEFF_P5_A)
* fractional_part + COEFF_P5_B) * fractional_part + COEFF_P5_C)
* fractional_part + COEFF_P5_D) * fractional_part + COEFF_P5_E)
* fractional_part + COEFF_P5_F);
x -= factor;
......@@ -303,22 +299,21 @@ public:
}
inline InaVecAVX expLowAcc() const {
static const __m256d COEFF_LOG2E = _mm256_set1_pd(double(InaFastExp::CoeffLog2E()));
static const __m256d COEFF_A = _mm256_set1_pd(double(InaFastExp::CoeffA64()));
static const __m256d COEFF_B = _mm256_set1_pd(double(InaFastExp::CoeffB64()));
static const __m256d COEFF_P5_C = _mm256_set1_pd(double(InaFastExp::GetCoefficient4()[3]));
static const __m256d COEFF_P5_D = _mm256_set1_pd(double(InaFastExp::GetCoefficient4()[2]));
static const __m256d COEFF_P5_E = _mm256_set1_pd(double(InaFastExp::GetCoefficient4()[1]));
static const __m256d COEFF_P5_F = _mm256_set1_pd(double(InaFastExp::GetCoefficient4()[0]));
const __m256d COEFF_LOG2E = _mm256_set1_pd(double(InaFastExp::CoeffLog2E()));
const __m256d COEFF_A = _mm256_set1_pd(double(InaFastExp::CoeffA64()));
const __m256d COEFF_B = _mm256_set1_pd(double(InaFastExp::CoeffB64()));
const __m256d COEFF_P5_C = _mm256_set1_pd(double(InaFastExp::GetCoefficient4_3()));
const __m256d COEFF_P5_D = _mm256_set1_pd(double(InaFastExp::GetCoefficient4_2()));
const __m256d COEFF_P5_E = _mm256_set1_pd(double(InaFastExp::GetCoefficient4_1()));
const __m256d COEFF_P5_F = _mm256_set1_pd(double(InaFastExp::GetCoefficient4_0()));
__m256d x = vec * COEFF_LOG2E;
const __m256d fractional_part = x - InaVecAVX(x).floor().vec;
__m256d factor = COEFF_P5_C;
factor = (factor * fractional_part + COEFF_P5_D);
factor = (factor * fractional_part + COEFF_P5_E);
factor = (factor * fractional_part + COEFF_P5_F);
__m256d factor = (((COEFF_P5_C * fractional_part + COEFF_P5_D)
* fractional_part + COEFF_P5_E)
* fractional_part + COEFF_P5_F);
x -= factor;
......
......@@ -270,26 +270,25 @@ public:
#ifdef __INTEL_COMPILER
return _mm256_exp_ps(vec);
#else
static const __m256 COEFF_LOG2E = _mm256_set1_ps(float(InaFastExp::CoeffLog2E()));
static const __m256 COEFF_A = _mm256_set1_ps(float(InaFastExp::CoeffA32()));
static const __m256 COEFF_B = _mm256_set1_ps(float(InaFastExp::CoeffB32()));
static const __m256 COEFF_P5_A = _mm256_set1_ps(float(InaFastExp::GetCoefficient6()[5]));
static const __m256 COEFF_P5_B = _mm256_set1_ps(float(InaFastExp::GetCoefficient6()[4]));
static const __m256 COEFF_P5_C = _mm256_set1_ps(float(InaFastExp::GetCoefficient6()[3]));
static const __m256 COEFF_P5_D = _mm256_set1_ps(float(InaFastExp::GetCoefficient6()[2]));
static const __m256 COEFF_P5_E = _mm256_set1_ps(float(InaFastExp::GetCoefficient6()[1]));
static const __m256 COEFF_P5_F = _mm256_set1_ps(float(InaFastExp::GetCoefficient6()[0]));
const __m256 COEFF_LOG2E = _mm256_set1_ps(float(InaFastExp::CoeffLog2E()));
const __m256 COEFF_A = _mm256_set1_ps(float(InaFastExp::CoeffA32()));
const __m256 COEFF_B = _mm256_set1_ps(float(InaFastExp::CoeffB32()));
const __m256 COEFF_P5_A = _mm256_set1_ps(float(InaFastExp::GetCoefficient6_5()));
const __m256 COEFF_P5_B = _mm256_set1_ps(float(InaFastExp::GetCoefficient6_4()));
const __m256 COEFF_P5_C = _mm256_set1_ps(float(InaFastExp::GetCoefficient6_3()));
const __m256 COEFF_P5_D = _mm256_set1_ps(float(InaFastExp::GetCoefficient6_2()));
const __m256 COEFF_P5_E = _mm256_set1_ps(float(InaFastExp::GetCoefficient6_1()));
const __m256 COEFF_P5_F = _mm256_set1_ps(float(InaFastExp::GetCoefficient6_0()));
__m256 x = vec * COEFF_LOG2E;
const __m256 fractional_part = x - InaVecAVX(x).floor().vec;
__m256 factor = COEFF_P5_A;
factor = (factor * fractional_part + COEFF_P5_B);
factor = (factor * fractional_part + COEFF_P5_C);
factor = (factor * fractional_part + COEFF_P5_D);
factor = (factor * fractional_part + COEFF_P5_E);
factor = (factor * fractional_part + COEFF_P5_F);
__m256 factor = (((((COEFF_P5_A * fractional_part + COEFF_P5_B)
* fractional_part + COEFF_P5_C)
* fractional_part + COEFF_P5_D)
* fractional_part + COEFF_P5_E)
* fractional_part + COEFF_P5_F);
x -= factor;
......@@ -300,20 +299,18 @@ public:
}
inline InaVecAVX expLowAcc() const {
static const __m256 COEFF_LOG2E = _mm256_set1_ps(float(InaFastExp::CoeffLog2E()));
static const __m256 COEFF_A = _mm256_set1_ps(float(InaFastExp::CoeffA32()));
static const __m256 COEFF_B = _mm256_set1_ps(float(InaFastExp::CoeffB32()));
static const __m256 COEFF_P5_D = _mm256_set1_ps(float(InaFastExp::GetCoefficient3()[2]));
static const __m256 COEFF_P5_E = _mm256_set1_ps(float(InaFastExp::GetCoefficient3()[1]));
static const __m256 COEFF_P5_F = _mm256_set1_ps(float(InaFastExp::GetCoefficient3()[0]));
const __m256 COEFF_LOG2E = _mm256_set1_ps(float(InaFastExp::CoeffLog2E()));
const __m256 COEFF_A = _mm256_set1_ps(float(InaFastExp::CoeffA32()));
const __m256 COEFF_B = _mm256_set1_ps(float(InaFastExp::CoeffB32()));
const __m256 COEFF_P5_D = _mm256_set1_ps(float(InaFastExp::GetCoefficient3_2()));
const __m256 COEFF_P5_E = _mm256_set1_ps(float(InaFastExp::GetCoefficient3_1()));
const __m256 COEFF_P5_F = _mm256_set1_ps(float(InaFastExp::GetCoefficient3_0()));
__m256 x = vec * COEFF_LOG2E;
const __m256 fractional_part = x - InaVecAVX(x).floor().vec;
__m256 factor = COEFF_P5_D;
factor = (factor * fractional_part + COEFF_P5_E);
factor = (factor * fractional_part + COEFF_P5_F);
__m256 factor = ((COEFF_P5_D * fractional_part + COEFF_P5_E) * fractional_part + COEFF_P5_F);
x -= factor;
......
......@@ -280,34 +280,28 @@ public:
}
inline InaVecAVX512KNL exp() const {
static const __m512d COEFF_LOG2E = _mm512_set1_pd(double(InaFastExp::CoeffLog2E()));
static const __m512d COEFF_A = _mm512_set1_pd(double(InaFastExp::CoeffA64()));
static const __m512d COEFF_B = _mm512_set1_pd(double(InaFastExp::CoeffB64()));
static const __m512d COEFF_P5_V = _mm512_set1_pd(double(InaFastExp::GetCoefficient9()[9]));
static const __m512d COEFF_P5_X = _mm512_set1_pd(double(InaFastExp::GetCoefficient9()[8]));
static const __m512d COEFF_P5_Y = _mm512_set1_pd(double(InaFastExp::GetCoefficient9()[7]));
static const __m512d COEFF_P5_Z = _mm512_set1_pd(double(InaFastExp::GetCoefficient9()[6]));
static const __m512d COEFF_P5_A = _mm512_set1_pd(double(InaFastExp::GetCoefficient9()[5]));
static const __m512d COEFF_P5_B = _mm512_set1_pd(double(InaFastExp::GetCoefficient9()[4]));
static const __m512d COEFF_P5_C = _mm512_set1_pd(double(InaFastExp::GetCoefficient9()[3]));
static const __m512d COEFF_P5_D = _mm512_set1_pd(double(InaFastExp::GetCoefficient9()[2]));
static const __m512d COEFF_P5_E = _mm512_set1_pd(double(InaFastExp::GetCoefficient9()[1]));
static const __m512d COEFF_P5_F = _mm512_set1_pd(double(InaFastExp::GetCoefficient9()[0]));
const __m512d COEFF_LOG2E = _mm512_set1_pd(double(InaFastExp::CoeffLog2E()));
const __m512d COEFF_A = _mm512_set1_pd(double(InaFastExp::CoeffA64()));
const __m512d COEFF_B = _mm512_set1_pd(double(InaFastExp::CoeffB64()));
const __m512d COEFF_P5_X = _mm512_set1_pd(double(InaFastExp::GetCoefficient9_8()));
const __m512d COEFF_P5_Y = _mm512_set1_pd(double(InaFastExp::GetCoefficient9_7()));
const __m512d COEFF_P5_Z = _mm512_set1_pd(double(InaFastExp::GetCoefficient9_6()));
const __m512d COEFF_P5_A = _mm512_set1_pd(double(InaFastExp::GetCoefficient9_5()));
const __m512d COEFF_P5_B = _mm512_set1_pd(double(InaFastExp::GetCoefficient9_4()));
const __m512d COEFF_P5_C = _mm512_set1_pd(double(InaFastExp::GetCoefficient9_3()));
const __m512d COEFF_P5_D = _mm512_set1_pd(double(InaFastExp::GetCoefficient9_2()));
const __m512d COEFF_P5_E = _mm512_set1_pd(double(InaFastExp::GetCoefficient9_1()));
const __m512d COEFF_P5_F = _mm512_set1_pd(double(InaFastExp::GetCoefficient9_0()));
__m512d x = vec * COEFF_LOG2E;
const __m512d fractional_part = x - InaVecAVX512KNL(x).floor().vec;
__m512d factor = COEFF_P5_V;
factor = (factor * fractional_part + COEFF_P5_X);
factor = (factor * fractional_part + COEFF_P5_Y);
factor = (factor * fractional_part + COEFF_P5_Z);
factor = (factor * fractional_part + COEFF_P5_A);
factor = (factor * fractional_part + COEFF_P5_B);
factor = (factor * fractional_part + COEFF_P5_C);
factor = (factor * fractional_part + COEFF_P5_D);
factor = (factor * fractional_part + COEFF_P5_E);
factor = (factor * fractional_part + COEFF_P5_F);
__m512d factor = ((((((((COEFF_P5_X * fractional_part + COEFF_P5_Y)
* fractional_part + COEFF_P5_Z) * fractional_part + COEFF_P5_A)
* fractional_part + COEFF_P5_B) * fractional_part + COEFF_P5_C)
* fractional_part + COEFF_P5_D) * fractional_part + COEFF_P5_E)
* fractional_part + COEFF_P5_F);
x -= factor;
......@@ -325,22 +319,21 @@ public:
}
inline InaVecAVX512KNL expLowAcc() const {
static const __m512d COEFF_LOG2E = _mm512_set1_pd(double(InaFastExp::CoeffLog2E()));
static const __m512d COEFF_A = _mm512_set1_pd(double(InaFastExp::CoeffA64()));
static const __m512d COEFF_B = _mm512_set1_pd(double(InaFastExp::CoeffB64()));
static const __m512d COEFF_P5_C = _mm512_set1_pd(double(InaFastExp::GetCoefficient4()[3]));
static const __m512d COEFF_P5_D = _mm512_set1_pd(double(InaFastExp::GetCoefficient4()[2]));
static const __m512d COEFF_P5_E = _mm512_set1_pd(double(InaFastExp::GetCoefficient4()[1]));
static const __m512d COEFF_P5_F = _mm512_set1_pd(double(InaFastExp::GetCoefficient4()[0]));
const __m512d COEFF_LOG2E = _mm512_set1_pd(double(InaFastExp::CoeffLog2E()));
const __m512d COEFF_A = _mm512_set1_pd(double(InaFastExp::CoeffA64()));
const __m512d COEFF_B = _mm512_set1_pd(double(InaFastExp::CoeffB64()));
const __m512d COEFF_P5_C = _mm512_set1_pd(double(InaFastExp::GetCoefficient4_3()));
const __m512d COEFF_P5_D = _mm512_set1_pd(double(InaFastExp::GetCoefficient4_2()));
const __m512d COEFF_P5_E = _mm512_set1_pd(double(InaFastExp::GetCoefficient4_1()));
const __m512d COEFF_P5_F = _mm512_set1_pd(double(InaFastExp::GetCoefficient4_0()));
__m512d x = vec * COEFF_LOG2E;
const __m512d fractional_part = x - InaVecAVX512KNL(x).floor().vec;
__m512d factor = COEFF_P5_C;
factor = (factor * fractional_part + COEFF_P5_D);
factor = (factor * fractional_part + COEFF_P5_E);
factor = (factor * fractional_part + COEFF_P5_F);
__m512d factor = (((COEFF_P5_C * fractional_part + COEFF_P5_D)
* fractional_part + COEFF_P5_E)
* fractional_part + COEFF_P5_F);
x -= factor;
......
......@@ -305,26 +305,25 @@ public:
}
inline InaVecAVX512KNL exp() const {
static const __m512 COEFF_LOG2E = _mm512_set1_ps(float(InaFastExp::CoeffLog2E()));
static const __m512 COEFF_A = _mm512_set1_ps(float(InaFastExp::CoeffA32()));
static const __m512 COEFF_B = _mm512_set1_ps(float(InaFastExp::CoeffB32()));
static const __m512 COEFF_P5_A = _mm512_set1_ps(float(InaFastExp::GetCoefficient6()[5]));
static const __m512 COEFF_P5_B = _mm512_set1_ps(float(InaFastExp::GetCoefficient6()[4]));
static const __m512 COEFF_P5_C = _mm512_set1_ps(float(InaFastExp::GetCoefficient6()[3]));
static const __m512 COEFF_P5_D = _mm512_set1_ps(float(InaFastExp::GetCoefficient6()[2]));
static const __m512 COEFF_P5_E = _mm512_set1_ps(float(InaFastExp::GetCoefficient6()[1]));
static const __m512 COEFF_P5_F = _mm512_set1_ps(float(InaFastExp::GetCoefficient6()[0]));
const __m512 COEFF_LOG2E = _mm512_set1_ps(float(InaFastExp::CoeffLog2E()));
const __m512 COEFF_A = _mm512_set1_ps(float(InaFastExp::CoeffA32()));
const __m512 COEFF_B = _mm512_set1_ps(float(InaFastExp::CoeffB32()));
const __m512 COEFF_P5_A = _mm512_set1_ps(float(InaFastExp::GetCoefficient6_5()));
const __m512 COEFF_P5_B = _mm512_set1_ps(float(InaFastExp::GetCoefficient6_4()));
const __m512 COEFF_P5_C = _mm512_set1_ps(float(InaFastExp::GetCoefficient6_3()));
const __m512 COEFF_P5_D = _mm512_set1_ps(float(InaFastExp::GetCoefficient6_2()));
const __m512 COEFF_P5_E = _mm512_set1_ps(float(InaFastExp::GetCoefficient6_1()));
const __m512 COEFF_P5_F = _mm512_set1_ps(float(InaFastExp::GetCoefficient6_0()));
__m512 x = vec * COEFF_LOG2E;
const __m512 fractional_part = x - InaVecAVX512KNL(x).floor().vec;
__m512 factor = COEFF_P5_A;
factor = (factor * fractional_part + COEFF_P5_B);
factor = (factor * fractional_part + COEFF_P5_C);
factor = (factor * fractional_part + COEFF_P5_D);
factor = (factor * fractional_part + COEFF_P5_E);
factor = (factor * fractional_part + COEFF_P5_F);
__m512 factor = (((((COEFF_P5_A * fractional_part + COEFF_P5_B)
* fractional_part + COEFF_P5_C)
* fractional_part + COEFF_P5_D)
* fractional_part + COEFF_P5_E)
* fractional_part + COEFF_P5_F);
x -= factor;
......@@ -334,20 +333,18 @@ public:
}
inline InaVecAVX512KNL expLowAcc() const {
static const __m512 COEFF_LOG2E = _mm512_set1_ps(float(InaFastExp::CoeffLog2E()));
static const __m512 COEFF_A = _mm512_set1_ps(float(InaFastExp::CoeffA32()));
static const __m512 COEFF_B = _mm512_set1_ps(float(InaFastExp::CoeffB32()));
static const __m512 COEFF_P5_D = _mm512_set1_ps(float(InaFastExp::GetCoefficient3()[2]));
static const __m512 COEFF_P5_E = _mm512_set1_ps(float(InaFastExp::GetCoefficient3()[1]));
static const __m512 COEFF_P5_F = _mm512_set1_ps(float(InaFastExp::GetCoefficient3()[0]));
const __m512 COEFF_LOG2E = _mm512_set1_ps(float(InaFastExp::CoeffLog2E()));
const __m512 COEFF_A = _mm512_set1_ps(float(InaFastExp::CoeffA32()));
const __m512 COEFF_B = _mm512_set1_ps(float(InaFastExp::CoeffB32()));
const __m512 COEFF_P5_D = _mm512_set1_ps(float(InaFastExp::GetCoefficient3_2()));
const __m512 COEFF_P5_E = _mm512_set1_ps(float(InaFastExp::GetCoefficient3_1()));
const __m512 COEFF_P5_F = _mm512_set1_ps(float(InaFastExp::GetCoefficient3_0()));
__m512 x = vec * COEFF_LOG2E;
const __m512 fractional_part = x - InaVecAVX512KNL(x).floor().vec;
__m512 factor = COEFF_P5_D;
factor = (factor * fractional_part + COEFF_P5_E);
factor = (factor * fractional_part + COEFF_P5_F);
__m512 factor = ((COEFF_P5_D * fractional_part + COEFF_P5_E) * fractional_part + COEFF_P5_F);
x -= factor;
......
......@@ -20,116 +20,224 @@ class InaFastExp {
static const long int S32 = (1L << 23);
public:
constexpr static double CoeffLog2E() {
inline constexpr static double CoeffLog2E() {
// const double Euler = 2.71828182845904523536028747135266249775724709369995;
// return std::log2(Euler());
return 1.442695040888963407359924681001892137426645954153;
}
constexpr static double CoeffA64() {
inline constexpr static double CoeffA64() {
return double(S64);
}
constexpr static double CoeffB64() {
inline constexpr static double CoeffB64() {
return double(S64 * 1023);
}
constexpr static double CoeffA32() {
inline constexpr static double CoeffA32() {
return double(S32);
}
constexpr static double CoeffB32() {
inline constexpr static double CoeffB32() {
return double(S32 * 127);
}
constexpr static std::array< double, 3 > GetCoefficient3() {
return { { -2.47142816509723700288e-03,
3.48943001636461247461e-01,
-3.44000145306266491563e-01 } };
}
constexpr static std::array< double, 4 > GetCoefficient4() {
return { { 1.06906116358144185133e-04,
3.03543677780836240743e-01,
-2.24339532327269441936e-01,
-7.92041454535668681958e-02 } };
}
constexpr static std::array< double, 5 > GetCoefficient5() {
return { { -3.70138142771437266806e-06,
3.07033820309224325662e-01,
-2.41638288055762540107e-01,
-5.16904731562965388814e-02,
-1.36976563343097993558e-02 } };
}
constexpr static std::array< double, 6 > GetCoefficient6() {
return { { 1.06823753710239477000e-07,
3.06845249656632845792e-01,
-2.40139721982230797126e-01,
-5.58662282412822480682e-02,
-8.94283890931273951763e-03,
-1.89646052380707734290e-03 } };
}
constexpr static std::array< double, 7 > GetCoefficient7() {
return { { -2.64303273610414963822e-09,
3.06853075372807815313e-01,
-2.40230549677691723742e-01,
-5.54802224547989303316e-02,
-9.68497459444197204836e-03,
-1.23843111224273085859e-03,
-2.18892247566917477666e-04 } };
}
constexpr static std::array< double, 8 > GetCoefficient8() {
return { { 5.72265234348656066133e-11,
3.06852812183173784266e-01,
-2.40226356058427820139e-01,
-5.55053022725605083032e-02,
-9.61350625581030605871e-03,
-1.34302437845634000529e-03,
-1.42962470418959216190e-04,
-2.16607474999407558923e-05 } };
}
constexpr static std::array< double, 9 > GetCoefficient9() {
return { { -1.10150186041739869460e-12,
3.06852819617161765020e-01,
-2.40226511645233870018e-01,
-5.55040609720754696266e-02,
-9.61837182960864275905e-03,
-1.33266405715993271723e-03,
-1.55186852765468104613e-04,
-1.41484352491262699514e-05,
-1.87582286605066256753e-06 } };
}
constexpr static std::array< double, 10 > GetCoefficient10() {
return { { 1.79040320992239805871e-11,
3.06852815055756844576e-01,
-2.40226385506041861806e-01,
-5.55053584940081654042e-02,
-9.61174262279892825667e-03,
-1.35164210003994454852e-03,
-1.23291147980286128769e-04,
-4.53940620364305641833e-05,
1.46363500589519947862e-05,
-3.63750326480946818984e-06 } };
}
constexpr static std::array< double, 11 > GetCoefficient11() {
return { { 7.32388148129676088418e-13,
3.06852819216552274995e-01,
-2.40226499275945526435e-01,
-5.55042073859920090384e-02,
-9.61749102796678571881e-03,
-1.33571753728242812072e-03,
-1.48718480159015542822e-04,
-2.26598047213222231406e-05,
4.91492761180322572151e-06,
-3.00875847392884227107e-06,
5.68126156224525271282e-07 } };
inline constexpr static double GetCoefficient3_0() {
return -2.47142816509723700288e-03;
}
inline constexpr static double GetCoefficient3_1() {
return 3.48943001636461247461e-01;
}
inline constexpr static double GetCoefficient3_2() {
return -3.44000145306266491563e-01;
}
inline constexpr static double GetCoefficient4_0() {
return 1.06906116358144185133e-04;
}
inline constexpr static double GetCoefficient4_1() {
return 3.03543677780836240743e-01;
}
inline constexpr static double GetCoefficient4_2() {
return -2.24339532327269441936e-01;
}
inline constexpr static double GetCoefficient4_3() {
return -7.92041454535668681958e-02;
}
inline constexpr static double GetCoefficient5_0() {
return -3.70138142771437266806e-06;
}
inline constexpr static double GetCoefficient5_1() {
return 3.07033820309224325662e-01;
}
inline constexpr static double GetCoefficient5_2() {
return -2.41638288055762540107e-01;
}
inline constexpr static double GetCoefficient5_3() {
return -5.16904731562965388814e-02;
}
inline constexpr static double GetCoefficient5_4() {
return -1.36976563343097993558e-02;
}
inline constexpr static double GetCoefficient6_0() {
return 1.06823753710239477000e-07;
}
inline constexpr static double GetCoefficient6_1() {
return 3.06845249656632845792e-01;
}
inline constexpr static double GetCoefficient6_2() {
return -2.40139721982230797126e-01;
}
inline constexpr static double GetCoefficient6_3() {
return -5.58662282412822480682e-02;
}
inline constexpr static double GetCoefficient6_4() {
return -8.94283890931273951763e-03;
}
inline constexpr static double GetCoefficient6_5() {
return -1.89646052380707734290e-03;
}
inline constexpr static double GetCoefficient7_0() {
return -2.64303273610414963822e-09;
}
inline constexpr static double GetCoefficient7_1() {
return 3.06853075372807815313e-01;
}
inline constexpr static double GetCoefficient7_2() {
return -2.40230549677691723742e-01;
}
inline constexpr static double GetCoefficient7_3() {
return -5.54802224547989303316e-02;
}
inline constexpr static double GetCoefficient7_4() {
return -9.68497459444197204836e-03;
}
inline constexpr static double GetCoefficient7_5() {
return -1.23843111224273085859e-03;
}
inline constexpr static double GetCoefficient7_6() {
return -2.18892247566917477666e-04;
}
inline constexpr static double GetCoefficient8_0() {
return 5.72265234348656066133e-11;
}
inline constexpr static double GetCoefficient8_1() {
return 3.06852812183173784266e-01;
}
inline constexpr static double GetCoefficient8_2() {
return -2.40226356058427820139e-01;
}
inline constexpr static double GetCoefficient8_3() {
return -5.55053022725605083032e-02;
}
inline constexpr static double GetCoefficient8_4() {
return -9.61350625581030605871e-03;
}
inline constexpr static double GetCoefficient8_5() {
return -1.34302437845634000529e-03;
}
inline constexpr static double GetCoefficient8_6() {
return -1.42962470418959216190e-04;
}
inline constexpr static double GetCoefficient8_7() {
return -2.16607474999407558923e-05;
}
inline constexpr static double GetCoefficient9_0() {
return -1.10150186041739869460e-12;
}
inline constexpr static double GetCoefficient9_1() {
return 3.06852819617161765020e-01;
}
inline constexpr static double GetCoefficient9_2() {
return -2.40226511645233870018e-01;
}
inline constexpr static double GetCoefficient9_3() {
return -5.55040609720754696266e-02;