diff --git a/CHANGELOG.md b/CHANGELOG.md index 2fe70dab..2f4eecdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. https://github.com/shibatch/sleef/pull/192 - Power VSX target support is added to libsleef. https://github.com/shibatch/sleef/pull/195 +- Payne-Hanek like argument reduction is added to libsleef. + https://github.com/shibatch/sleef/pull/197 ## 3.2 - 2018-02-26 ### Added - The whole build system of the project migrated from makefiles to diff --git a/Jenkinsfile b/Jenkinsfile index b8f2dcd9..6d23a087 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,7 +10,7 @@ pipeline { sh ''' echo "AArch64 SVE on" `hostname` export PATH=$PATH:/opt/arm/arm-instruction-emulator-1.2.1_Generic-AArch64_Ubuntu-14.04_aarch64-linux/bin - export LD_LIBRARY_PATH=/opt/arm/arm-hpc-compiler-18.1_Generic-AArch64_Ubuntu-16.04_aarch64-linux/lib + export LD_LIBRARY_PATH=/opt/arm/arm-instruction-emulator-1.2.1_Generic-AArch64_Ubuntu-14.04_aarch64-linux/lib:/opt/arm/arm-hpc-compiler-18.1_Generic-AArch64_Ubuntu-16.04_aarch64-linux/lib export CC=/opt/arm/arm-hpc-compiler-18.1_Generic-AArch64_Ubuntu-16.04_aarch64-linux/bin/armclang rm -rf build mkdir build @@ -24,7 +24,7 @@ pipeline { ''' } } - + stage('Intel Compiler') { agent { label 'icc' } steps { diff --git a/src/arch/helperadvsimd.h b/src/arch/helperadvsimd.h index 694dbd31..6d31aa37 100644 --- a/src/arch/helperadvsimd.h +++ b/src/arch/helperadvsimd.h @@ -72,6 +72,19 @@ static INLINE void vstoreu_v_p_vi2(int32_t *p, vint2 v) { vst1q_s32(p, v); } static INLINE vint vloadu_vi_p(int32_t *p) { return vld1_s32(p); } static INLINE void vstoreu_v_p_vi(int32_t *p, vint v) { vst1_s32(p, v); } +static INLINE vdouble vgather_vd_p_vi(const double *ptr, vint vi) { + return ((vdouble) { ptr[vget_lane_s32(vi, 0)], ptr[vget_lane_s32(vi, 1)]} ); +} + +static INLINE vfloat vgather_vf_p_vi2(const float *ptr, vint2 vi2) { + return ((vfloat) { + ptr[vgetq_lane_s32(vi2, 0)], + ptr[vgetq_lane_s32(vi2, 1)], + ptr[vgetq_lane_s32(vi2, 2)], + ptr[vgetq_lane_s32(vi2, 3)] + }); +} + // Basic logical operations for mask static INLINE vmask vand_vm_vm_vm(vmask x, vmask y) { return vandq_u32(x, y); } static INLINE vmask vandnot_vm_vm_vm(vmask x, vmask y) { diff --git a/src/arch/helperavx.h b/src/arch/helperavx.h index f2d81d01..8b1fe0b1 100644 --- a/src/arch/helperavx.h +++ b/src/arch/helperavx.h @@ -290,6 +290,12 @@ static INLINE vdouble vloadu_vd_p(const double *ptr) { return _mm256_loadu_pd(pt static INLINE void vstore_v_p_vd(double *ptr, vdouble v) { _mm256_store_pd(ptr, v); } static INLINE void vstoreu_v_p_vd(double *ptr, vdouble v) { _mm256_storeu_pd(ptr, v); } +static INLINE vdouble vgather_vd_p_vi(const double *ptr, vint vi) { + int a[VECTLENDP]; + vstoreu_v_p_vi(a, vi); + return _mm256_set_pd(ptr[a[3]], ptr[a[2]], ptr[a[1]], ptr[a[0]]); +} + #if defined(_MSC_VER) // This function is needed when debugging on MSVC. static INLINE double vcast_d_vd(vdouble v) { @@ -477,6 +483,13 @@ static INLINE vfloat vloadu_vf_p(const float *ptr) { return _mm256_loadu_ps(ptr) static INLINE void vstore_v_p_vf(float *ptr, vfloat v) { _mm256_store_ps(ptr, v); } static INLINE void vstoreu_v_p_vf(float *ptr, vfloat v) { _mm256_storeu_ps(ptr, v); } +static INLINE vfloat vgather_vf_p_vi2(const float *ptr, vint2 vi2) { + int a[VECTLENSP]; + vstoreu_v_p_vi2(a, vi2); + return _mm256_set_ps(ptr[a[7]], ptr[a[6]], ptr[a[5]], ptr[a[4]], + ptr[a[3]], ptr[a[2]], ptr[a[1]], ptr[a[0]]); +} + #ifdef _MSC_VER // This function is needed when debugging on MSVC. static INLINE float vcast_f_vf(vfloat v) { diff --git a/src/arch/helperavx2.h b/src/arch/helperavx2.h index 0b25ef3a..4854ae93 100644 --- a/src/arch/helperavx2.h +++ b/src/arch/helperavx2.h @@ -255,6 +255,8 @@ static INLINE vdouble vloadu_vd_p(const double *ptr) { return _mm256_loadu_pd(pt static INLINE void vstore_v_p_vd(double *ptr, vdouble v) { _mm256_store_pd(ptr, v); } static INLINE void vstoreu_v_p_vd(double *ptr, vdouble v) { _mm256_storeu_pd(ptr, v); } +static INLINE vdouble vgather_vd_p_vi(const double *ptr, vint vi) { return _mm256_i32gather_pd(ptr, vi, 8); } + // static INLINE vint2 vcast_vi2_vm(vmask vm) { return vm; } @@ -359,6 +361,8 @@ static INLINE vfloat vloadu_vf_p(const float *ptr) { return _mm256_loadu_ps(ptr) static INLINE void vstore_v_p_vf(float *ptr, vfloat v) { _mm256_store_ps(ptr, v); } static INLINE void vstoreu_v_p_vf(float *ptr, vfloat v) { _mm256_storeu_ps(ptr, v); } +static INLINE vfloat vgather_vf_p_vi2(const float *ptr, vint2 vi2) { return _mm256_i32gather_ps(ptr, vi2, 4); } + // #define PNMASK ((vdouble) { +0.0, -0.0, +0.0, -0.0 }) diff --git a/src/arch/helperavx2_128.h b/src/arch/helperavx2_128.h index d6eae8bb..800a290e 100644 --- a/src/arch/helperavx2_128.h +++ b/src/arch/helperavx2_128.h @@ -228,6 +228,8 @@ static INLINE vdouble vloadu_vd_p(const double *ptr) { return _mm_loadu_pd(ptr); static INLINE void vstore_v_p_vd(double *ptr, vdouble v) { _mm_store_pd(ptr, v); } static INLINE void vstoreu_v_p_vd(double *ptr, vdouble v) { _mm_storeu_pd(ptr, v); } +static INLINE vdouble vgather_vd_p_vi(const double *ptr, vint vi) { return _mm_i32gather_pd(ptr, vi, 8); } + #if defined(_MSC_VER) // This function is needed when debugging on MSVC. static INLINE double vcast_d_vd(vdouble v) { @@ -330,6 +332,8 @@ static INLINE vfloat vloadu_vf_p(const float *ptr) { return _mm_loadu_ps(ptr); } static INLINE void vstore_v_p_vf(float *ptr, vfloat v) { _mm_store_ps(ptr, v); } static INLINE void vstoreu_v_p_vf(float *ptr, vfloat v) { _mm_storeu_ps(ptr, v); } +static INLINE vfloat vgather_vf_p_vi2(const float *ptr, vint2 vi2) { return _mm_i32gather_ps(ptr, vi2, 4); } + #ifdef _MSC_VER // This function is needed when debugging on MSVC. static INLINE float vcast_f_vf(vfloat v) { diff --git a/src/arch/helperavx512f.h b/src/arch/helperavx512f.h index b0aafba0..65a007df 100644 --- a/src/arch/helperavx512f.h +++ b/src/arch/helperavx512f.h @@ -290,6 +290,8 @@ static INLINE vdouble vloadu_vd_p(const double *ptr) { return _mm512_loadu_pd(pt static INLINE void vstore_v_p_vd(double *ptr, vdouble v) { _mm512_store_pd(ptr, v); } static INLINE void vstoreu_v_p_vd(double *ptr, vdouble v) { _mm512_storeu_pd(ptr, v); } +static INLINE vdouble vgather_vd_p_vi(const double *ptr, vint vi) { return _mm512_i32gather_pd(vi, ptr, 8); } + // static INLINE vint vsel_vi_vo_vi_vi(vopmask m, vint x, vint y) { @@ -417,6 +419,7 @@ static INLINE vopmask visminf_vo_vf(vfloat d) { return veq_vo_vf_vf(d, vcast_vf_ static INLINE vopmask visnan_vo_vf(vfloat d) { return vneq_vo_vf_vf(d, d); } static INLINE vint2 vilogbk_vi2_vf(vfloat d) { return vrint_vi2_vf(_mm512_getexp_ps(d)); } +static INLINE vint2 vilogb2k_vi2_vf(vfloat d) { return vrint_vi2_vf(_mm512_getexp_ps(d)); } #ifdef _MSC_VER // This function is needed when debugging on MSVC. @@ -433,6 +436,8 @@ static INLINE vfloat vloadu_vf_p(const float *ptr) { return _mm512_loadu_ps(ptr) static INLINE void vstore_v_p_vf(float *ptr, vfloat v) { _mm512_store_ps(ptr, v); } static INLINE void vstoreu_v_p_vf(float *ptr, vfloat v) { _mm512_storeu_ps(ptr, v); } +static INLINE vfloat vgather_vf_p_vi2(const float *ptr, vint2 vi2) { return _mm512_i32gather_ps(vi2, ptr, 4); } + // static INLINE vdouble vposneg_vd_vd(vdouble d) { diff --git a/src/arch/helperneon32.h b/src/arch/helperneon32.h index 632de1e0..55e61418 100644 --- a/src/arch/helperneon32.h +++ b/src/arch/helperneon32.h @@ -43,11 +43,8 @@ static INLINE int vtestallones_i_vo32(vopmask g) { return vget_lane_u32(x1, 0); } -static vfloat vloaduf(float *p) { return vld1q_f32(p); } -static void vstoreuf(float *p, vfloat v) { vst1q_f32(p, v); } - static vint2 vloadu_vi2_p(int32_t *p) { return vld1q_s32(p); } -static void vstoreu_p_vi2(int32_t *p, vint2 v) { vst1q_s32(p, v); } +static void vstoreu_v_p_vi2(int32_t *p, vint2 v) { vst1q_s32(p, v); } // @@ -210,6 +207,15 @@ static INLINE vfloat vloadu_vf_p(const float *ptr) { return vld1q_f32(ptr); } static INLINE void vstore_v_p_vf(float *ptr, vfloat v) { vst1q_f32(__builtin_assume_aligned(ptr, 16), v); } static INLINE void vstoreu_v_p_vf(float *ptr, vfloat v) { vst1q_f32(ptr, v); } +static INLINE vfloat vgather_vf_p_vi2(const float *ptr, vint2 vi2) { + return ((vfloat) { + ptr[vgetq_lane_s32(vi2, 0)], + ptr[vgetq_lane_s32(vi2, 1)], + ptr[vgetq_lane_s32(vi2, 2)], + ptr[vgetq_lane_s32(vi2, 3)] + }); +} + #define PNMASKf ((vfloat) { +0.0f, -0.0f, +0.0f, -0.0f }) #define NPMASKf ((vfloat) { -0.0f, +0.0f, -0.0f, +0.0f }) diff --git a/src/arch/helperpower_128.h b/src/arch/helperpower_128.h index c5e0fba0..0fee2784 100644 --- a/src/arch/helperpower_128.h +++ b/src/arch/helperpower_128.h @@ -74,6 +74,18 @@ static INLINE void vstoreu_v_p_vf(float *ptr, vfloat v) { ptr[0] = v[0]; ptr[1] static INLINE void vscatter2_v_p_i_i_vd(double *ptr, int offset, int step, vdouble v) { vstore_v_p_vd((double *)(&ptr[2*offset]), v); } +static INLINE vdouble vgather_vd_p_vi(const double *ptr, vint vi) { + int a[VECTLENDP]; + vstoreu_v_p_vi(a, vi); + return ((vdouble) { ptr[a[0]], ptr[a[1]] }); +} + +static INLINE vfloat vgather_vf_p_vi2(const float *ptr, vint2 vi2) { + int a[VECTLENSP]; + vstoreu_v_p_vi2(a, vi2); + return ((vfloat) { ptr[a[0]], ptr[a[1]], ptr[a[2]], ptr[a[3]] }); +} + static INLINE vint vcast_vi_i(int i) { return (vint) { i, i }; } static INLINE vint2 vcast_vi2_i(int i) { return (vint2) { i, i, i, i }; } static INLINE vfloat vcast_vf_f(float f) { return (vfloat) { f, f, f, f }; } diff --git a/src/arch/helperpurec.h b/src/arch/helperpurec.h index 2b148ef8..c4b503da 100644 --- a/src/arch/helperpurec.h +++ b/src/arch/helperpurec.h @@ -304,6 +304,12 @@ static INLINE double vcast_d_vd(vdouble v) { return v.d[0]; } static INLINE vdouble vload_vd_p(const double *ptr) { return *(vdouble *)ptr; } static INLINE vdouble vloadu_vd_p(const double *ptr) { vdouble vd; for(int i=0;i /dev/null) +ARCH := $(shell uname -p) all : ifndef BUILDDIR @@ -46,6 +47,16 @@ benchsvml_40 : benchsvml.c benchsvml128_40.o benchsvml256_40.o benchsvml512_40.o # +ifeq ($(ARCH),aarch64) + +benchsleef : benchsleef.c benchsleef128.o bench.h + $(CC) benchsleef.c benchsleef128.o -Wall -O0 -g -I$(BUILDDIR)/include -L$(BUILDDIR)/lib -Wno-attributes -lsleef -lm -o benchsleef + +benchsleef128.o : benchsleef128.c bench.h + $(CC) benchsleef128.c -Wall -march=native -O0 -g -I$(BUILDDIR)/include -L$(BUILDDIR)/lib -Wno-attributes -c + +else + benchsleef : benchsleef.c benchsleef128.o benchsleef256.o benchsleef512.o bench.h $(CC) benchsleef.c benchsleef128.o benchsleef256.o benchsleef512.o -Wall -O0 -g -I$(BUILDDIR)/include -L$(BUILDDIR)/lib -Wno-attributes -lsleef -lm -o benchsleef @@ -58,6 +69,8 @@ benchsleef256.o : benchsleef256.c bench.h benchsleef512.o : benchsleef512.c bench.h $(CC) benchsleef512.c -Wall -mavx512f -O0 -g -I$(BUILDDIR)/include -L$(BUILDDIR)/lib -Wno-attributes -c +endif + # ProcessData.class : ProcessData.java diff --git a/src/libm-benchmarks/ProcessData.java b/src/libm-benchmarks/ProcessData.java index 381cdf7a..99b67c3f 100644 --- a/src/libm-benchmarks/ProcessData.java +++ b/src/libm-benchmarks/ProcessData.java @@ -62,8 +62,8 @@ public boolean equals(Object o) { public String toString() { String s = funcName + " "; s += prec == DP ? "DP " : "SP "; - s += bits + "-bit "; - s += " " + ulps + "-ulps "; + s += bits + "bit "; + s += String.format(" %.0fulp ", ulps); for(int i=0;i 3.5) || fabs(t) > 1 || !isnumber(t))) { printf("Pure C sin arg=%.20g ulp=%.20g\n", d, u0); - printf("correct = %g, test = %g\n", mpfr_get_d(frx, GMP_RNDN), t); + printf("correct = %.20g, test = %.20g\n", mpfr_get_d(frx, GMP_RNDN), t); fflush(stdout); ecnt++; } @@ -221,6 +221,7 @@ int main(int argc,char **argv) if (u1 != 0 && ((fabs(d) <= rangemax && u1 > 3.5) || fabs(t) > 1 || !isnumber(t))) { printf("Pure C sincos sin arg=%.20g ulp=%.20g\n", d, u1); + printf("correct = %.20g, test = %.20g\n", mpfr_get_d(frx, GMP_RNDN), t); fflush(stdout); ecnt++; } @@ -228,6 +229,7 @@ int main(int argc,char **argv) if (u2 != 0 && ((fabs(d) <= rangemax && u2 > 1) || fabs(t) > 1 || !isnumber(t))) { printf("Pure C sin_u1 arg=%.20g ulp=%.20g\n", d, u2); + printf("correct = %.20g, test = %.20g\n", mpfr_get_d(frx, GMP_RNDN), t); fflush(stdout); ecnt++; } @@ -235,6 +237,7 @@ int main(int argc,char **argv) if (u3 != 0 && ((fabs(d) <= rangemax && u3 > 1) || fabs(t) > 1 || !isnumber(t))) { printf("Pure C sincos_u1 sin arg=%.20g ulp=%.20g\n", d, u3); + printf("correct = %.20g, test = %.20g\n", mpfr_get_d(frx, GMP_RNDN), t); fflush(stdout); ecnt++; } } @@ -278,7 +281,7 @@ int main(int argc,char **argv) double u0 = countULPdp(t = xtan(d), frx); - if (u0 != 0 && ((fabs(d) < 1e+7 && u0 > 3.5) || (fabs(d) <= rangemax && u0 > 5) || isnan(t))) { + if (u0 != 0 && ((fabs(d) <= rangemax && u0 > 3.5) || isnan(t))) { printf("Pure C tan arg=%.20g ulp=%.20g\n", d, u0); fflush(stdout); ecnt++; } @@ -290,7 +293,7 @@ int main(int argc,char **argv) fflush(stdout); ecnt++; } } - + { mpfr_set_d(frx, fabs(d), GMP_RNDN); mpfr_log(frx, frx, GMP_RNDN); @@ -378,7 +381,7 @@ int main(int argc,char **argv) double u0 = countULPdp(t = xexp10(d), frx); - if (u0 > 1) { + if (u0 > 1.09) { printf("Pure C exp10 arg=%.20g ulp=%.20g\n", d, u0); fflush(stdout); ecnt++; } diff --git a/src/libm-tester/tester2simddp.c b/src/libm-tester/tester2simddp.c index 99d8fb14..06593bb6 100644 --- a/src/libm-tester/tester2simddp.c +++ b/src/libm-tester/tester2simddp.c @@ -1,4 +1,4 @@ -// Copyright Naoki Shibata 2010 - 2017. +// Copyright Naoki Shibata 2010 - 2018. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -256,7 +256,7 @@ int main(int argc,char **argv) srandom(time(NULL)); - const double rangemax = 1e+14; // 2^(24*2-1) + const double rangemax = 1e+299; for(cnt = 0;ecnt < 1000;cnt++) { int e = cnt % VECTLENDP; @@ -268,7 +268,7 @@ int main(int argc,char **argv) zo = rnd(); break; case 1: - cd.d = rint((2 * (double)random() / RAND_MAX - 1) * 1e+10) * M_PI_4; + cd.d = rint(rnd_zo() * 1e+10) * M_PI_4; cd.i64 += (random() & 0xff) - 0x7f; d = cd.d; d2 = rnd(); @@ -276,7 +276,7 @@ int main(int argc,char **argv) zo = rnd(); break; case 2: - cd.d = rint((2 * (double)random() / RAND_MAX - 1) * 32) * M_PI_4; + cd.d = rint(rnd_zo() * 32) * M_PI_4; cd.i64 += (random() & 0xff) - 0x7f; d = cd.d; for(int i=0;i 3.5) || (fabs(d) <= rangemax && u0 > 5) || isnan(t))) { + if (u0 != 0 && ((fabs(d) <= rangemax && u0 > 3.5) || isnan(t))) { printf(ISANAME " tan arg=%.20g ulp=%.20g\n", d, u0); fflush(stdout); ecnt++; } @@ -444,7 +444,7 @@ int main(int argc,char **argv) fflush(stdout); ecnt++; } } - + { mpfr_set_d(frx, fabs(d), GMP_RNDN); mpfr_log(frx, frx, GMP_RNDN); @@ -532,7 +532,7 @@ int main(int argc,char **argv) double u0 = countULPdp(t = vget(xexp10(vd), e), frx); - if (u0 > 1) { + if (u0 > 1.09) { printf(ISANAME " exp10 arg=%.20g ulp=%.20g\n", d, u0); fflush(stdout); ecnt++; } diff --git a/src/libm-tester/tester2simdsp.c b/src/libm-tester/tester2simdsp.c index 33eaf2fe..2bb9f13c 100644 --- a/src/libm-tester/tester2simdsp.c +++ b/src/libm-tester/tester2simdsp.c @@ -1,4 +1,4 @@ -// Copyright Naoki Shibata 2010 - 2017. +// Copyright Naoki Shibata 2010 - 2018. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -228,8 +228,7 @@ int main(int argc,char **argv) srandom(time(NULL)); - const float rangemax = 39000; - const float rangemax3 = 5e+9; + const float rangemax = 1e+28; for(cnt = 0;ecnt < 1000;cnt++) { int e = cnt % VECTLENSP; @@ -241,7 +240,7 @@ int main(int argc,char **argv) zo = rnd(); break; case 1: - cd.f = rint((2 * (double)random() / RAND_MAX - 1) * 1e+10) * M_PI_4; + cd.f = rint(rnd_zo() * 1e+10) * M_PI_4; cd.i32 += (random() & 0xff) - 0x7f; d = cd.f; d2 = rnd(); @@ -344,14 +343,14 @@ int main(int argc,char **argv) float u2 = countULPsp(t = vget(xsinf_u1(vd), e), frx); - if (u2 != 0 && ((fabs(d) <= rangemax3 && u2 > 1) || fabs(t) > 1 || !isnumber(t))) { + if (u2 != 0 && ((fabs(d) <= rangemax && u2 > 1) || fabs(t) > 1 || !isnumber(t))) { printf(ISANAME " sinf_u1 arg=%.20g ulp=%.20g\n", d, u2); fflush(stdout); ecnt++; } float u3 = countULPsp(t = vget(sc2.x, e), frx); - if (u3 != 0 && ((fabs(d) <= rangemax3 && u3 > 1) || fabs(t) > 1 || !isnumber(t))) { + if (u3 != 0 && ((fabs(d) <= rangemax && u3 > 1) || fabs(t) > 1 || !isnumber(t))) { printf(ISANAME " sincosf_u1 sin arg=%.20g ulp=%.20g\n", d, u3); fflush(stdout); ecnt++; } @@ -377,14 +376,14 @@ int main(int argc,char **argv) float u2 = countULPsp(t = vget(xcosf_u1(vd), e), frx); - if (u2 != 0 && ((fabs(d) <= rangemax3 && u2 > 1) || fabs(t) > 1 || !isnumber(t))) { + if (u2 != 0 && ((fabs(d) <= rangemax && u2 > 1) || fabs(t) > 1 || !isnumber(t))) { printf(ISANAME " cosf_u1 arg=%.20g ulp=%.20g\n", d, u2); fflush(stdout); ecnt++; } float u3 = countULPsp(t = vget(sc2.y, e), frx); - if (u3 != 0 && ((fabs(d) <= rangemax3 && u3 > 1) || fabs(t) > 1 || !isnumber(t))) { + if (u3 != 0 && ((fabs(d) <= rangemax && u3 > 1) || fabs(t) > 1 || !isnumber(t))) { printf(ISANAME " sincosf_u1 cos arg=%.20g ulp=%.20g\n", d, u3); fflush(stdout); ecnt++; } @@ -403,7 +402,7 @@ int main(int argc,char **argv) float u1 = countULPsp(t = vget(xtanf_u1(vd), e), frx); - if (u1 != 0 && ((fabs(d) <= rangemax3 && u1 > 1) || isnan(t))) { + if (u1 != 0 && ((fabs(d) <= rangemax && u1 > 1) || isnan(t))) { printf(ISANAME " tanf_u1 arg=%.20g ulp=%.20g\n", d, u1); fflush(stdout); ecnt++; } diff --git a/src/libm-tester/tester2sp.c b/src/libm-tester/tester2sp.c index e7756ca9..844aa1d5 100644 --- a/src/libm-tester/tester2sp.c +++ b/src/libm-tester/tester2sp.c @@ -1,4 +1,4 @@ -// Copyright Naoki Shibata 2010 - 2017. +// Copyright Naoki Shibata 2010 - 2018. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -119,8 +119,7 @@ int main(int argc,char **argv) srandom(time(NULL)); - const float rangemax = 39000; - const float rangemax3 = 5e+9; + const float rangemax = 1e+28; for(cnt = 0;ecnt < 1000;cnt++) { switch(cnt & 7) { @@ -131,7 +130,7 @@ int main(int argc,char **argv) zo = rnd(); break; case 1: - cd.f = rint((2 * (double)random() / RAND_MAX - 1) * 1e+10) * M_PI_4; + cd.f = rint(rnd_zo() * 1e+10) * M_PI_4; cd.i32 += (random() & 0xff) - 0x7f; d = cd.f; d2 = rnd(); @@ -230,14 +229,14 @@ int main(int argc,char **argv) float u2 = countULPsp(t = xsinf_u1(d), frx); - if (u2 != 0 && ((fabs(d) <= rangemax3 && u2 > 1) || fabs(t) > 1 || !isnumber(t))) { + if (u2 != 0 && ((fabs(d) <= rangemax && u2 > 1) || fabs(t) > 1 || !isnumber(t))) { printf("Pure C sinf_u1 arg=%.20g ulp=%.20g\n", d, u2); fflush(stdout); ecnt++; } float u3 = countULPsp(t = sc2.x, frx); - if (u3 != 0 && ((fabs(d) <= rangemax3 && u3 > 1) || fabs(t) > 1 || !isnumber(t))) { + if (u3 != 0 && ((fabs(d) <= rangemax && u3 > 1) || fabs(t) > 1 || !isnumber(t))) { printf("Pure C sincosf_u1 sin arg=%.20g ulp=%.20g\n", d, u3); fflush(stdout); ecnt++; } @@ -263,14 +262,14 @@ int main(int argc,char **argv) float u2 = countULPsp(t = xcosf_u1(d), frx); - if (u2 != 0 && ((fabs(d) <= rangemax3 && u2 > 1) || fabs(t) > 1 || !isnumber(t))) { + if (u2 != 0 && ((fabs(d) <= rangemax && u2 > 1) || fabs(t) > 1 || !isnumber(t))) { printf("Pure C cosf_u1 arg=%.20g ulp=%.20g\n", d, u2); fflush(stdout); ecnt++; } float u3 = countULPsp(t = sc2.y, frx); - if (u3 != 0 && ((fabs(d) <= rangemax3 && u3 > 1) || fabs(t) > 1 || !isnumber(t))) { + if (u3 != 0 && ((fabs(d) <= rangemax && u3 > 1) || fabs(t) > 1 || !isnumber(t))) { printf("Pure C sincosf_u1 cos arg=%.20g ulp=%.20g\n", d, u3); fflush(stdout); ecnt++; } @@ -289,7 +288,7 @@ int main(int argc,char **argv) float u1 = countULPsp(t = xtanf_u1(d), frx); - if (u1 != 0 && ((fabs(d) <= rangemax3 && u1 > 1) || isnan(t))) { + if (u1 != 0 && ((fabs(d) <= rangemax && u1 > 1) || isnan(t))) { printf("Pure C tanf_u1 arg=%.20g ulp=%.20g\n", d, u1); fflush(stdout); ecnt++; } diff --git a/src/libm/CMakeLists.txt b/src/libm/CMakeLists.txt index 9b2dd514..5e22e2db 100644 --- a/src/libm/CMakeLists.txt +++ b/src/libm/CMakeLists.txt @@ -160,7 +160,7 @@ if (BUILD_SHARED_LIBS) endif() # Original sleef sources -set(STANDARD_SOURCES sleefdp.c sleefsp.c) +set(STANDARD_SOURCES sleefdp.c sleefsp.c rempitab.c) # Check for different precision support and add sources accordingly if(COMPILER_SUPPORTS_LONG_DOUBLE) @@ -361,7 +361,7 @@ if(ENABLE_GNUABI) endforeach() # Create library - add_library(${TARGET_LIBSLEEFGNUABI} ${TARGET_LIBSLEEFGNUABI_OBJECTS}) + add_library(${TARGET_LIBSLEEFGNUABI} ${TARGET_LIBSLEEFGNUABI_OBJECTS} rempitab.c) # Library properties set_target_properties(${TARGET_LIBSLEEFGNUABI} PROPERTIES diff --git a/src/libm/rempitab.c b/src/libm/rempitab.c new file mode 100644 index 00000000..b6e5c88a --- /dev/null +++ b/src/libm/rempitab.c @@ -0,0 +1,1084 @@ +// Copyright Naoki Shibata 2010 - 2018. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include "misc.h" + +NOEXPORT ALIGNED(64) const double rempitabdp[] = { + 0.15915494309189531785, 1.7916237278037667488e-17, 2.5454160968749269937e-33, 2.1132476107887107169e-49, + 0.03415494309189533173, 4.0384494702232122736e-18, 1.0046721413651383112e-33, 2.1132476107887107169e-49, + 0.03415494309189533173, 4.0384494702232122736e-18, 1.0046721413651383112e-33, 2.1132476107887107169e-49, + 0.0029049430918953351999, 5.6900251826959904774e-19, 4.1707169171520598517e-35, -2.496415728504571394e-51, + 0.0029049430918953351999, 5.6900251826959904774e-19, 4.1707169171520598517e-35, -2.496415728504571394e-51, + 0.0029049430918953351999, 5.6900251826959904774e-19, 4.1707169171520598517e-35, -2.496415728504571394e-51, + 0.0029049430918953351999, 5.6900251826959904774e-19, 4.1707169171520598517e-35, -2.496415728504571394e-51, + 0.00095181809189533563356, 1.3532164927539732229e-19, -6.4410794381603004826e-36, 1.7634898158762436344e-52, + 0.00095181809189533563356, 1.3532164927539732229e-19, -6.4410794381603004826e-36, 1.7634898158762436344e-52, + 0.00046353684189533574198, 2.6901432026846872871e-20, -4.2254836195018827479e-37, 9.301187206862134399e-54, + 0.00021939621689533574198, 2.6901432026846872871e-20, -4.2254836195018827479e-37, 9.301187206862134399e-54, + 9.7325904395335769087e-05, -2.0362228529073840241e-22, 6.2960434583523738135e-40, 2.6283399642369025999e-57, + 3.6290748145335769087e-05, -2.0362228529073840241e-22, 6.2960434583523738135e-40, 2.6283399642369025999e-57, + 5.7731700203357690874e-06, -2.0362228529073840241e-22, 6.2960434583523738135e-40, 2.6283399642369025999e-57, + 5.7731700203357690874e-06, -2.0362228529073840241e-22, 6.2960434583523738135e-40, 2.6283399642369025999e-57, + 5.7731700203357690874e-06, -2.0362228529073840241e-22, 6.2960434583523738135e-40, 2.6283399642369025999e-57, + 1.9584727547107690874e-06, -2.0362228529073840241e-22, 6.2960434583523738135e-40, 2.6283399642369025999e-57, + 5.1124121898268875627e-08, 8.135951522836682362e-24, 6.2960434583523738135e-40, 2.6283399642369025999e-57, + 5.1124121898268875627e-08, 8.135951522836682362e-24, 6.2960434583523738135e-40, 2.6283399642369025999e-57, + 5.1124121898268875627e-08, 8.135951522836682362e-24, 6.2960434583523738135e-40, 2.6283399642369025999e-57, + 5.1124121898268875627e-08, 8.135951522836682362e-24, 6.2960434583523738135e-40, 2.6283399642369025999e-57, + 5.1124121898268875627e-08, 8.135951522836682362e-24, 6.2960434583523738135e-40, 2.6283399642369025999e-57, + 5.1124121898268875627e-08, 8.135951522836682362e-24, 6.2960434583523738135e-40, 2.6283399642369025999e-57, + 2.1321799510573569745e-08, 1.5185066224124613304e-24, 2.6226236120327253511e-40, 2.6283399642369025999e-57, + 6.4206383167259151492e-09, -1.3585460269359374382e-25, -1.3244127270701094468e-41, -2.4695541513869446866e-57, + 6.4206383167259151492e-09, -1.3585460269359374382e-25, -1.3244127270701094468e-41, -2.4695541513869446866e-57, + 2.6953480182640010867e-09, -1.3585460269359374382e-25, -1.3244127270701094468e-41, -2.4695541513869446866e-57, + 8.3270286903304384868e-10, 7.0940550444663151936e-26, 9.7147467687967058732e-42, 7.9392906424978921242e-59, + 8.3270286903304384868e-10, 7.0940550444663151936e-26, 9.7147467687967058732e-42, 7.9392906424978921242e-59, + 3.6704158172530459087e-10, 7.0940550444663151936e-26, 9.7147467687967058732e-42, 7.9392906424978921242e-59, + 1.3421093807143501366e-10, 1.9241762160098927996e-26, 3.9750282589222551507e-42, 7.9392906424978921242e-59, + 1.7795616244500218596e-11, -1.452834466126541428e-28, -1.5869767474823787636e-44, -2.6168913164368963837e-61, + 1.7795616244500218596e-11, -1.452834466126541428e-28, -1.5869767474823787636e-44, -2.6168913164368963837e-61, + 1.7795616244500218596e-11, -1.452834466126541428e-28, -1.5869767474823787636e-44, -2.6168913164368963837e-61, + 3.2437010161333667893e-12, -1.452834466126541428e-28, -1.5869767474823787636e-44, -2.6168913164368963837e-61, + 3.2437010161333667893e-12, -1.452834466126541428e-28, -1.5869767474823787636e-44, -2.6168913164368963837e-61, + 3.2437010161333667893e-12, -1.452834466126541428e-28, -1.5869767474823787636e-44, -2.6168913164368963837e-61, + 1.4247116125875099096e-12, 2.5861333686050385673e-28, 2.8971783383570358633e-44, -2.6168913164368963837e-61, + 5.1521691081458187359e-13, 5.6664945123924856962e-29, 6.5510079543732854985e-45, -2.6168913164368963837e-61, + 6.0469559928117805118e-14, 6.1778471897801070206e-30, 9.4581409707401690366e-46, 4.9461632249367446986e-62, + 6.0469559928117805118e-14, 6.1778471897801070206e-30, 9.4581409707401690366e-46, 4.9461632249367446986e-62, + 6.0469559928117805118e-14, 6.1778471897801070206e-30, 9.4581409707401690366e-46, 4.9461632249367446986e-62, + 3.6261410673097965595e-15, -1.3304005198798645927e-31, -1.7578597149294783985e-47, 8.4432539107728104262e-64, + 3.6261410673097965595e-15, -1.3304005198798645927e-31, -1.7578597149294783985e-47, 8.4432539107728104262e-64, + 3.6261410673097965595e-15, -1.3304005198798645927e-31, -1.7578597149294783985e-47, 8.4432539107728104262e-64, + 3.6261410673097965595e-15, -1.3304005198798645927e-31, -1.7578597149294783985e-47, 8.4432539107728104262e-64, + 7.3427388509295482183e-17, 1.4871367740953237822e-32, -1.1571307704883330232e-48, -6.7249112515659578102e-65, + 7.3427388509295482183e-17, 1.4871367740953237822e-32, -1.1571307704883330232e-48, -6.7249112515659578102e-65, + 7.3427388509295482183e-17, 1.4871367740953237822e-32, -1.1571307704883330232e-48, -6.7249112515659578102e-65, + 7.3427388509295482183e-17, 1.4871367740953237822e-32, -1.1571307704883330232e-48, -6.7249112515659578102e-65, + 7.3427388509295482183e-17, 1.4871367740953237822e-32, -1.1571307704883330232e-48, -6.7249112515659578102e-65, + 7.3427388509295482183e-17, 1.4871367740953237822e-32, -1.1571307704883330232e-48, -6.7249112515659578102e-65, + 1.7916237278037667488e-17, 2.5454160968749269937e-33, 2.1132476107887107169e-49, 8.7154294504188129325e-66, + 1.7916237278037667488e-17, 2.5454160968749269937e-33, 2.1132476107887107169e-49, 8.7154294504188129325e-66, + 4.0384494702232122736e-18, 1.0046721413651383112e-33, 2.1132476107887107169e-49, 8.7154294504188129325e-66, + 4.0384494702232122736e-18, 1.0046721413651383112e-33, 2.1132476107887107169e-49, 8.7154294504188129325e-66, + 5.6900251826959904774e-19, 4.1707169171520598517e-35, -2.4964157285045710972e-51, -1.866653112309982615e-67, + 5.6900251826959904774e-19, 4.1707169171520598517e-35, -2.4964157285045710972e-51, -1.866653112309982615e-67, + 5.6900251826959904774e-19, 4.1707169171520598517e-35, -2.4964157285045710972e-51, -1.866653112309982615e-67, + 1.3532164927539732229e-19, -6.4410794381603004826e-36, 1.7634898158762432635e-52, 3.5887057810247033998e-68, + 1.3532164927539732229e-19, -6.4410794381603004826e-36, 1.7634898158762432635e-52, 3.5887057810247033998e-68, + 2.6901432026846872871e-20, -4.2254836195018827479e-37, 9.3011872068621332399e-54, 1.113250147552460308e-69, + 2.6901432026846872871e-20, -4.2254836195018827479e-37, 9.3011872068621332399e-54, 1.113250147552460308e-69, + 2.6901432026846872871e-20, -4.2254836195018827479e-37, 9.3011872068621332399e-54, 1.113250147552460308e-69, + 1.3348904870778067446e-20, -4.2254836195018827479e-37, 9.3011872068621332399e-54, 1.113250147552460308e-69, + 6.5726412927436632287e-21, 1.0820844071023395684e-36, 1.7634898158762432635e-52, 3.5887057810247033998e-68, + 3.1845095037264626247e-21, 3.2976802257607573031e-37, 9.3011872068621332399e-54, 1.113250147552460308e-69, + 1.4904436092178623228e-21, -4.6390169687056261795e-38, -1.1392999419355048437e-54, -4.587677453735884283e-71, + 6.4341066196356198368e-22, -4.6390169687056261795e-38, -1.1392999419355048437e-54, -4.587677453735884283e-71, + 2.1989418833641172011e-22, 4.7649378378726728402e-38, 9.3011872068621332399e-54, 1.113250147552460308e-69, + 8.135951522836682362e-24, 6.2960434583523738135e-40, 2.6283399642369020339e-57, 5.3358074162805516304e-73, + 8.135951522836682362e-24, 6.2960434583523738135e-40, 2.6283399642369020339e-57, 5.3358074162805516304e-73, + 8.135951522836682362e-24, 6.2960434583523738135e-40, 2.6283399642369020339e-57, 5.3358074162805516304e-73, + 8.135951522836682362e-24, 6.2960434583523738135e-40, 2.6283399642369020339e-57, 5.3358074162805516304e-73, + 8.135951522836682362e-24, 6.2960434583523738135e-40, 2.6283399642369020339e-57, 5.3358074162805516304e-73, + 1.5185066224124613304e-24, 2.6226236120327253511e-40, 2.6283399642369020339e-57, 5.3358074162805516304e-73, + 1.5185066224124613304e-24, 2.6226236120327253511e-40, 2.6283399642369020339e-57, 5.3358074162805516304e-73, + 1.5185066224124613304e-24, 2.6226236120327253511e-40, 2.6283399642369020339e-57, 5.3358074162805516304e-73, + 6.9132600985943383921e-25, 7.8591368887290111994e-41, 2.6283399642369020339e-57, 5.3358074162805516304e-73, + 2.7773570358292009361e-25, -1.3244127270701094468e-41, -2.4695541513869446866e-57, -3.2399200798614356002e-74, + 7.0940550444663151936e-26, 9.7147467687967058732e-42, 7.9392906424978921242e-59, 2.9745456030524896742e-75, + 7.0940550444663151936e-26, 9.7147467687967058732e-42, 7.9392906424978921242e-59, 2.9745456030524896742e-75, + 1.9241762160098927996e-26, 3.9750282589222551507e-42, 7.9392906424978921242e-59, 2.9745456030524896742e-75, + 1.9241762160098927996e-26, 3.9750282589222551507e-42, 7.9392906424978921242e-59, 2.9745456030524896742e-75, + 6.317065088957874881e-27, -3.2976062348358281152e-43, -2.6168913164368963837e-61, 3.7036201000008290615e-78, + 6.317065088957874881e-27, -3.2976062348358281152e-43, -2.6168913164368963837e-61, 3.7036201000008290615e-78, + 3.0858908211726098086e-27, 3.8770419025072344914e-43, 7.9392906424978921242e-59, 2.9745456030524896742e-75, + 1.4703036872799779898e-27, 2.8971783383570358633e-44, -2.6168913164368963837e-61, 3.7036201000008290615e-78, + 6.625101203336619011e-28, 2.8971783383570358633e-44, -2.6168913164368963837e-61, 3.7036201000008290615e-78, + 2.5861333686050385673e-28, 2.8971783383570358633e-44, -2.6168913164368963837e-61, 3.7036201000008290615e-78, + 5.6664945123924856962e-29, 6.5510079543732854985e-45, -2.6168913164368963837e-61, 3.7036201000008290615e-78, + 5.6664945123924856962e-29, 6.5510079543732854985e-45, -2.6168913164368963837e-61, 3.7036201000008290615e-78, + 6.1778471897801070206e-30, 9.4581409707401690366e-46, 4.9461632249367446986e-62, 3.7036201000008290615e-78, + 6.1778471897801070206e-30, 9.4581409707401690366e-46, 4.9461632249367446986e-62, 3.7036201000008290615e-78, + 6.1778471897801070206e-30, 9.4581409707401690366e-46, 4.9461632249367446986e-62, 3.7036201000008290615e-78, + 6.1778471897801070206e-30, 9.4581409707401690366e-46, 4.9461632249367446986e-62, 3.7036201000008290615e-78, + 3.0224035688960604996e-30, 2.451648649116083682e-46, 4.9461632249367446986e-62, 3.7036201000008290615e-78, + 1.4446817584540368888e-30, 2.451648649116083682e-46, 4.9461632249367446986e-62, 3.7036201000008290615e-78, + 6.5582085323302525856e-31, 7.0002556871006273225e-47, 1.0567786762735315635e-62, -6.1446417754639313137e-79, + 2.6139040062251944343e-31, -1.7578597149294783985e-47, 8.4432539107728090768e-64, 1.9517662449371102229e-79, + 6.4175174317266470186e-32, 4.3166913557804827486e-48, 8.4432539107728090768e-64, 1.9517662449371102229e-79, + 6.4175174317266470186e-32, 4.3166913557804827486e-48, 8.4432539107728090768e-64, 1.9517662449371102229e-79, + 1.4871367740953237822e-32, -1.1571307704883330232e-48, -6.7249112515659569668e-65, -7.2335760163150273591e-81, + 1.4871367740953237822e-32, -1.1571307704883330232e-48, -6.7249112515659569668e-65, -7.2335760163150273591e-81, + 2.5454160968749269937e-33, 2.1132476107887107169e-49, 8.7154294504188118783e-66, 1.2001823382693912203e-81, + 2.5454160968749269937e-33, 2.1132476107887107169e-49, 8.7154294504188118783e-66, 1.2001823382693912203e-81, + 2.5454160968749269937e-33, 2.1132476107887107169e-49, 8.7154294504188118783e-66, 1.2001823382693912203e-81, + 1.0046721413651383112e-33, 2.1132476107887107169e-49, 8.7154294504188118783e-66, 1.2001823382693912203e-81, + 2.3430016361024414106e-34, 4.0267819632970559834e-50, -7.8013829534098555144e-67, -1.1759240463442418271e-82, + 2.3430016361024414106e-34, 4.0267819632970559834e-50, -7.8013829534098555144e-67, -1.1759240463442418271e-82, + 4.1707169171520598517e-35, -2.4964157285045710972e-51, -1.866653112309982615e-67, 1.4185069655957361252e-83, + 4.1707169171520598517e-35, -2.4964157285045710972e-51, -1.866653112309982615e-67, 1.4185069655957361252e-83, + 4.1707169171520598517e-35, -2.4964157285045710972e-51, -1.866653112309982615e-67, 1.4185069655957361252e-83, + 1.7633044866680145008e-35, 2.8491136916798196016e-51, 4.0680767287898916022e-67, 1.4185069655957361252e-83, + 5.595982714259923599e-36, 1.7634898158762432635e-52, 3.588705781024702988e-68, 5.9489775128085140685e-84, + 5.595982714259923599e-36, 1.7634898158762432635e-52, 3.588705781024702988e-68, 5.9489775128085140685e-84, + 2.5867171761548675786e-36, 1.7634898158762432635e-52, 3.588705781024702988e-68, 5.9489775128085140685e-84, + 1.0820844071023395684e-36, 1.7634898158762432635e-52, 3.588705781024702988e-68, 5.9489775128085140685e-84, + 3.2976802257607573031e-37, 9.3011872068621332399e-54, 1.113250147552460308e-69, 2.9286284920280944778e-86, + 3.2976802257607573031e-37, 9.3011872068621332399e-54, 1.113250147552460308e-69, 2.9286284920280944778e-86, + 1.4168892644450972904e-37, 9.3011872068621332399e-54, 1.113250147552460308e-69, 2.9286284920280944778e-86, + 4.7649378378726728402e-38, 9.3011872068621332399e-54, 1.113250147552460308e-69, 2.9286284920280944778e-86, + 6.2960434583523738135e-40, 2.6283399642369020339e-57, 5.3358074162805516304e-73, 4.524218473063975309e-90, + 6.2960434583523738135e-40, 2.6283399642369020339e-57, 5.3358074162805516304e-73, 4.524218473063975309e-90, + 6.2960434583523738135e-40, 2.6283399642369020339e-57, 5.3358074162805516304e-73, 4.524218473063975309e-90, + 6.2960434583523738135e-40, 2.6283399642369020339e-57, 5.3358074162805516304e-73, 4.524218473063975309e-90, + 6.2960434583523738135e-40, 2.6283399642369020339e-57, 5.3358074162805516304e-73, 4.524218473063975309e-90, + 6.2960434583523738135e-40, 2.6283399642369020339e-57, 5.3358074162805516304e-73, 4.524218473063975309e-90, + 6.2960434583523738135e-40, 2.6283399642369020339e-57, 5.3358074162805516304e-73, 4.524218473063975309e-90, + 2.6226236120327253511e-40, 2.6283399642369020339e-57, 5.3358074162805516304e-73, 4.524218473063975309e-90, + 7.8591368887290111994e-41, 2.6283399642369020339e-57, 5.3358074162805516304e-73, 4.524218473063975309e-90, + 7.8591368887290111994e-41, 2.6283399642369020339e-57, 5.3358074162805516304e-73, 4.524218473063975309e-90, + 3.2673620808294506214e-41, 2.6283399642369020339e-57, 5.3358074162805516304e-73, 4.524218473063975309e-90, + 9.7147467687967058732e-42, 7.9392906424978921242e-59, 2.9745456030524891833e-75, 5.969437008257943935e-91, + 9.7147467687967058732e-42, 7.9392906424978921242e-59, 2.9745456030524891833e-75, 5.969437008257943935e-91, + 3.9750282589222551507e-42, 7.9392906424978921242e-59, 2.9745456030524891833e-75, 5.969437008257943935e-91, + 1.1051690039850297894e-42, 7.9392906424978921242e-59, 2.9745456030524891833e-75, 5.969437008257943935e-91, + 1.1051690039850297894e-42, 7.9392906424978921242e-59, 2.9745456030524891833e-75, 5.969437008257943935e-91, + 3.8770419025072344914e-43, 7.9392906424978921242e-59, 2.9745456030524891833e-75, 5.969437008257943935e-91, + 2.8971783383570358633e-44, -2.6168913164368963837e-61, 3.7036201000008285821e-78, 5.6554937751584084315e-94, + 2.8971783383570358633e-44, -2.6168913164368963837e-61, 3.7036201000008285821e-78, 5.6554937751584084315e-94, + 2.8971783383570358633e-44, -2.6168913164368963837e-61, 3.7036201000008285821e-78, 5.6554937751584084315e-94, + 2.8971783383570358633e-44, -2.6168913164368963837e-61, 3.7036201000008285821e-78, 5.6554937751584084315e-94, + 6.5510079543732854985e-45, -2.6168913164368963837e-61, 3.7036201000008285821e-78, 5.6554937751584084315e-94, + 6.5510079543732854985e-45, -2.6168913164368963837e-61, 3.7036201000008285821e-78, 5.6554937751584084315e-94, + 9.4581409707401690366e-46, 4.9461632249367446986e-62, 3.7036201000008285821e-78, 5.6554937751584084315e-94, + 9.4581409707401690366e-46, 4.9461632249367446986e-62, 3.7036201000008285821e-78, 5.6554937751584084315e-94, + 9.4581409707401690366e-46, 4.9461632249367446986e-62, 3.7036201000008285821e-78, 5.6554937751584084315e-94, + 2.451648649116083682e-46, 4.9461632249367446986e-62, 3.7036201000008285821e-78, 5.6554937751584084315e-94, + 2.451648649116083682e-46, 4.9461632249367446986e-62, 3.7036201000008285821e-78, 5.6554937751584084315e-94, + 7.0002556871006273225e-47, 1.0567786762735315635e-62, -6.1446417754639301152e-79, -1.5355611056488084652e-94, + 7.0002556871006273225e-47, 1.0567786762735315635e-62, -6.1446417754639301152e-79, -1.5355611056488084652e-94, + 2.6211979860855749482e-47, 8.4432539107728090768e-64, 1.9517662449371099233e-79, 2.62202614552995759e-95, + 4.3166913557804827486e-48, 8.4432539107728090768e-64, 1.9517662449371099233e-79, 2.62202614552995759e-95, + 4.3166913557804827486e-48, 8.4432539107728090768e-64, 1.9517662449371099233e-79, 2.62202614552995759e-95, + 4.3166913557804827486e-48, 8.4432539107728090768e-64, 1.9517662449371099233e-79, 2.62202614552995759e-95, + 1.5797802926460750146e-48, 2.3660905534865399025e-64, -7.2335760163150273591e-81, 2.8738690232659205689e-99, + 2.1132476107887107169e-49, 8.7154294504188118783e-66, 1.2001823382693912203e-81, 2.8738690232659205689e-99, + 2.1132476107887107169e-49, 8.7154294504188118783e-66, 1.2001823382693912203e-81, 2.8738690232659205689e-99, + 2.1132476107887107169e-49, 8.7154294504188118783e-66, 1.2001823382693912203e-81, 2.8738690232659205689e-99, + 4.0267819632970559834e-50, -7.8013829534098555144e-67, -1.1759240463442418271e-82, 2.8738690232659205689e-99, + 4.0267819632970559834e-50, -7.8013829534098555144e-67, -1.1759240463442418271e-82, 2.8738690232659205689e-99, + 4.0267819632970559834e-50, -7.8013829534098555144e-67, -1.1759240463442418271e-82, 2.8738690232659205689e-99, + 1.8885701952232994665e-50, -7.8013829534098555144e-67, -1.1759240463442418271e-82, 2.8738690232659205689e-99, + 8.1946431118642097069e-51, 1.5937536410989638719e-66, 1.459625439463388979e-82, 2.8738690232659205689e-99, + 2.8491136916798196016e-51, 4.0680767287898916022e-67, 1.4185069655957361252e-83, -7.8369062883735917115e-100, + 1.7634898158762432635e-52, 3.588705781024702988e-68, 5.9489775128085131541e-84, 1.0450891972142808004e-99, + 1.7634898158762432635e-52, 3.588705781024702988e-68, 5.9489775128085131541e-84, 1.0450891972142808004e-99, + 1.7634898158762432635e-52, 3.588705781024702988e-68, 5.9489775128085131541e-84, 1.0450891972142808004e-99, + 1.7634898158762432635e-52, 3.588705781024702988e-68, 5.9489775128085131541e-84, 1.0450891972142808004e-99, + 9.3011872068621332399e-54, 1.113250147552460308e-69, 2.9286284920280941206e-86, 2.1132026692048600853e-102, + 9.3011872068621332399e-54, 1.113250147552460308e-69, 2.9286284920280941206e-86, 2.1132026692048600853e-102, + 9.3011872068621332399e-54, 1.113250147552460308e-69, 2.9286284920280941206e-86, 2.1132026692048600853e-102, + 9.3011872068621332399e-54, 1.113250147552460308e-69, 2.9286284920280941206e-86, 2.1132026692048600853e-102, + 9.3011872068621332399e-54, 1.113250147552460308e-69, 2.9286284920280941206e-86, 2.1132026692048600853e-102, + 4.0809436324633147776e-54, -4.587677453735884283e-71, -2.8859500138942368532e-87, -5.6567402911297190423e-103, + 1.470821845263904967e-54, -4.587677453735884283e-71, -2.8859500138942368532e-87, -5.6567402911297190423e-103, + 1.6576095166419998917e-55, 2.6568658093254848067e-71, 5.1571087196495574384e-87, 3.2728487032630537605e-103, + 1.6576095166419998917e-55, 2.6568658093254848067e-71, 5.1571087196495574384e-87, 3.2728487032630537605e-103, + 1.6576095166419998917e-55, 2.6568658093254848067e-71, 5.1571087196495574384e-87, 3.2728487032630537605e-103, + 2.6283399642369020339e-57, 5.3358074162805516304e-73, 4.5242184730639744369e-90, 1.145584788913072936e-105, + 2.6283399642369020339e-57, 5.3358074162805516304e-73, 4.5242184730639744369e-90, 1.145584788913072936e-105, + 2.6283399642369020339e-57, 5.3358074162805516304e-73, 4.5242184730639744369e-90, 1.145584788913072936e-105, + 2.6283399642369020339e-57, 5.3358074162805516304e-73, 4.5242184730639744369e-90, 1.145584788913072936e-105, + 2.6283399642369020339e-57, 5.3358074162805516304e-73, 4.5242184730639744369e-90, 1.145584788913072936e-105, + 2.6283399642369020339e-57, 5.3358074162805516304e-73, 4.5242184730639744369e-90, 1.145584788913072936e-105, + 7.9392906424978921242e-59, 2.9745456030524891833e-75, 5.969437008257942845e-91, 5.554706987098633963e-107, + 7.9392906424978921242e-59, 2.9745456030524891833e-75, 5.969437008257942845e-91, 5.554706987098633963e-107, + 7.9392906424978921242e-59, 2.9745456030524891833e-75, 5.969437008257942845e-91, 5.554706987098633963e-107, + 7.9392906424978921242e-59, 2.9745456030524891833e-75, 5.969437008257942845e-91, 5.554706987098633963e-107, + 7.9392906424978921242e-59, 2.9745456030524891833e-75, 5.969437008257942845e-91, 5.554706987098633963e-107, + 7.9392906424978921242e-59, 2.9745456030524891833e-75, 5.969437008257942845e-91, 5.554706987098633963e-107, + 3.9565608646667614317e-59, 2.9745456030524891833e-75, 5.969437008257942845e-91, 5.554706987098633963e-107, + 1.9651959757511960854e-59, 2.9745456030524891833e-75, 5.969437008257942845e-91, 5.554706987098633963e-107, + 9.6951353129341363331e-60, 7.6368645294831185015e-76, 1.0603435429602168369e-91, 1.0451839188820145747e-108, + 4.7167230906452229674e-60, 7.6368645294831185015e-76, 1.0603435429602168369e-91, 1.0451839188820145747e-108, + 2.2275169795007668372e-60, 2.1097166542226745549e-76, 4.4670685979800101779e-92, 1.0451839188820145747e-108, + 9.8291392392853877215e-61, -6.5385728340754726503e-77, -1.3520652573660833788e-93, -2.3220403312043059402e-109, + 3.6061239614242446325e-61, 7.2792968540756372162e-77, 1.3988851821689310822e-92, 1.0451839188820145747e-108, + 4.9461632249367446986e-62, 3.7036201000008285821e-78, 5.6554937751584084315e-94, -1.9306041120023063932e-110, + 4.9461632249367446986e-62, 3.7036201000008285821e-78, 5.6554937751584084315e-94, -1.9306041120023063932e-110, + 4.9461632249367446986e-62, 3.7036201000008285821e-78, 5.6554937751584084315e-94, -1.9306041120023063932e-110, + 1.0567786762735315635e-62, -6.1446417754639301152e-79, -1.535561105648808199e-94, -1.9306041120023063932e-110, + 1.0567786762735315635e-62, -6.1446417754639301152e-79, -1.535561105648808199e-94, -1.9306041120023063932e-110, + 8.4432539107728090768e-64, 1.9517662449371099233e-79, 2.62202614552995759e-95, 6.5314563001514358328e-112, + 8.4432539107728090768e-64, 1.9517662449371099233e-79, 2.62202614552995759e-95, 6.5314563001514358328e-112, + 8.4432539107728090768e-64, 1.9517662449371099233e-79, 2.62202614552995759e-95, 6.5314563001514358328e-112, + 8.4432539107728090768e-64, 1.9517662449371099233e-79, 2.62202614552995759e-95, 6.5314563001514358328e-112, + 2.3660905534865399025e-64, -7.2335760163150273591e-81, 2.8738690232659205689e-99, 1.8395411057335783574e-115, + 2.3660905534865399025e-64, -7.2335760163150273591e-81, 2.8738690232659205689e-99, 1.8395411057335783574e-115, + 8.4679971416497210292e-65, -7.2335760163150273591e-81, 2.8738690232659205689e-99, 1.8395411057335783574e-115, + 8.7154294504188118783e-66, 1.2001823382693912203e-81, 2.8738690232659205689e-99, 1.8395411057335783574e-115, + 8.7154294504188118783e-66, 1.2001823382693912203e-81, 2.8738690232659205689e-99, 1.8395411057335783574e-115, + 8.7154294504188118783e-66, 1.2001823382693912203e-81, 2.8738690232659205689e-99, 1.8395411057335783574e-115, + 8.7154294504188118783e-66, 1.2001823382693912203e-81, 2.8738690232659205689e-99, 1.8395411057335783574e-115, + 3.9676455775389135587e-66, 1.459625439463388979e-82, 2.8738690232659205689e-99, 1.8395411057335783574e-115, + 1.5937536410989638719e-66, 1.459625439463388979e-82, 2.8738690232659205689e-99, 1.8395411057335783574e-115, + 4.0680767287898916022e-67, 1.4185069655957361252e-83, -7.8369062883735917115e-100, -1.9081236411894110579e-116, + 4.0680767287898916022e-67, 1.4185069655957361252e-83, -7.8369062883735917115e-100, -1.9081236411894110579e-116, + 1.1007118082399544936e-67, 1.4185069655957361252e-83, -7.8369062883735917115e-100, -1.9081236411894110579e-116, + 1.1007118082399544936e-67, 1.4185069655957361252e-83, -7.8369062883735917115e-100, -1.9081236411894110579e-116, + 3.588705781024702988e-68, 5.9489775128085131541e-84, 1.0450891972142805974e-99, 1.8395411057335783574e-115, + 3.588705781024702988e-68, 5.9489775128085131541e-84, 1.0450891972142805974e-99, 1.8395411057335783574e-115, + 1.7341027056809927069e-68, 1.830931441234090934e-84, 1.3069928418846076386e-100, 3.1677600334418876704e-116, + 8.0680116800913756637e-69, -2.2809159455312046184e-85, -4.0748824503880445403e-101, -6.3915272253158644628e-117, + 3.4315039917320989315e-69, -2.2809159455312046184e-85, -4.0748824503880445403e-101, -6.3915272253158644628e-117, + 1.113250147552460308e-69, 2.9286284920280941206e-86, 2.1132026692048600853e-102, -4.6672632026740766185e-119, + 1.113250147552460308e-69, 2.9286284920280941206e-86, 2.1132026692048600853e-102, -4.6672632026740766185e-119, + 5.3368668650755071652e-70, 2.9286284920280941206e-86, 2.1132026692048600853e-102, -4.6672632026740766185e-119, + 2.4390495598509592076e-70, 2.9286284920280941206e-86, 2.1132026692048600853e-102, -4.6672632026740766185e-119, + 9.901409072386855505e-71, -2.8859500138942368532e-87, -5.6567402911297190423e-103, -4.6672632026740766185e-119, + 2.6568658093254848067e-71, 5.1571087196495574384e-87, 3.2728487032630532648e-103, 5.2465720993401781599e-119, + 2.6568658093254848067e-71, 5.1571087196495574384e-87, 3.2728487032630532648e-103, 5.2465720993401781599e-119, + 8.4572999356014273536e-72, 1.1355793528776598461e-87, 3.2728487032630532648e-103, 5.2465720993401781599e-119, + 8.4572999356014273536e-72, 1.1355793528776598461e-87, 3.2728487032630532648e-103, 5.2465720993401781599e-119, + 3.9294603961880721752e-72, 1.3019701118468578292e-88, -7.5747169634236195447e-105, -2.0152904854894729832e-121, + 1.6655406264813940833e-72, 1.3019701118468578292e-88, -7.5747169634236195447e-105, -2.0152904854894729832e-121, + 5.3358074162805516304e-73, 4.5242184730639744369e-90, 1.1455847889130727424e-105, 1.8573014293598455046e-121, + 5.3358074162805516304e-73, 4.5242184730639744369e-90, 1.1455847889130727424e-105, 1.8573014293598455046e-121, + 2.5059077041472040156e-73, 4.5242184730639744369e-90, 1.1455847889130727424e-105, 1.8573014293598455046e-121, + 1.0909578480805302081e-73, 4.5242184730639744369e-90, 1.1455847889130727424e-105, 1.8573014293598455046e-121, + 3.8348292004719330442e-74, 4.5242184730639744369e-90, 1.1455847889130727424e-105, 1.8573014293598455046e-121, + 2.9745456030524891833e-75, 5.969437008257942845e-91, 5.5547069870986327528e-107, 1.6304246661326865276e-122, + 2.9745456030524891833e-75, 5.969437008257942845e-91, 5.5547069870986327528e-107, 1.6304246661326865276e-122, + 2.9745456030524891833e-75, 5.969437008257942845e-91, 5.5547069870986327528e-107, 1.6304246661326865276e-122, + 2.9745456030524891833e-75, 5.969437008257942845e-91, 5.5547069870986327528e-107, 1.6304246661326865276e-122, + 7.6368645294831185015e-76, 1.0603435429602168369e-91, 1.0451839188820145747e-108, 4.2386081393205242443e-125, + 7.6368645294831185015e-76, 1.0603435429602168369e-91, 1.0451839188820145747e-108, 4.2386081393205242443e-125, + 2.1097166542226745549e-76, 4.4670685979800101779e-92, 1.0451839188820145747e-108, 4.2386081393205242443e-125, + 2.1097166542226745549e-76, 4.4670685979800101779e-92, 1.0451839188820145747e-108, 4.2386081393205242443e-125, + 7.2792968540756372162e-77, 1.3988851821689310822e-92, 1.0451839188820145747e-108, 4.2386081393205242443e-125, + 3.7036201000008285821e-78, 5.6554937751584084315e-94, -1.9306041120023063932e-110, 1.0223371855251472933e-126, + 3.7036201000008285821e-78, 5.6554937751584084315e-94, -1.9306041120023063932e-110, 1.0223371855251472933e-126, + 3.7036201000008285821e-78, 5.6554937751584084315e-94, -1.9306041120023063932e-110, 1.0223371855251472933e-126, + 3.7036201000008285821e-78, 5.6554937751584084315e-94, -1.9306041120023063932e-110, 1.0223371855251472933e-126, + 3.7036201000008285821e-78, 5.6554937751584084315e-94, -1.9306041120023063932e-110, 1.0223371855251472933e-126, + 1.5445779612272179051e-78, 8.6145718795359707834e-95, 7.3062078800278780675e-111, 1.0223371855251472933e-126, + 4.6505689184041232695e-79, 8.6145718795359707834e-95, 7.3062078800278780675e-111, 1.0223371855251472933e-126, + 4.6505689184041232695e-79, 8.6145718795359707834e-95, 7.3062078800278780675e-111, 1.0223371855251472933e-126, + 1.9517662449371099233e-79, 2.62202614552995759e-95, 6.5314563001514349095e-112, 9.9039323746573674262e-128, + 6.0236490820360325022e-80, -3.7424672147304925625e-96, -1.784871512364483542e-112, 6.7095375687163151728e-129, + 6.0236490820360325022e-80, -3.7424672147304925625e-96, -1.784871512364483542e-112, 6.7095375687163151728e-129, + 2.6501457402022643213e-80, 3.7482149527770239293e-96, 6.5314563001514349095e-112, 9.9039323746573674262e-128, + 9.6339406928538097998e-81, 2.8738690232659205689e-99, 1.8395411057335783574e-115, -7.8150389500644475446e-132, + 1.2001823382693912203e-81, 2.8738690232659205689e-99, 1.8395411057335783574e-115, -7.8150389500644475446e-132, + 1.2001823382693912203e-81, 2.8738690232659205689e-99, 1.8395411057335783574e-115, -7.8150389500644475446e-132, + 1.2001823382693912203e-81, 2.8738690232659205689e-99, 1.8395411057335783574e-115, -7.8150389500644475446e-132, + 1.459625439463388979e-82, 2.8738690232659205689e-99, 1.8395411057335783574e-115, -7.8150389500644475446e-132, + 1.459625439463388979e-82, 2.8738690232659205689e-99, 1.8395411057335783574e-115, -7.8150389500644475446e-132, + 1.459625439463388979e-82, 2.8738690232659205689e-99, 1.8395411057335783574e-115, -7.8150389500644475446e-132, + 1.4185069655957361252e-83, -7.8369062883735917115e-100, -1.9081236411894107761e-116, -2.1796760241698337334e-132, + 1.4185069655957361252e-83, -7.8369062883735917115e-100, -1.9081236411894107761e-116, -2.1796760241698337334e-132, + 1.4185069655957361252e-83, -7.8369062883735917115e-100, -1.9081236411894107761e-116, -2.1796760241698337334e-132, + 1.4185069655957361252e-83, -7.8369062883735917115e-100, -1.9081236411894107761e-116, -2.1796760241698337334e-132, + 5.9489775128085131541e-84, 1.0450891972142805974e-99, 1.8395411057335783574e-115, -7.8150389500644475446e-132, + 1.830931441234090934e-84, 1.3069928418846076386e-100, 3.1677600334418871069e-116, 3.4556869017247800778e-132, + 1.830931441234090934e-84, 1.3069928418846076386e-100, 3.1677600334418871069e-116, 3.4556869017247800778e-132, + 8.0141992334048515034e-85, 1.3069928418846076386e-100, 3.1677600334418871069e-116, 3.4556869017247800778e-132, + 2.8666416439368237283e-85, 1.6400545060233297363e-101, -4.6672632026740766185e-119, -3.755176715260116501e-136, + 2.9286284920280941206e-86, 2.1132026692048600853e-102, -4.6672632026740766185e-119, -3.755176715260116501e-136, + 2.9286284920280941206e-86, 2.1132026692048600853e-102, -4.6672632026740766185e-119, -3.755176715260116501e-136, + 2.9286284920280941206e-86, 2.1132026692048600853e-102, -4.6672632026740766185e-119, -3.755176715260116501e-136, + 2.9286284920280941206e-86, 2.1132026692048600853e-102, -4.6672632026740766185e-119, -3.755176715260116501e-136, + 1.3200167453193350837e-86, 2.1132026692048600853e-102, -4.6672632026740766185e-119, -3.755176715260116501e-136, + 5.1571087196495574384e-87, 3.2728487032630532648e-103, 5.2465720993401781599e-119, -3.755176715260116501e-136, + 1.1355793528776598461e-87, 3.2728487032630532648e-103, 5.2465720993401781599e-119, -3.755176715260116501e-136, + 1.1355793528776598461e-87, 3.2728487032630532648e-103, 5.2465720993401781599e-119, -3.755176715260116501e-136, + 1.3019701118468578292e-88, -7.5747169634236195447e-105, -2.0152904854894725532e-121, -3.1562414818576682143e-137, + 1.3019701118468578292e-88, -7.5747169634236195447e-105, -2.0152904854894725532e-121, -3.1562414818576682143e-137, + 1.3019701118468578292e-88, -7.5747169634236195447e-105, -2.0152904854894725532e-121, -3.1562414818576682143e-137, + 4.5242184730639744369e-90, 1.1455847889130727424e-105, 1.8573014293598452896e-121, 1.1431992269852683481e-137, + 4.5242184730639744369e-90, 1.1455847889130727424e-105, 1.8573014293598452896e-121, 1.1431992269852683481e-137, + 4.5242184730639744369e-90, 1.1455847889130727424e-105, 1.8573014293598452896e-121, 1.1431992269852683481e-137, + 4.5242184730639744369e-90, 1.1455847889130727424e-105, 1.8573014293598452896e-121, 1.1431992269852683481e-137, + 4.5242184730639744369e-90, 1.1455847889130727424e-105, 1.8573014293598452896e-121, 1.1431992269852683481e-137, + 5.969437008257942845e-91, 5.5547069870986327528e-107, 1.6304246661326865276e-122, 6.8339049774534162772e-139, + 5.969437008257942845e-91, 5.5547069870986327528e-107, 1.6304246661326865276e-122, 6.8339049774534162772e-139, + 5.969437008257942845e-91, 5.5547069870986327528e-107, 1.6304246661326865276e-122, 6.8339049774534162772e-139, + 1.0603435429602168369e-91, 1.0451839188820145747e-108, 4.2386081393205242443e-125, 1.1062055705591188256e-141, + 1.0603435429602168369e-91, 1.0451839188820145747e-108, 4.2386081393205242443e-125, 1.1062055705591188256e-141, + 1.0603435429602168369e-91, 1.0451839188820145747e-108, 4.2386081393205242443e-125, 1.1062055705591188256e-141, + 4.4670685979800101779e-92, 1.0451839188820145747e-108, 4.2386081393205242443e-125, 1.1062055705591188256e-141, + 1.3988851821689310822e-92, 1.0451839188820145747e-108, 4.2386081393205242443e-125, 1.1062055705591188256e-141, + 1.3988851821689310822e-92, 1.0451839188820145747e-108, 4.2386081393205242443e-125, 1.1062055705591188256e-141, + 6.3183932821616130831e-93, 1.0451839188820145747e-108, 4.2386081393205242443e-125, 1.1062055705591188256e-141, + 2.4831640123977650651e-93, 1.9359195088038447797e-109, -4.8867691298577234423e-126, -2.0587960670007823264e-142, + 5.6554937751584084315e-94, -1.9306041120023063932e-110, 1.0223371855251471293e-126, 1.2214168761472102282e-142, + 5.6554937751584084315e-94, -1.9306041120023063932e-110, 1.0223371855251471293e-126, 1.2214168761472102282e-142, + 8.6145718795359707834e-95, 7.3062078800278780675e-111, 1.0223371855251471293e-126, 1.2214168761472102282e-142, + 8.6145718795359707834e-95, 7.3062078800278780675e-111, 1.0223371855251471293e-126, 1.2214168761472102282e-142, + 8.6145718795359707834e-95, 7.3062078800278780675e-111, 1.0223371855251471293e-126, 1.2214168761472102282e-142, + 2.62202614552995759e-95, 6.5314563001514349095e-112, 9.9039323746573674262e-128, -8.6629775332868987041e-145, + 2.62202614552995759e-95, 6.5314563001514349095e-112, 9.9039323746573674262e-128, -8.6629775332868987041e-145, + 1.1238897120284541253e-95, 6.5314563001514349095e-112, 9.9039323746573674262e-128, -8.6629775332868987041e-145, + 3.7482149527770239293e-96, 6.5314563001514349095e-112, 9.9039323746573674262e-128, -8.6629775332868987041e-145, + 2.8738690232659205689e-99, 1.8395411057335783574e-115, -7.8150389500644475446e-132, -3.9681466199873824165e-148, + 2.8738690232659205689e-99, 1.8395411057335783574e-115, -7.8150389500644475446e-132, -3.9681466199873824165e-148, + 2.8738690232659205689e-99, 1.8395411057335783574e-115, -7.8150389500644475446e-132, -3.9681466199873824165e-148, + 2.8738690232659205689e-99, 1.8395411057335783574e-115, -7.8150389500644475446e-132, -3.9681466199873824165e-148, + 2.8738690232659205689e-99, 1.8395411057335783574e-115, -7.8150389500644475446e-132, -3.9681466199873824165e-148, + 2.8738690232659205689e-99, 1.8395411057335783574e-115, -7.8150389500644475446e-132, -3.9681466199873824165e-148, + 2.8738690232659205689e-99, 1.8395411057335783574e-115, -7.8150389500644475446e-132, -3.9681466199873824165e-148, + 2.8738690232659205689e-99, 1.8395411057335783574e-115, -7.8150389500644475446e-132, -3.9681466199873824165e-148, + 2.8738690232659205689e-99, 1.8395411057335783574e-115, -7.8150389500644475446e-132, -3.9681466199873824165e-148, + 2.8738690232659205689e-99, 1.8395411057335783574e-115, -7.8150389500644475446e-132, -3.9681466199873824165e-148, + 2.8738690232659205689e-99, 1.8395411057335783574e-115, -7.8150389500644475446e-132, -3.9681466199873824165e-148, + 1.0450891972142805974e-99, 1.8395411057335783574e-115, -7.8150389500644475446e-132, -3.9681466199873824165e-148, + 1.3069928418846076386e-100, 3.1677600334418871069e-116, 3.4556869017247794521e-132, 8.5448727249069983612e-148, + 1.3069928418846076386e-100, 3.1677600334418871069e-116, 3.4556869017247794521e-132, 8.5448727249069983612e-148, + 1.3069928418846076386e-100, 3.1677600334418871069e-116, 3.4556869017247794521e-132, 8.5448727249069983612e-148, + 1.6400545060233297363e-101, -4.6672632026740766185e-119, -3.755176715260116501e-136, 2.1571619860435652883e-152, + 1.6400545060233297363e-101, -4.6672632026740766185e-119, -3.755176715260116501e-136, 2.1571619860435652883e-152, + 1.6400545060233297363e-101, -4.6672632026740766185e-119, -3.755176715260116501e-136, 2.1571619860435652883e-152, + 2.1132026692048600853e-102, -4.6672632026740766185e-119, -3.755176715260116501e-136, 2.1571619860435652883e-152, + 2.1132026692048600853e-102, -4.6672632026740766185e-119, -3.755176715260116501e-136, 2.1571619860435652883e-152, + 2.1132026692048600853e-102, -4.6672632026740766185e-119, -3.755176715260116501e-136, 2.1571619860435652883e-152, + 3.2728487032630532648e-103, 5.2465720993401781599e-119, -3.755176715260116501e-136, 2.1571619860435652883e-152, + 3.2728487032630532648e-103, 5.2465720993401781599e-119, -3.755176715260116501e-136, 2.1571619860435652883e-152, + 3.2728487032630532648e-103, 5.2465720993401781599e-119, -3.755176715260116501e-136, 2.1571619860435652883e-152, + 1.0404514546648604359e-103, 2.896544483330507019e-120, 3.1239284188885823808e-136, 2.1571619860435652883e-152, + 1.0404514546648604359e-103, 2.896544483330507019e-120, 3.1239284188885823808e-136, 2.1571619860435652883e-152, + 4.8235214251531210473e-104, 2.896544483330507019e-120, 3.1239284188885823808e-136, 2.1571619860435652883e-152, + 2.0330248644053793915e-104, 2.896544483330507019e-120, 3.1239284188885823808e-136, 2.1571619860435652883e-152, + 6.3777658403150887343e-105, -2.0152904854894725532e-121, -3.156241481857667737e-137, -7.0684085473731388916e-153, + 6.3777658403150887343e-105, -2.0152904854894725532e-121, -3.156241481857667737e-137, -7.0684085473731388916e-153, + 2.88964513938041089e-105, 5.7298933442091639924e-121, -3.156241481857667737e-137, -7.0684085473731388916e-153, + 1.1455847889130727424e-105, 1.8573014293598452896e-121, 1.1431992269852681095e-137, 2.4782675885631257398e-153, + 2.7355461367940366859e-106, -7.8994528064813712419e-123, -2.0037599452814940222e-138, 9.1598554579059548847e-155, + 2.7355461367940366859e-106, -7.8994528064813712419e-123, -2.0037599452814940222e-138, 9.1598554579059548847e-155, + 5.5547069870986327528e-107, 1.6304246661326865276e-122, 6.8339049774534147855e-139, 9.1598554579059548847e-155, + 5.5547069870986327528e-107, 1.6304246661326865276e-122, 6.8339049774534147855e-139, 9.1598554579059548847e-155, + 1.0451839188820145747e-108, 4.2386081393205242443e-125, 1.1062055705591186799e-141, 1.1734404793201255869e-157, + 1.0451839188820145747e-108, 4.2386081393205242443e-125, 1.1062055705591186799e-141, 1.1734404793201255869e-157, + 1.0451839188820145747e-108, 4.2386081393205242443e-125, 1.1062055705591186799e-141, 1.1734404793201255869e-157, + 1.0451839188820145747e-108, 4.2386081393205242443e-125, 1.1062055705591186799e-141, 1.1734404793201255869e-157, + 1.0451839188820145747e-108, 4.2386081393205242443e-125, 1.1062055705591186799e-141, 1.1734404793201255869e-157, + 1.0451839188820145747e-108, 4.2386081393205242443e-125, 1.1062055705591186799e-141, 1.1734404793201255869e-157, + 1.9359195088038447797e-109, -4.8867691298577234423e-126, -2.0587960670007819622e-142, -2.8326669474241479263e-158, + 1.9359195088038447797e-109, -4.8867691298577234423e-126, -2.0587960670007819622e-142, -2.8326669474241479263e-158, + 1.9359195088038447797e-109, -4.8867691298577234423e-126, -2.0587960670007819622e-142, -2.8326669474241479263e-158, + 8.7142954880180709975e-110, -4.8867691298577234423e-126, -2.0587960670007819622e-142, -2.8326669474241479263e-158, + 3.3918456880078814158e-110, 6.931443500908017045e-126, 1.1062055705591186799e-141, 1.1734404793201255869e-157, + 7.3062078800278780675e-111, 1.0223371855251471293e-126, 1.2214168761472102282e-142, 8.0910098773220312367e-159, + 7.3062078800278780675e-111, 1.0223371855251471293e-126, 1.2214168761472102282e-142, 8.0910098773220312367e-159, + 6.5314563001514349095e-112, 9.9039323746573674262e-128, -8.6629775332868972816e-145, -1.5987060076657616072e-160, + 6.5314563001514349095e-112, 9.9039323746573674262e-128, -8.6629775332868972816e-145, -1.5987060076657616072e-160, + 6.5314563001514349095e-112, 9.9039323746573674262e-128, -8.6629775332868972816e-145, -1.5987060076657616072e-160, + 6.5314563001514349095e-112, 9.9039323746573674262e-128, -8.6629775332868972816e-145, -1.5987060076657616072e-160, + 2.3732923938934761454e-112, 6.7095375687163138915e-129, 1.6963686085056791706e-144, 1.2464251916751375716e-160, + 2.9421044076449630171e-113, 6.7095375687163138915e-129, 1.6963686085056791706e-144, 1.2464251916751375716e-160, + 2.9421044076449630171e-113, 6.7095375687163138915e-129, 1.6963686085056791706e-144, 1.2464251916751375716e-160, + 2.9421044076449630171e-113, 6.7095375687163138915e-129, 1.6963686085056791706e-144, 1.2464251916751375716e-160, + 3.4325196623373878948e-114, 9.3892593260023063019e-130, 9.4702132359198537748e-146, 1.7950099192230045857e-161, + 3.4325196623373878948e-114, 9.3892593260023063019e-130, 9.4702132359198537748e-146, 1.7950099192230045857e-161, + 3.4325196623373878948e-114, 9.3892593260023063019e-130, 9.4702132359198537748e-146, 1.7950099192230045857e-161, + 1.8395411057335783574e-115, -7.8150389500644475446e-132, -3.9681466199873824165e-148, 2.9106774506606945839e-164, + 1.8395411057335783574e-115, -7.8150389500644475446e-132, -3.9681466199873824165e-148, 2.9106774506606945839e-164, + 1.8395411057335783574e-115, -7.8150389500644475446e-132, -3.9681466199873824165e-148, 2.9106774506606945839e-164, + 1.8395411057335783574e-115, -7.8150389500644475446e-132, -3.9681466199873824165e-148, 2.9106774506606945839e-164, + 1.8395411057335783574e-115, -7.8150389500644475446e-132, -3.9681466199873824165e-148, 2.9106774506606945839e-164, + 8.2436437080731844263e-116, 1.4726412753514008951e-131, -3.9681466199873824165e-148, 2.9106774506606945839e-164, + 3.1677600334418871069e-116, 3.4556869017247794521e-132, 8.544872724906996972e-148, 1.6802919634942429241e-163, + 6.2981819612623816536e-117, 6.3800543877747317218e-133, 7.2423563434801054878e-149, 1.1741471776254779927e-164, + 6.2981819612623816536e-117, 6.3800543877747317218e-133, 7.2423563434801054878e-149, 1.1741471776254779927e-164, + 6.2981819612623816536e-117, 6.3800543877747317218e-133, 7.2423563434801054878e-149, 1.1741471776254779927e-164, + 3.1257546646178208289e-117, -6.6414926959353515111e-134, -5.7828074707888119584e-150, -1.2825052715093464343e-165, + 1.5395410162955400644e-117, -6.6414926959353515111e-134, -5.7828074707888119584e-150, -1.2825052715093464343e-165, + 7.4643419213439950602e-118, 1.0969016447485317626e-133, -5.7828074707888119584e-150, -1.2825052715093464343e-165, + 3.4988078005382940294e-118, 2.1637618757749825688e-134, -8.9490928918944555247e-151, -1.9717385086233606481e-166, + 1.5160407401354430737e-118, 2.1637618757749825688e-134, -8.9490928918944555247e-151, -1.9717385086233606481e-166, + 5.2465720993401781599e-119, -3.755176715260116501e-136, 2.1571619860435648643e-152, 6.3257905089784152346e-168, + 2.896544483330507019e-120, 3.1239284188885823808e-136, 2.1571619860435648643e-152, 6.3257905089784152346e-168, + 2.896544483330507019e-120, 3.1239284188885823808e-136, 2.1571619860435648643e-152, 6.3257905089784152346e-168, + 2.896544483330507019e-120, 3.1239284188885823808e-136, 2.1571619860435648643e-152, 6.3257905089784152346e-168, + 2.896544483330507019e-120, 3.1239284188885823808e-136, 2.1571619860435648643e-152, 6.3257905089784152346e-168, + 2.896544483330507019e-120, 3.1239284188885823808e-136, 2.1571619860435648643e-152, 6.3257905089784152346e-168, + 1.3475077173907800538e-120, -3.156241481857667737e-137, -7.0684085473731388916e-153, -3.3573283875161501977e-170, + 5.7298933442091639924e-121, -3.156241481857667737e-137, -7.0684085473731388916e-153, -3.3573283875161501977e-170, + 1.8573014293598452896e-121, 1.1431992269852681095e-137, 2.4782675885631257398e-153, -3.3573283875161501977e-170, + 1.8573014293598452896e-121, 1.1431992269852681095e-137, 2.4782675885631257398e-153, -3.3573283875161501977e-170, + 8.8915345064751572143e-122, 1.1431992269852681095e-137, 2.4782675885631257398e-153, -3.3573283875161501977e-170, + 4.0507946129135104481e-122, 6.8339049774534147855e-139, 9.1598554579059548847e-155, -4.5159745404911825673e-172, + 1.6304246661326865276e-122, 6.8339049774534147855e-139, 9.1598554579059548847e-155, -4.5159745404911825673e-172, + 4.2023969274227456735e-123, 6.8339049774534147855e-139, 9.1598554579059548847e-155, -4.5159745404911825673e-172, + 4.2023969274227456735e-123, 6.8339049774534147855e-139, 9.1598554579059548847e-155, -4.5159745404911825673e-172, + 1.1769344939467164447e-123, 1.1602886988632691941e-140, 3.0307583960570927356e-156, 5.8345524661064369683e-172, + 1.1769344939467164447e-123, 1.1602886988632691941e-140, 3.0307583960570927356e-156, 5.8345524661064369683e-172, + 4.2056888557770896953e-124, 1.1602886988632691941e-140, 3.0307583960570927356e-156, 5.8345524661064369683e-172, + 4.2386081393205242443e-125, 1.1062055705591186799e-141, 1.1734404793201255869e-157, 1.2381024895275844856e-174, + 4.2386081393205242443e-125, 1.1062055705591186799e-141, 1.1734404793201255869e-157, 1.2381024895275844856e-174, + 4.2386081393205242443e-125, 1.1062055705591186799e-141, 1.1734404793201255869e-157, 1.2381024895275844856e-174, + 4.2386081393205242443e-125, 1.1062055705591186799e-141, 1.1734404793201255869e-157, 1.2381024895275844856e-174, + 1.8749656131673758844e-125, 1.1062055705591186799e-141, 1.1734404793201255869e-157, 1.2381024895275844856e-174, + 6.931443500908017045e-126, 1.1062055705591186799e-141, 1.1734404793201255869e-157, 1.2381024895275844856e-174, + 1.0223371855251471293e-126, 1.2214168761472102282e-142, 8.0910098773220302259e-159, 1.2381024895275844856e-174, + 1.0223371855251471293e-126, 1.2214168761472102282e-142, 8.0910098773220302259e-159, 1.2381024895275844856e-174, + 1.0223371855251471293e-126, 1.2214168761472102282e-142, 8.0910098773220302259e-159, 1.2381024895275844856e-174, + 2.8369889610228834887e-127, 4.0136364036021218058e-143, -1.0134099605688458828e-159, -2.5389576707476506925e-176, + 2.8369889610228834887e-127, 4.0136364036021218058e-143, -1.0134099605688458828e-159, -2.5389576707476506925e-176, + 9.9039323746573674262e-128, -8.6629775332868972816e-145, -1.5987060076657612913e-160, -2.5389576707476506925e-176, + 6.7095375687163138915e-129, 1.6963686085056791706e-144, 1.2464251916751375716e-160, 6.197724948400014906e-177, + 6.7095375687163138915e-129, 1.6963686085056791706e-144, 1.2464251916751375716e-160, 6.197724948400014906e-177, + 6.7095375687163138915e-129, 1.6963686085056791706e-144, 1.2464251916751375716e-160, 6.197724948400014906e-177, + 6.7095375687163138915e-129, 1.6963686085056791706e-144, 1.2464251916751375716e-160, 6.197724948400014906e-177, + 9.3892593260023063019e-130, 9.4702132359198537748e-146, 1.7950099192230045857e-161, -1.6991004655691155518e-177, + 9.3892593260023063019e-130, 9.4702132359198537748e-146, 1.7950099192230045857e-161, -1.6991004655691155518e-177, + 9.3892593260023063019e-130, 9.4702132359198537748e-146, 1.7950099192230045857e-161, -1.6991004655691155518e-177, + 2.175994780857201024e-130, 1.4618808551874518553e-146, 1.6802919634942426156e-163, 2.8330093736631818036e-179, + 2.175994780857201024e-130, 1.4618808551874518553e-146, 1.6802919634942426156e-163, 2.8330093736631818036e-179, + 3.7267864457092460442e-131, 4.6083930759590139305e-147, 1.6802919634942426156e-163, 2.8330093736631818036e-179, + 3.7267864457092460442e-131, 4.6083930759590139305e-147, 1.6802919634942426156e-163, 2.8330093736631818036e-179, + 3.7267864457092460442e-131, 4.6083930759590139305e-147, 1.6802919634942426156e-163, 2.8330093736631818036e-179, + 1.4726412753514008951e-131, -3.9681466199873824165e-148, 2.9106774506606941983e-164, 5.1948630316441296498e-180, + 3.4556869017247794521e-132, 8.544872724906996972e-148, 1.6802919634942426156e-163, 2.8330093736631818036e-179, + 3.4556869017247794521e-132, 8.544872724906996972e-148, 1.6802919634942426156e-163, 2.8330093736631818036e-179, + 6.3800543877747317218e-133, 7.2423563434801054878e-149, 1.1741471776254777999e-164, 1.3389912474795152755e-180, + 6.3800543877747317218e-133, 7.2423563434801054878e-149, 1.1741471776254777999e-164, 1.3389912474795152755e-180, + 6.3800543877747317218e-133, 7.2423563434801054878e-149, 1.1741471776254777999e-164, 1.3389912474795152755e-180, + 2.8579525590905986764e-133, -5.7828074707888119584e-150, -1.2825052715093464343e-165, -1.0696067158221530218e-181, + 1.0969016447485317626e-133, -5.7828074707888119584e-150, -1.2825052715093464343e-165, -1.0696067158221530218e-181, + 2.1637618757749825688e-134, -8.9490928918944555247e-151, -1.9717385086233606481e-166, 1.3535321672928907047e-182, + 2.1637618757749825688e-134, -8.9490928918944555247e-151, -1.9717385086233606481e-166, 1.3535321672928907047e-182, + 2.1637618757749825688e-134, -8.9490928918944555247e-151, -1.9717385086233606481e-166, 1.3535321672928907047e-182, + 1.0631050543111905033e-134, 1.5490398016102376505e-150, 3.4549185946116918017e-166, 1.3535321672928907047e-182, + 5.1277664357929471499e-135, 3.2706525621039604902e-151, 7.4159004299416557678e-167, 1.3535321672928907047e-182, + 2.3761243821334675971e-135, 3.2706525621039604902e-151, 7.4159004299416557678e-167, 1.3535321672928907047e-182, + 1.0003033553037281263e-135, 2.1571619860435648643e-152, 6.3257905089784152346e-168, 3.5607241064750984115e-184, + 3.1239284188885823808e-136, 2.1571619860435648643e-152, 6.3257905089784152346e-168, 3.5607241064750984115e-184, + 3.1239284188885823808e-136, 2.1571619860435648643e-152, 6.3257905089784152346e-168, 3.5607241064750984115e-184, + 1.4041521353514076604e-136, 2.1571619860435648643e-152, 6.3257905089784152346e-168, 3.5607241064750984115e-184, + 5.4426399358282049106e-137, 2.4782675885631257398e-153, -3.3573283875161501977e-170, 3.0568054078295488291e-186, + 1.1431992269852681095e-137, 2.4782675885631257398e-153, -3.3573283875161501977e-170, 3.0568054078295488291e-186, + 1.1431992269852681095e-137, 2.4782675885631257398e-153, -3.3573283875161501977e-170, 3.0568054078295488291e-186, + 6.8339049774534147855e-139, 9.1598554579059548847e-155, -4.5159745404911819927e-172, -4.5870810097328578981e-188, + 6.8339049774534147855e-139, 9.1598554579059548847e-155, -4.5159745404911819927e-172, -4.5870810097328578981e-188, + 6.8339049774534147855e-139, 9.1598554579059548847e-155, -4.5159745404911819927e-172, -4.5870810097328578981e-188, + 6.8339049774534147855e-139, 9.1598554579059548847e-155, -4.5159745404911819927e-172, -4.5870810097328578981e-188, + 1.1602886988632691941e-140, 3.0307583960570927356e-156, 5.8345524661064358191e-172, 6.9043123899963188689e-188, + 1.1602886988632691941e-140, 3.0307583960570927356e-156, 5.8345524661064358191e-172, 6.9043123899963188689e-188, + 1.1602886988632691941e-140, 3.0307583960570927356e-156, 5.8345524661064358191e-172, 6.9043123899963188689e-188, + 1.1602886988632691941e-140, 3.0307583960570927356e-156, 5.8345524661064358191e-172, 6.9043123899963188689e-188, + 1.1602886988632691941e-140, 3.0307583960570927356e-156, 5.8345524661064358191e-172, 6.9043123899963188689e-188, + 1.1602886988632691941e-140, 3.0307583960570927356e-156, 5.8345524661064358191e-172, 6.9043123899963188689e-188, + 1.1062055705591186799e-141, 1.1734404793201255869e-157, 1.2381024895275844856e-174, -8.4789520282639751913e-191, + 1.1062055705591186799e-141, 1.1734404793201255869e-157, 1.2381024895275844856e-174, -8.4789520282639751913e-191, + 1.1062055705591186799e-141, 1.1734404793201255869e-157, 1.2381024895275844856e-174, -8.4789520282639751913e-191, + 1.1062055705591186799e-141, 1.1734404793201255869e-157, 1.2381024895275844856e-174, -8.4789520282639751913e-191, + 4.5016298192952031469e-142, -2.8326669474241479263e-158, 1.2381024895275844856e-174, -8.4789520282639751913e-191, + 1.2214168761472102282e-142, 8.0910098773220302259e-159, 1.2381024895275844856e-174, -8.4789520282639751913e-191, + 1.2214168761472102282e-142, 8.0910098773220302259e-159, 1.2381024895275844856e-174, -8.4789520282639751913e-191, + 4.0136364036021218058e-143, -1.0134099605688458828e-159, -2.5389576707476506925e-176, -6.2404128071707654958e-193, + 4.0136364036021218058e-143, -1.0134099605688458828e-159, -2.5389576707476506925e-176, -6.2404128071707654958e-193, + 1.9635033141346264592e-143, -1.0134099605688458828e-159, -2.5389576707476506925e-176, -6.2404128071707654958e-193, + 9.3843676940087855824e-144, 1.2626949989038732076e-159, 2.2730883653953564668e-175, 2.7431118386590483722e-191, + 4.2590349703400483539e-144, 1.2464251916751375716e-160, 6.1977249484000140293e-177, 1.1294061984896458822e-192, + 1.6963686085056791706e-144, 1.2464251916751375716e-160, 6.1977249484000140293e-177, 1.1294061984896458822e-192, + 4.1503542758849472122e-145, -1.7614040799531193879e-161, -1.6991004655691153326e-177, -1.856794109153959173e-193, + 4.1503542758849472122e-145, -1.7614040799531193879e-161, -1.6991004655691153326e-177, -1.856794109153959173e-193, + 9.4702132359198537748e-146, 1.7950099192230045857e-161, -1.6991004655691153326e-177, -1.856794109153959173e-193, + 9.4702132359198537748e-146, 1.7950099192230045857e-161, -1.6991004655691153326e-177, -1.856794109153959173e-193, + 1.4618808551874518553e-146, 1.6802919634942426156e-163, 2.8330093736631818036e-179, -7.4549709281190454638e-196, + 1.4618808551874518553e-146, 1.6802919634942426156e-163, 2.8330093736631818036e-179, -7.4549709281190454638e-196, + 1.4618808551874518553e-146, 1.6802919634942426156e-163, 2.8330093736631818036e-179, -7.4549709281190454638e-196, + 4.6083930759590139305e-147, 1.6802919634942426156e-163, 2.8330093736631818036e-179, -7.4549709281190454638e-196, + 4.6083930759590139305e-147, 1.6802919634942426156e-163, 2.8330093736631818036e-179, -7.4549709281190454638e-196, + 2.105789206980137775e-147, 1.6802919634942426156e-163, 2.8330093736631818036e-179, -7.4549709281190454638e-196, + 8.544872724906996972e-148, 1.6802919634942426156e-163, 2.8330093736631818036e-179, -7.4549709281190454638e-196, + 2.2883630524598079723e-148, 2.9106774506606941983e-164, 5.1948630316441287936e-180, 9.6685396110091032843e-196, + 2.2883630524598079723e-148, 2.9106774506606941983e-164, 5.1948630316441287936e-180, 9.6685396110091032843e-196, + 7.2423563434801054878e-149, 1.1741471776254777999e-164, 1.3389912474795150614e-180, 1.1067843414450286726e-196, + 7.2423563434801054878e-149, 1.1741471776254777999e-164, 1.3389912474795150614e-180, 1.1067843414450286726e-196, + 3.3320377982006123631e-149, 3.0588204110786950436e-165, 3.7502330143836152136e-181, 3.6564932749519464998e-198, + 1.3768785255608653665e-149, 3.0588204110786950436e-165, 3.7502330143836152136e-181, 3.6564932749519464998e-198, + 3.9929888924099219388e-150, -1.9717385086233606481e-166, 1.3535321672928907047e-182, 3.1205762277848031878e-199, + 3.9929888924099219388e-150, -1.9717385086233606481e-166, 1.3535321672928907047e-182, 3.1205762277848031878e-199, + 1.5490398016102376505e-150, 3.4549185946116918017e-166, 1.3535321672928907047e-182, 3.1205762277848031878e-199, + 3.2706525621039604902e-151, 7.4159004299416557678e-167, 1.3535321672928907047e-182, 3.1205762277848031878e-199, + 3.2706525621039604902e-151, 7.4159004299416557678e-167, 1.3535321672928907047e-182, 3.1205762277848031878e-199, + 2.1571619860435648643e-152, 6.3257905089784152346e-168, 3.5607241064750984115e-184, -1.4832196127821708615e-201, + 2.1571619860435648643e-152, 6.3257905089784152346e-168, 3.5607241064750984115e-184, -1.4832196127821708615e-201, + 2.1571619860435648643e-152, 6.3257905089784152346e-168, 3.5607241064750984115e-184, -1.4832196127821708615e-201, + 2.1571619860435648643e-152, 6.3257905089784152346e-168, 3.5607241064750984115e-184, -1.4832196127821708615e-201, + 2.4782675885631257398e-153, -3.3573283875161501977e-170, 3.0568054078295488291e-186, 1.4980560800565462618e-202, + 2.4782675885631257398e-153, -3.3573283875161501977e-170, 3.0568054078295488291e-186, 1.4980560800565462618e-202, + 2.4782675885631257398e-153, -3.3573283875161501977e-170, 3.0568054078295488291e-186, 1.4980560800565462618e-202, + 9.1598554579059548847e-155, -4.5159745404911819927e-172, -4.5870810097328572602e-188, -3.2905064432040069127e-204, + 9.1598554579059548847e-155, -4.5159745404911819927e-172, -4.5870810097328572602e-188, -3.2905064432040069127e-204, + 9.1598554579059548847e-155, -4.5159745404911819927e-172, -4.5870810097328572602e-188, -3.2905064432040069127e-204, + 9.1598554579059548847e-155, -4.5159745404911819927e-172, -4.5870810097328572602e-188, -3.2905064432040069127e-204, + 9.1598554579059548847e-155, -4.5159745404911819927e-172, -4.5870810097328572602e-188, -3.2905064432040069127e-204, + 1.7015147267057481414e-155, -4.5159745404911819927e-172, -4.5870810097328572602e-188, -3.2905064432040069127e-204, + 1.7015147267057481414e-155, -4.5159745404911819927e-172, -4.5870810097328572602e-188, -3.2905064432040069127e-204, + 1.7015147267057481414e-155, -4.5159745404911819927e-172, -4.5870810097328572602e-188, -3.2905064432040069127e-204, + 7.6922213530572229852e-156, -4.5159745404911819927e-172, -4.5870810097328572602e-188, -3.2905064432040069127e-204, + 3.0307583960570927356e-156, 5.8345524661064358191e-172, 6.9043123899963188689e-188, -3.2905064432040069127e-204, + 7.0002691755702864582e-157, 6.5928896280762691321e-173, 1.1586156901317304854e-188, -1.0100405885278530137e-205, + 7.0002691755702864582e-157, 6.5928896280762691321e-173, 1.1586156901317304854e-188, -1.0100405885278530137e-205, + 1.1734404793201255869e-157, 1.2381024895275844856e-174, -8.4789520282639751913e-191, -1.3321093418096261919e-207, + 1.1734404793201255869e-157, 1.2381024895275844856e-174, -8.4789520282639751913e-191, -1.3321093418096261919e-207, + 1.1734404793201255869e-157, 1.2381024895275844856e-174, -8.4789520282639751913e-191, -1.3321093418096261919e-207, + 4.4508689228885539715e-158, 1.2381024895275844856e-174, -8.4789520282639751913e-191, -1.3321093418096261919e-207, + 8.0910098773220302259e-159, 1.2381024895275844856e-174, -8.4789520282639751913e-191, -1.3321093418096261919e-207, + 8.0910098773220302259e-159, 1.2381024895275844856e-174, -8.4789520282639751913e-191, -1.3321093418096261919e-207, + 8.0910098773220302259e-159, 1.2381024895275844856e-174, -8.4789520282639751913e-191, -1.3321093418096261919e-207, + 3.5387999583765925506e-159, 2.2730883653953564668e-175, 2.7431118386590483722e-191, -1.3321093418096261919e-207, + 1.2626949989038732076e-159, 2.2730883653953564668e-175, 2.7431118386590483722e-191, -1.3321093418096261919e-207, + 1.2464251916751375716e-160, 6.1977249484000140293e-177, 1.1294061984896456875e-192, 2.2526486929936882202e-208, + 1.2464251916751375716e-160, 6.1977249484000140293e-177, 1.1294061984896456875e-192, 2.2526486929936882202e-208, + 1.2464251916751375716e-160, 6.1977249484000140293e-177, 1.1294061984896456875e-192, 2.2526486929936882202e-208, + 1.2464251916751375716e-160, 6.1977249484000140293e-177, 1.1294061984896456875e-192, 2.2526486929936882202e-208, + 5.3514239183991277695e-161, 6.1977249484000140293e-177, 1.1294061984896456875e-192, 2.2526486929936882202e-208, + 1.7950099192230045857e-161, -1.6991004655691153326e-177, -1.8567941091539589297e-193, -1.8074851186411640793e-209, + 1.6802919634942426156e-163, 2.8330093736631818036e-179, -7.4549709281190454638e-196, -1.4481306607622412036e-212, + 1.6802919634942426156e-163, 2.8330093736631818036e-179, -7.4549709281190454638e-196, -1.4481306607622412036e-212, + 1.6802919634942426156e-163, 2.8330093736631818036e-179, -7.4549709281190454638e-196, -1.4481306607622412036e-212, + 1.6802919634942426156e-163, 2.8330093736631818036e-179, -7.4549709281190454638e-196, -1.4481306607622412036e-212, + 1.6802919634942426156e-163, 2.8330093736631818036e-179, -7.4549709281190454638e-196, -1.4481306607622412036e-212, + 1.6802919634942426156e-163, 2.8330093736631818036e-179, -7.4549709281190454638e-196, -1.4481306607622412036e-212, + 1.6802919634942426156e-163, 2.8330093736631818036e-179, -7.4549709281190454638e-196, -1.4481306607622412036e-212, + 2.9106774506606941983e-164, 5.1948630316441287936e-180, 9.6685396110091013832e-196, 1.7562785002189357559e-211, + 2.9106774506606941983e-164, 5.1948630316441287936e-180, 9.6685396110091013832e-196, 1.7562785002189357559e-211, + 2.9106774506606941983e-164, 5.1948630316441287936e-180, 9.6685396110091013832e-196, 1.7562785002189357559e-211, + 1.1741471776254777999e-164, 1.3389912474795150614e-180, 1.106784341445028435e-196, 3.3045982549756583552e-212, + 3.0588204110786950436e-165, 3.7502330143836152136e-181, 3.6564932749519464998e-198, 3.7097125405852507464e-214, + 3.0588204110786950436e-165, 3.7502330143836152136e-181, 3.6564932749519464998e-198, 3.7097125405852507464e-214, + 8.8815756978467430465e-166, 1.3403131492807310959e-181, 3.6564932749519464998e-198, 3.7097125405852507464e-214, + 8.8815756978467430465e-166, 1.3403131492807310959e-181, 3.6564932749519464998e-198, 3.7097125405852507464e-214, + 3.4549185946116918017e-166, 1.3535321672928907047e-182, 3.1205762277848031878e-199, -3.3569248349832580936e-217, + 7.4159004299416557678e-167, 1.3535321672928907047e-182, 3.1205762277848031878e-199, -3.3569248349832580936e-217, + 7.4159004299416557678e-167, 1.3535321672928907047e-182, 3.1205762277848031878e-199, -3.3569248349832580936e-217, + 6.3257905089784152346e-168, 3.5607241064750984115e-184, -1.4832196127821708615e-201, 2.6911956484118910092e-218, + 6.3257905089784152346e-168, 3.5607241064750984115e-184, -1.4832196127821708615e-201, 2.6911956484118910092e-218, + 6.3257905089784152346e-168, 3.5607241064750984115e-184, -1.4832196127821708615e-201, 2.6911956484118910092e-218, + 6.3257905089784152346e-168, 3.5607241064750984115e-184, -1.4832196127821708615e-201, 2.6911956484118910092e-218, + 2.0862146470760309789e-168, -1.146150630053972131e-184, -1.4832196127821708615e-201, 2.6911956484118910092e-218, + 2.0862146470760309789e-168, -1.146150630053972131e-184, -1.4832196127821708615e-201, 2.6911956484118910092e-218, + 1.026320681600434562e-168, 1.2072867382105631402e-184, -1.4832196127821708615e-201, 2.6911956484118910092e-218, + 4.9637369886263658882e-169, 3.0568054078295488291e-186, 1.4980560800565460352e-202, 2.6911956484118910092e-218, + 2.3140020749373754342e-169, 3.0568054078295488291e-186, 1.4980560800565460352e-202, 2.6911956484118910092e-218, + 9.8913461809288020723e-170, 3.0568054078295488291e-186, 1.4980560800565460352e-202, 2.6911956484118910092e-218, + 3.2670088967063259373e-170, 3.0568054078295488291e-186, 1.4980560800565460352e-202, 2.6911956484118910092e-218, + 3.2670088967063259373e-170, 3.0568054078295488291e-186, 1.4980560800565460352e-202, 2.6911956484118910092e-218, + 1.6109245756507072713e-170, -6.2044048008378732802e-187, -5.4322544592823556944e-203, 4.2491789852161138683e-219, + 7.8288241512289757055e-171, 1.2181824638728806485e-186, 1.4980560800565460352e-202, 2.6911956484118910092e-218, + 3.6886133485899290404e-171, 2.9887099189454666024e-187, 4.774153170641553462e-203, 4.2491789852161138683e-219, + 1.6185079472704052482e-171, 2.9887099189454666024e-187, 4.774153170641553462e-203, 4.2491789852161138683e-219, + 5.8345524661064358191e-172, 6.9043123899963188689e-188, -3.2905064432040069127e-204, -9.1795828160190082842e-224, + 6.5928896280762691321e-173, 1.1586156901317304854e-188, -1.0100405885278530137e-205, -9.1795828160190082842e-224, + 6.5928896280762691321e-173, 1.1586156901317304854e-188, -1.0100405885278530137e-205, -9.1795828160190082842e-224, + 6.5928896280762691321e-173, 1.1586156901317304854e-188, -1.0100405885278530137e-205, -9.1795828160190082842e-224, + 1.2381024895275844856e-174, -8.4789520282639751913e-191, -1.332109341809626019e-207, -9.1795828160190082842e-224, + 1.2381024895275844856e-174, -8.4789520282639751913e-191, -1.332109341809626019e-207, -9.1795828160190082842e-224, + 1.2381024895275844856e-174, -8.4789520282639751913e-191, -1.332109341809626019e-207, -9.1795828160190082842e-224, + 1.2381024895275844856e-174, -8.4789520282639751913e-191, -1.332109341809626019e-207, -9.1795828160190082842e-224, + 1.2381024895275844856e-174, -8.4789520282639751913e-191, -1.332109341809626019e-207, -9.1795828160190082842e-224, + 1.2381024895275844856e-174, -8.4789520282639751913e-191, -1.332109341809626019e-207, -9.1795828160190082842e-224, + 2.2730883653953564668e-175, 2.7431118386590483722e-191, -1.332109341809626019e-207, -9.1795828160190082842e-224, + 2.2730883653953564668e-175, 2.7431118386590483722e-191, -1.332109341809626019e-207, -9.1795828160190082842e-224, + 2.2730883653953564668e-175, 2.7431118386590483722e-191, -1.332109341809626019e-207, -9.1795828160190082842e-224, + 1.0095962991602958391e-175, -6.2404128071707654958e-193, 3.0593092910744445285e-209, 5.4622616159087170031e-225, + 3.7785026604276538491e-176, -6.2404128071707654958e-193, 3.0593092910744445285e-209, 5.4622616159087170031e-225, + 6.1977249484000140293e-177, 1.1294061984896456875e-192, 2.2526486929936882202e-208, -5.3441928036578162463e-225, + 6.1977249484000140293e-177, 1.1294061984896456875e-192, 2.2526486929936882202e-208, -5.3441928036578162463e-225, + 6.1977249484000140293e-177, 1.1294061984896456875e-192, 2.2526486929936882202e-208, -5.3441928036578162463e-225, + 2.2493122414154495675e-177, 2.5268245888628466632e-193, 3.0593092910744445285e-209, 5.4622616159087170031e-225, + 2.7510588792316711745e-178, 3.3501523985444386676e-194, 6.2591208621664049475e-210, 5.9034406125450500218e-227, + 2.7510588792316711745e-178, 3.3501523985444386676e-194, 6.2591208621664049475e-210, 5.9034406125450500218e-227, + 2.7510588792316711745e-178, 3.3501523985444386676e-194, 6.2591208621664049475e-210, 5.9034406125450500218e-227, + 2.8330093736631818036e-179, -7.4549709281190454638e-196, -1.4481306607622412036e-212, 9.9192633285681635836e-229, + 2.8330093736631818036e-179, -7.4549709281190454638e-196, -1.4481306607622412036e-212, 9.9192633285681635836e-229, + 2.8330093736631818036e-179, -7.4549709281190454638e-196, -1.4481306607622412036e-212, 9.9192633285681635836e-229, + 2.8330093736631818036e-179, -7.4549709281190454638e-196, -1.4481306607622412036e-212, 9.9192633285681635836e-229, + 1.2906606599973359683e-179, -7.4549709281190454638e-196, -1.4481306607622412036e-212, 9.9192633285681635836e-229, + 5.1948630316441287936e-180, 9.6685396110091013832e-196, 1.7562785002189355449e-211, 1.6821693549018732055e-227, + 1.3389912474795150614e-180, 1.106784341445028435e-196, 3.3045982549756578275e-212, 6.2685154049107876715e-228, + 1.3389912474795150614e-180, 1.106784341445028435e-196, 3.3045982549756578275e-212, 6.2685154049107876715e-228, + 3.7502330143836152136e-181, 3.6564932749519464998e-198, 3.7097125405852507464e-214, 2.5658818466966882188e-231, + 3.7502330143836152136e-181, 3.6564932749519464998e-198, 3.7097125405852507464e-214, 2.5658818466966882188e-231, + 1.3403131492807310959e-181, 3.6564932749519464998e-198, 3.7097125405852507464e-214, 2.5658818466966882188e-231, + 1.3535321672928907047e-182, 3.1205762277848031878e-199, -3.3569248349832580936e-217, -1.0577661142165146927e-233, + 1.3535321672928907047e-182, 3.1205762277848031878e-199, -3.3569248349832580936e-217, -1.0577661142165146927e-233, + 1.3535321672928907047e-182, 3.1205762277848031878e-199, -3.3569248349832580936e-217, -1.0577661142165146927e-233, + 1.3535321672928907047e-182, 3.1205762277848031878e-199, -3.3569248349832580936e-217, -1.0577661142165146927e-233, + 6.0043220944823941786e-183, 3.1205762277848031878e-199, -3.3569248349832580936e-217, -1.0577661142165146927e-233, + 2.2388223052591377446e-183, 3.1205762277848031878e-199, -3.3569248349832580936e-217, -1.0577661142165146927e-233, + 3.5607241064750984115e-184, -1.4832196127821708615e-201, 2.6911956484118910092e-218, -5.1336618966962585332e-235, + 3.5607241064750984115e-184, -1.4832196127821708615e-201, 2.6911956484118910092e-218, -5.1336618966962585332e-235, + 3.5607241064750984115e-184, -1.4832196127821708615e-201, 2.6911956484118910092e-218, -5.1336618966962585332e-235, + 1.2072867382105631402e-184, -1.4832196127821708615e-201, 2.6911956484118910092e-218, -5.1336618966962585332e-235, + 3.0568054078295488291e-186, 1.4980560800565460352e-202, 2.6911956484118910092e-218, -5.1336618966962585332e-235, + 3.0568054078295488291e-186, 1.4980560800565460352e-202, 2.6911956484118910092e-218, -5.1336618966962585332e-235, + 3.0568054078295488291e-186, 1.4980560800565460352e-202, 2.6911956484118910092e-218, -5.1336618966962585332e-235, + 3.0568054078295488291e-186, 1.4980560800565460352e-202, 2.6911956484118910092e-218, -5.1336618966962585332e-235, + 3.0568054078295488291e-186, 1.4980560800565460352e-202, 2.6911956484118910092e-218, -5.1336618966962585332e-235, + 3.0568054078295488291e-186, 1.4980560800565460352e-202, 2.6911956484118910092e-218, -5.1336618966962585332e-235, + 1.2181824638728806485e-186, 1.4980560800565460352e-202, 2.6911956484118910092e-218, -5.1336618966962585332e-235, + 2.9887099189454666024e-187, 4.774153170641553462e-203, 4.2491789852161132393e-219, 7.4467067939231424594e-235, + 2.9887099189454666024e-187, 4.774153170641553462e-203, 4.2491789852161132393e-219, 7.4467067939231424594e-235, + 6.9043123899963188689e-188, -3.2905064432040069127e-204, -9.1795828160190063645e-224, -2.3569545504732004486e-239, + 6.9043123899963188689e-188, -3.2905064432040069127e-204, -9.1795828160190063645e-224, -2.3569545504732004486e-239, + 1.1586156901317304854e-188, -1.0100405885278530137e-205, -9.1795828160190063645e-224, -2.3569545504732004486e-239, + 1.1586156901317304854e-188, -1.0100405885278530137e-205, -9.1795828160190063645e-224, -2.3569545504732004486e-239, + 1.1586156901317304854e-188, -1.0100405885278530137e-205, -9.1795828160190063645e-224, -2.3569545504732004486e-239, + 4.4040360264865697732e-189, -1.0100405885278530137e-205, -9.1795828160190063645e-224, -2.3569545504732004486e-239, + 8.129755890712020335e-190, 9.8339840169166049336e-206, -9.1795828160190063645e-224, -2.3569545504732004486e-239, + 8.129755890712020335e-190, 9.8339840169166049336e-206, -9.1795828160190063645e-224, -2.3569545504732004486e-239, + 8.129755890712020335e-190, 9.8339840169166049336e-206, -9.1795828160190063645e-224, -2.3569545504732004486e-239, + 3.6409303439428119063e-190, -1.332109341809626019e-207, -9.1795828160190063645e-224, -2.3569545504732004486e-239, + 1.3965175705582071936e-190, -1.332109341809626019e-207, -9.1795828160190063645e-224, -2.3569545504732004486e-239, + 2.7431118386590483722e-191, -1.332109341809626019e-207, -9.1795828160190063645e-224, -2.3569545504732004486e-239, + 2.7431118386590483722e-191, -1.332109341809626019e-207, -9.1795828160190063645e-224, -2.3569545504732004486e-239, + 2.7431118386590483722e-191, -1.332109341809626019e-207, -9.1795828160190063645e-224, -2.3569545504732004486e-239, + 1.3403538552936701153e-191, 1.7826390804083638359e-207, -9.1795828160190063645e-224, -2.3569545504732004486e-239, + 6.389748636109812983e-192, 2.2526486929936882202e-208, -5.3441928036578156465e-225, -7.741539335184153052e-241, + 2.8828536776963681193e-192, 2.2526486929936882202e-208, -5.3441928036578156465e-225, -7.741539335184153052e-241, + 1.1294061984896456875e-192, 2.2526486929936882202e-208, -5.3441928036578156465e-225, -7.741539335184153052e-241, + 2.5268245888628466632e-193, 3.0593092910744445285e-209, 5.4622616159087170031e-225, 4.2560351759808952526e-241, + 2.5268245888628466632e-193, 3.0593092910744445285e-209, 5.4622616159087170031e-225, 4.2560351759808952526e-241, + 3.3501523985444386676e-194, 6.2591208621664049475e-210, 5.9034406125450490845e-227, 1.3186893776791012681e-242, + 3.3501523985444386676e-194, 6.2591208621664049475e-210, 5.9034406125450490845e-227, 1.3186893776791012681e-242, + 3.3501523985444386676e-194, 6.2591208621664049475e-210, 5.9034406125450490845e-227, 1.3186893776791012681e-242, + 6.1039071228393547627e-195, 1.7562785002189355449e-211, 1.6821693549018732055e-227, -8.7276385348052817035e-244, + 6.1039071228393547627e-195, 1.7562785002189355449e-211, 1.6821693549018732055e-227, -8.7276385348052817035e-244, + 6.1039071228393547627e-195, 1.7562785002189355449e-211, 1.6821693549018732055e-227, -8.7276385348052817035e-244, + 2.6792050150137250131e-195, 1.7562785002189355449e-211, 1.6821693549018732055e-227, -8.7276385348052817035e-244, + 9.6685396110091013832e-196, 1.7562785002189355449e-211, 1.6821693549018732055e-227, -8.7276385348052817035e-244, + 1.106784341445028435e-196, 3.3045982549756578275e-212, 6.2685154049107864999e-228, 1.4705124182313953266e-243, + 1.106784341445028435e-196, 3.3045982549756578275e-212, 6.2685154049107864999e-228, 1.4705124182313953266e-243, + 1.106784341445028435e-196, 3.3045982549756578275e-212, 6.2685154049107864999e-228, 1.4705124182313953266e-243, + 3.6564932749519464998e-198, 3.7097125405852507464e-214, 2.5658818466966879328e-231, 2.4385907620893513884e-247, + 3.6564932749519464998e-198, 3.7097125405852507464e-214, 2.5658818466966879328e-231, 2.4385907620893513884e-247, + 3.6564932749519464998e-198, 3.7097125405852507464e-214, 2.5658818466966879328e-231, 2.4385907620893513884e-247, + 3.6564932749519464998e-198, 3.7097125405852507464e-214, 2.5658818466966879328e-231, 2.4385907620893513884e-247, + 3.6564932749519464998e-198, 3.7097125405852507464e-214, 2.5658818466966879328e-231, 2.4385907620893513884e-247, + 3.1205762277848031878e-199, -3.3569248349832580936e-217, -1.0577661142165144692e-233, -1.9603874144088745443e-249, + 3.1205762277848031878e-199, -3.3569248349832580936e-217, -1.0577661142165144692e-233, -1.9603874144088745443e-249, + 3.1205762277848031878e-199, -3.3569248349832580936e-217, -1.0577661142165144692e-233, -1.9603874144088745443e-249, + 3.1205762277848031878e-199, -3.3569248349832580936e-217, -1.0577661142165144692e-233, -1.9603874144088745443e-249, + 1.0303039451763865926e-199, -3.3569248349832580936e-217, -1.0577661142165144692e-233, -1.9603874144088745443e-249, + 1.0303039451763865926e-199, -3.3569248349832580936e-217, -1.0577661142165144692e-233, -1.9603874144088745443e-249, + 5.0773587452428244382e-200, -3.3569248349832580936e-217, -1.0577661142165144692e-233, -1.9603874144088745443e-249, + 2.4645183919823036941e-200, -3.3569248349832580936e-217, -1.0577661142165144692e-233, -1.9603874144088745443e-249, + 1.1580982153520433221e-200, -3.3569248349832580936e-217, -1.0577661142165144692e-233, -1.9603874144088745443e-249, + 5.0488812703691313612e-201, -3.3569248349832580936e-217, -1.0577661142165144692e-233, -1.9603874144088745443e-249, + 1.7828308287934797059e-201, 3.8951639646656364968e-217, -1.0577661142165144692e-233, -1.9603874144088745443e-249, + 1.4980560800565460352e-202, 2.6911956484118910092e-218, -5.1336618966962585332e-235, -5.0053174050016303144e-252, + 1.4980560800565460352e-202, 2.6911956484118910092e-218, -5.1336618966962585332e-235, -5.0053174050016303144e-252, + 1.4980560800565460352e-202, 2.6911956484118910092e-218, -5.1336618966962585332e-235, -5.0053174050016303144e-252, + 1.4980560800565460352e-202, 2.6911956484118910092e-218, -5.1336618966962585332e-235, -5.0053174050016303144e-252, + 4.774153170641553462e-203, 4.2491789852161132393e-219, 7.4467067939231424594e-235, -5.0053174050016303144e-252, + 4.774153170641553462e-203, 4.2491789852161132393e-219, 7.4467067939231424594e-235, -5.0053174050016303144e-252, + 2.2225512631605761729e-203, 4.2491789852161132393e-219, 7.4467067939231424594e-235, -5.0053174050016303144e-252, + 9.4675030942008781163e-204, 1.416331797853264419e-219, 1.1565224486134419631e-235, -5.0053174050016303144e-252, + 3.08849832549843631e-204, -9.1795828160190063645e-224, -2.3569545504732004486e-239, -1.2660180157495203731e-255, + 3.08849832549843631e-204, -9.1795828160190063645e-224, -2.3569545504732004486e-239, -1.2660180157495203731e-255, + 1.4937471333228255043e-204, -9.1795828160190063645e-224, -2.3569545504732004486e-239, -1.2660180157495203731e-255, + 6.9637153723502010147e-205, -9.1795828160190063645e-224, -2.3569545504732004486e-239, -1.2660180157495203731e-255, + 2.9768373919111740005e-205, -9.1795828160190063645e-224, -2.3569545504732004486e-239, -1.2660180157495203731e-255, + 9.8339840169166049336e-206, -9.1795828160190063645e-224, -2.3569545504732004486e-239, -1.2660180157495203731e-255, + 9.8339840169166049336e-206, -9.1795828160190063645e-224, -2.3569545504732004486e-239, -1.2660180157495203731e-255, + 4.8503865413678211659e-206, -9.1795828160190063645e-224, -2.3569545504732004486e-239, -1.2660180157495203731e-255, + 2.358587803593429282e-206, -9.1795828160190063645e-224, -2.3569545504732004486e-239, -1.2660180157495203731e-255, + 1.11268843470623334e-206, -9.1795828160190063645e-224, -2.3569545504732004486e-239, -1.2660180157495203731e-255, + 4.8973875026263536907e-207, -9.1795828160190063645e-224, -2.3569545504732004486e-239, -1.2660180157495203731e-255, + 1.7826390804083638359e-207, -9.1795828160190063645e-224, -2.3569545504732004486e-239, -1.2660180157495203731e-255, + 2.2526486929936882202e-208, -5.3441928036578156465e-225, -7.741539335184153052e-241, 6.5980330445613850848e-257, + 2.2526486929936882202e-208, -5.3441928036578156465e-225, -7.741539335184153052e-241, 6.5980330445613850848e-257, + 2.2526486929936882202e-208, -5.3441928036578156465e-225, -7.741539335184153052e-241, 6.5980330445613850848e-257, + 3.0593092910744445285e-209, 5.4622616159087170031e-225, 4.2560351759808945866e-241, 6.5980330445613850848e-257, + 3.0593092910744445285e-209, 5.4622616159087170031e-225, 4.2560351759808945866e-241, 6.5980330445613850848e-257, + 3.0593092910744445285e-209, 5.4622616159087170031e-225, 4.2560351759808945866e-241, 6.5980330445613850848e-257, + 6.2591208621664049475e-210, 5.9034406125450490845e-227, 1.3186893776791012681e-242, -6.1958686414286617489e-259, + 6.2591208621664049475e-210, 5.9034406125450490845e-227, 1.3186893776791012681e-242, -6.1958686414286617489e-259, + 1.7562785002189355449e-211, 1.6821693549018732055e-227, -8.7276385348052804027e-244, -9.9275010160391790661e-260, + 1.7562785002189355449e-211, 1.6821693549018732055e-227, -8.7276385348052804027e-244, -9.9275010160391790661e-260, + 1.7562785002189355449e-211, 1.6821693549018732055e-227, -8.7276385348052804027e-244, -9.9275010160391790661e-260, + 1.7562785002189355449e-211, 1.6821693549018732055e-227, -8.7276385348052804027e-244, -9.9275010160391790661e-260, + 1.7562785002189355449e-211, 1.6821693549018732055e-227, -8.7276385348052804027e-244, -9.9275010160391790661e-260, + 1.7562785002189355449e-211, 1.6821693549018732055e-227, -8.7276385348052804027e-244, -9.9275010160391790661e-260, + 8.0573271707135584416e-212, -4.284662739197154369e-228, -8.7276385348052804027e-244, -9.9275010160391790661e-260, + 3.3045982549756578275e-212, 6.2685154049107864999e-228, 1.4705124182313953266e-243, -9.9275010160391790661e-260, + 9.282337971067085758e-213, 9.9192633285681635836e-229, 5.9647484114431227287e-246, 3.159306409411904583e-262, + 9.282337971067085758e-213, 9.9192633285681635836e-229, 5.9647484114431227287e-246, 3.159306409411904583e-262, + 3.3414268263947126287e-213, -3.2722093515667654317e-229, 5.9647484114431227287e-246, 3.159306409411904583e-262, + 3.7097125405852507464e-214, 2.5658818466966879328e-231, 2.4385907620893513884e-247, -1.6425121242846202568e-264, + 3.7097125405852507464e-214, 2.5658818466966879328e-231, 2.4385907620893513884e-247, -1.6425121242846202568e-264, + 3.7097125405852507464e-214, 2.5658818466966879328e-231, 2.4385907620893513884e-247, -1.6425121242846202568e-264, + 3.7097125405852507464e-214, 2.5658818466966879328e-231, 2.4385907620893513884e-247, -1.6425121242846202568e-264, + 1.8531778078751337313e-214, 2.5658818466966879328e-231, 2.4385907620893513884e-247, -1.6425121242846202568e-264, + 9.2491044152007522372e-215, 2.5658818466966879328e-231, 2.4385907620893513884e-247, -1.6425121242846202568e-264, + 4.6077675834254596993e-215, 2.5658818466966879328e-231, 2.4385907620893513884e-247, -1.6425121242846202568e-264, + 2.2870991675378134304e-215, 2.5658818466966879328e-231, 2.4385907620893513884e-247, -1.6425121242846202568e-264, + 1.1267649595939905535e-215, -1.0577661142165144692e-233, -1.9603874144088742962e-249, -1.5388796929020585053e-265, + 5.465978556220789863e-216, -1.0577661142165144692e-233, -1.9603874144088742962e-249, -1.5388796929020585053e-265, + 2.5651430363612320268e-216, -1.0577661142165144692e-233, -1.9603874144088742962e-249, -1.5388796929020585053e-265, + 1.1147252764314531087e-216, -1.0577661142165144692e-233, -1.9603874144088742962e-249, -1.5388796929020585053e-265, + 3.8951639646656364968e-217, -1.0577661142165144692e-233, -1.9603874144088742962e-249, -1.5388796929020585053e-265, + 2.6911956484118910092e-218, -5.1336618966962585332e-235, -5.0053174050016293452e-252, -7.612658467699862846e-268, + 2.6911956484118910092e-218, -5.1336618966962585332e-235, -5.0053174050016293452e-252, -7.612658467699862846e-268, + 2.6911956484118910092e-218, -5.1336618966962585332e-235, -5.0053174050016293452e-252, -7.612658467699862846e-268, + 2.6911956484118910092e-218, -5.1336618966962585332e-235, -5.0053174050016293452e-252, -7.612658467699862846e-268, + 4.2491789852161132393e-219, 7.4467067939231424594e-235, -5.0053174050016293452e-252, -7.612658467699862846e-268, + 4.2491789852161132393e-219, 7.4467067939231424594e-235, -5.0053174050016293452e-252, -7.612658467699862846e-268, + 4.2491789852161132393e-219, 7.4467067939231424594e-235, -5.0053174050016293452e-252, -7.612658467699862846e-268, + 1.416331797853264419e-219, 1.1565224486134419631e-235, -5.0053174050016293452e-252, -7.612658467699862846e-268, + 1.416331797853264419e-219, 1.1565224486134419631e-235, -5.0053174050016293452e-252, -7.612658467699862846e-268, + 7.0812000101255205661e-220, 1.1565224486134419631e-235, -5.0053174050016293452e-252, -7.612658467699862846e-268, + 3.5401410259219595406e-220, 3.7024940544972931378e-236, 3.7240669566228019175e-252, 2.0789050413783561243e-268, + 1.7696115338201790279e-220, -2.2887116132126929049e-237, -9.5038701587886971967e-254, -4.1124476232504157774e-270, + 8.8434678776928857495e-221, -2.2887116132126929049e-237, -9.5038701587886971967e-254, -4.1124476232504157774e-270, + 4.4171441474384334848e-221, -2.2887116132126929049e-237, -9.5038701587886971967e-254, -4.1124476232504157774e-270, + 2.2039822823112068611e-221, 2.6254949065605100623e-237, 4.5054782101363995167e-253, 8.6745960274357882025e-269, + 1.0974013497475940406e-221, 1.6839164667390871511e-238, 4.1357929062494766513e-254, 1.1030620359684300523e-269, + 5.4411088346578750752e-222, 1.6839164667390871511e-238, 4.1357929062494766513e-254, 1.1030620359684300523e-269, + 2.6746565032488424098e-222, 1.6839164667390871511e-238, 4.1357929062494766513e-254, 1.1030620359684300523e-269, + 1.2914303375443260771e-222, 1.6839164667390871511e-238, 4.1357929062494766513e-254, 1.1030620359684300523e-269, + 5.9981725469206806432e-223, 1.4822692930996143695e-239, 2.9963766920749087177e-255, 6.1976112141668296145e-271, + 2.5401071326593898114e-223, 1.4822692930996143695e-239, 2.9963766920749087177e-255, 6.1976112141668296145e-271, + 8.1107442552874458747e-224, -4.3734262868679293304e-240, -2.0041933879341298212e-256, -3.0917580975043168985e-272, + 8.1107442552874458747e-224, -4.3734262868679293304e-240, -2.0041933879341298212e-256, -3.0917580975043168985e-272, + 3.7881624874608313752e-224, 5.2246333220641077149e-240, 8.651793381626942906e-256, 1.465402469499730508e-271, + 1.6268716035475250852e-224, 4.2560351759808945866e-241, 6.5980330445613850848e-257, -1.3412763208737999797e-273, + 5.4622616159087170031e-225, 4.2560351759808945866e-241, 6.5980330445613850848e-257, -1.3412763208737999797e-273, + 5.9034406125450490845e-227, 1.3186893776791012681e-242, -6.1958686414286617489e-259, 4.511295979038907057e-275, + 5.9034406125450490845e-227, 1.3186893776791012681e-242, -6.1958686414286617489e-259, 4.511295979038907057e-275, + 5.9034406125450490845e-227, 1.3186893776791012681e-242, -6.1958686414286617489e-259, 4.511295979038907057e-275, + 5.9034406125450490845e-227, 1.3186893776791012681e-242, -6.1958686414286617489e-259, 4.511295979038907057e-275, + 5.9034406125450490845e-227, 1.3186893776791012681e-242, -6.1958686414286617489e-259, 4.511295979038907057e-275, + 5.9034406125450490845e-227, 1.3186893776791012681e-242, -6.1958686414286617489e-259, 4.511295979038907057e-275, + 5.9034406125450490845e-227, 1.3186893776791012681e-242, -6.1958686414286617489e-259, 4.511295979038907057e-275, + 1.6821693549018732055e-227, -8.7276385348052804027e-244, -9.927501016039177622e-260, -1.2653260237285477467e-275, + 1.6821693549018732055e-227, -8.7276385348052804027e-244, -9.927501016039177622e-260, -1.2653260237285477467e-275, + 6.2685154049107864999e-228, 1.4705124182313953266e-243, -9.927501016039177622e-260, -1.2653260237285477467e-275, + 9.9192633285681635836e-229, 5.9647484114431227287e-246, 3.159306409411904583e-262, -1.6899606231669917881e-278, + 9.9192633285681635836e-229, 5.9647484114431227287e-246, 3.159306409411904583e-262, -1.6899606231669917881e-278, + 9.9192633285681635836e-229, 5.9647484114431227287e-246, 3.159306409411904583e-262, -1.6899606231669917881e-278, + 3.3235269885006990759e-229, 5.9647484114431227287e-246, 3.159306409411904583e-262, -1.6899606231669917881e-278, + 2.5658818466966879328e-231, 2.4385907620893513884e-247, -1.6425121242846200365e-264, -1.5219747120519046606e-280, + 2.5658818466966879328e-231, 2.4385907620893513884e-247, -1.6425121242846200365e-264, -1.5219747120519046606e-280, + 2.5658818466966879328e-231, 2.4385907620893513884e-247, -1.6425121242846200365e-264, -1.5219747120519046606e-280, + 2.5658818466966879328e-231, 2.4385907620893513884e-247, -1.6425121242846200365e-264, -1.5219747120519046606e-280, + 2.5658818466966879328e-231, 2.4385907620893513884e-247, -1.6425121242846200365e-264, -1.5219747120519046606e-280, + 2.5658818466966879328e-231, 2.4385907620893513884e-247, -1.6425121242846200365e-264, -1.5219747120519046606e-280, + 2.5658818466966879328e-231, 2.4385907620893513884e-247, -1.6425121242846200365e-264, -1.5219747120519046606e-280, + 2.5658818466966879328e-231, 2.4385907620893513884e-247, -1.6425121242846200365e-264, -1.5219747120519046606e-280, + 1.2776520927772615572e-231, -4.2185390552774256532e-248, -1.6425121242846200365e-264, -1.5219747120519046606e-280, + 6.3353721581754808333e-232, 1.0083684282808044115e-247, -1.6425121242846200365e-264, -1.5219747120519046606e-280, + 3.1147977733769148943e-232, 2.9325726137653092311e-248, -1.6425121242846200365e-264, -1.5219747120519046606e-280, + 1.5045105809776319248e-232, -6.4298322075605840951e-249, 3.4232008237459887811e-265, 6.8163170379871725823e-281, + 6.9936698477799008252e-233, 1.1447946965046251131e-248, 2.3271522890338182334e-264, -1.5219747120519046606e-280, + 2.9679518667816934015e-233, 2.5090573787428345104e-249, 3.4232008237459887811e-265, 6.8163170379871725823e-281, + 9.5509287628258946614e-234, 2.7433498216698016912e-250, 3.2190050084095957138e-266, -6.9953011546020875693e-283, + 9.5509287628258946614e-234, 2.7433498216698016912e-250, 3.2190050084095957138e-266, -6.9953011546020875693e-283, + 4.5187812865781342644e-234, 2.7433498216698016912e-250, 3.2190050084095957138e-266, -6.9953011546020875693e-283, + 2.0027075484542540659e-234, 2.7433498216698016912e-250, 3.2190050084095957138e-266, -6.9953011546020875693e-283, + 7.4467067939231424594e-235, -5.0053174050016293452e-252, -7.61265846769986177e-268, -5.3942298316471783046e-284, + 1.1565224486134419631e-235, -5.0053174050016293452e-252, -7.61265846769986177e-268, -5.3942298316471783046e-284, + 1.1565224486134419631e-235, -5.0053174050016293452e-252, -7.61265846769986177e-268, -5.3942298316471783046e-284, + 1.1565224486134419631e-235, -5.0053174050016293452e-252, -7.61265846769986177e-268, -5.3942298316471783046e-284, + 3.7024940544972931378e-236, 3.7240669566228019175e-252, 2.0789050413783561243e-268, -1.4331355449370633767e-286, + 3.7024940544972931378e-236, 3.7240669566228019175e-252, 2.0789050413783561243e-268, -1.4331355449370633767e-286, + 1.7368114465880121692e-236, -6.4062522418941395617e-253, -3.4398583589119848378e-269, -1.4331355449370633767e-286, + 7.5397014263337124839e-237, 1.5417208662166938595e-252, 2.0789050413783561243e-268, -1.4331355449370633767e-286, + 2.6254949065605100623e-237, 4.5054782101363995167e-253, 8.6745960274357882025e-269, -1.4331355449370633767e-286, + 1.6839164667390871511e-238, 4.1357929062494766513e-254, 1.1030620359684300523e-269, -1.4331355449370633767e-286, + 1.6839164667390871511e-238, 4.1357929062494766513e-254, 1.1030620359684300523e-269, -1.4331355449370633767e-286, + 1.6839164667390871511e-238, 4.1357929062494766513e-254, 1.1030620359684300523e-269, -1.4331355449370633767e-286, + 1.6839164667390871511e-238, 4.1357929062494766513e-254, 1.1030620359684300523e-269, -1.4331355449370633767e-286, + 1.4822692930996143695e-239, 2.9963766920749087177e-255, 6.1976112141668285638e-271, 6.6838729732770526291e-287, + 1.4822692930996143695e-239, 2.9963766920749087177e-255, 6.1976112141668285638e-271, 6.6838729732770526291e-287, + 1.4822692930996143695e-239, 2.9963766920749087177e-255, 6.1976112141668285638e-271, 6.6838729732770526291e-287, + 1.4822692930996143695e-239, 2.9963766920749087177e-255, 6.1976112141668285638e-271, 6.6838729732770526291e-287, + 5.2246333220641077149e-240, 8.651793381626942906e-256, 1.4654024694997302453e-271, 1.4300658676151307383e-287, + 4.2560351759808945866e-241, 6.5980330445613850848e-257, -1.3412763208737999797e-273, -6.5220128393008942461e-290, + 4.2560351759808945866e-241, 6.5980330445613850848e-257, -1.3412763208737999797e-273, -6.5220128393008942461e-290, + 4.2560351759808945866e-241, 6.5980330445613850848e-257, -1.3412763208737999797e-273, -6.5220128393008942461e-290, + 4.2560351759808945866e-241, 6.5980330445613850848e-257, -1.3412763208737999797e-273, -6.5220128393008942461e-290, + 1.2566415481896333429e-241, -6.1958686414286617489e-259, 4.511295979038907057e-275, -1.0867408727218187272e-291, + 1.2566415481896333429e-241, -6.1958686414286617489e-259, 4.511295979038907057e-275, -1.0867408727218187272e-291, + 5.0679314124181786552e-242, -6.1958686414286617489e-259, 4.511295979038907057e-275, -1.0867408727218187272e-291, + 1.3186893776791012681e-242, -6.1958686414286617489e-259, 4.511295979038907057e-275, -1.0867408727218187272e-291, + 1.3186893776791012681e-242, -6.1958686414286617489e-259, 4.511295979038907057e-275, -1.0867408727218187272e-291, + 3.8137886899433181732e-243, 4.2103684382208250692e-259, 4.511295979038907057e-275, -1.0867408727218187272e-291, + 3.8137886899433181732e-243, 4.2103684382208250692e-259, 4.511295979038907057e-275, -1.0867408727218187272e-291, + 1.4705124182313953266e-243, -9.927501016039177622e-260, -1.2653260237285475864e-275, -1.0867408727218187272e-291, + 2.988742823754335131e-244, 3.0802953335226794566e-260, 1.7882947696331595423e-276, 1.157601432835649396e-292, + 2.988742823754335131e-244, 3.0802953335226794566e-260, 1.7882947696331595423e-276, 1.157601432835649396e-292, + 5.9647484114431227287e-246, 3.159306409411904583e-262, -1.6899606231669914749e-278, -3.2373530919678260449e-294, + 5.9647484114431227287e-246, 3.159306409411904583e-262, -1.6899606231669914749e-278, -3.2373530919678260449e-294, + 5.9647484114431227287e-246, 3.159306409411904583e-262, -1.6899606231669914749e-278, -3.2373530919678260449e-294, + 5.9647484114431227287e-246, 3.159306409411904583e-262, -1.6899606231669914749e-278, -3.2373530919678260449e-294, + 5.9647484114431227287e-246, 3.159306409411904583e-262, -1.6899606231669914749e-278, -3.2373530919678260449e-294, + 5.9647484114431227287e-246, 3.159306409411904583e-262, -1.6899606231669914749e-278, -3.2373530919678260449e-294, + 1.3880369432557724028e-246, 3.159306409411904583e-262, -1.6899606231669914749e-278, -3.2373530919678260449e-294, + 1.3880369432557724028e-246, 3.159306409411904583e-262, -1.6899606231669914749e-278, -3.2373530919678260449e-294, + 2.4385907620893513884e-247, -1.6425121242846200365e-264, -1.5219747120519046606e-280, -7.9802462502426240049e-297, + 2.4385907620893513884e-247, -1.6425121242846200365e-264, -1.5219747120519046606e-280, -7.9802462502426240049e-297, + 2.4385907620893513884e-247, -1.6425121242846200365e-264, -1.5219747120519046606e-280, -7.9802462502426240049e-297, + 1.0083684282808044115e-247, -1.6425121242846200365e-264, -1.5219747120519046606e-280, -7.9802462502426240049e-297, + 2.9325726137653092311e-248, -1.6425121242846200365e-264, -1.5219747120519046606e-280, -7.9802462502426240049e-297, + 2.9325726137653092311e-248, -1.6425121242846200365e-264, -1.5219747120519046606e-280, -7.9802462502426240049e-297, + 1.1447946965046251131e-248, 2.3271522890338182334e-264, -1.5219747120519046606e-280, -7.9802462502426240049e-297, + 2.5090573787428345104e-249, 3.4232008237459887811e-265, 6.816317037987171359e-281, 1.6484699550648156977e-296, + 2.5090573787428345104e-249, 3.4232008237459887811e-265, 6.816317037987171359e-281, 1.6484699550648156977e-296, + 2.7433498216698016912e-250, 3.2190050084095957138e-266, -6.9953011546020875693e-283, 4.7314090674663658498e-299, + 2.7433498216698016912e-250, 3.2190050084095957138e-266, -6.9953011546020875693e-283, 4.7314090674663658498e-299, + 2.7433498216698016912e-250, 3.2190050084095957138e-266, -6.9953011546020875693e-283, 4.7314090674663658498e-299, + 2.7433498216698016912e-250, 3.2190050084095957138e-266, -6.9953011546020875693e-283, 4.7314090674663658498e-299, + 1.3466483238098928443e-250, 1.1770468550456572943e-267, 1.6125364073144052565e-283, -4.6900659270114860315e-301, + 6.4829757487993826571e-251, 1.1770468550456572943e-267, 1.6125364073144052565e-283, -4.6900659270114860315e-301, + 2.9912220041496097644e-251, 1.1770468550456572943e-267, 1.6125364073144052565e-283, -4.6900659270114860315e-301, + 1.245345131824723318e-251, 1.1770468550456572943e-267, 1.6125364073144052565e-283, -4.6900659270114860315e-301, + 3.7240669566228019175e-252, 2.0789050413783561243e-268, -1.4331355449370633767e-286, -2.3747834495391662483e-303, + 3.7240669566228019175e-252, 2.0789050413783561243e-268, -1.4331355449370633767e-286, -2.3747834495391662483e-303, + 1.5417208662166938595e-252, 2.0789050413783561243e-268, -1.4331355449370633767e-286, -2.3747834495391662483e-303, + 4.5054782101363995167e-253, 8.6745960274357882025e-269, -1.4331355449370633767e-286, -2.3747834495391662483e-303, + 4.5054782101363995167e-253, 8.6745960274357882025e-269, -1.4331355449370633767e-286, -2.3747834495391662483e-303, + 1.7775455971287650499e-253, 2.6173688342619016824e-269, -1.4331355449370633767e-286, -2.3747834495391662483e-303, + 4.1357929062494766513e-254, 1.1030620359684300523e-269, -1.4331355449370633767e-286, -2.3747834495391662483e-303, + 4.1357929062494766513e-254, 1.1030620359684300523e-269, -1.4331355449370633767e-286, -2.3747834495391662483e-303, + 7.2587713998993394649e-255, -3.2668062751673680733e-271, -3.8237412380467905692e-287, -2.3747834495391662483e-303, + 7.2587713998993394649e-255, -3.2668062751673680733e-271, -3.8237412380467905692e-287, -2.3747834495391662483e-303, + 7.2587713998993394649e-255, -3.2668062751673680733e-271, -3.8237412380467905692e-287, -2.3747834495391662483e-303, + 2.9963766920749087177e-255, 6.1976112141668285638e-271, 6.6838729732770526291e-287, -2.3747834495391662483e-303, + 8.651793381626942906e-256, 1.4654024694997302453e-271, 1.4300658676151304467e-287, 3.4581141661059517454e-303, + 8.651793381626942906e-256, 1.4654024694997302453e-271, 1.4300658676151304467e-287, 3.4581141661059517454e-303, + 3.3237999968464068382e-256, 2.8235028333295566563e-272, 1.1661409119965037501e-288, 1.7710925730557273232e-304, + 6.5980330445613850848e-257, -1.3412763208737999797e-273, -6.5220128393008942461e-290, -5.1687931833372119365e-306, + 6.5980330445613850848e-257, -1.3412763208737999797e-273, -6.5220128393008942461e-290, -5.1687931833372119365e-306, + 6.5980330445613850848e-257, -1.3412763208737999797e-273, -6.5220128393008942461e-290, -5.1687931833372119365e-306, + 3.268037179073549303e-257, -1.3412763208737999797e-273, -6.5220128393008942461e-290, -5.1687931833372119365e-306, + 1.6030392463296310424e-257, 2.3557617608973705816e-273, 3.4523355173682868247e-289, -5.1687931833372119365e-306, + 7.7054027995767228175e-258, 5.0724272001178530095e-274, 1.4000671167190987001e-289, -5.1687931833372119365e-306, + 3.5429079677169280902e-258, 5.0724272001178530095e-274, 1.4000671167190987001e-289, -5.1687931833372119365e-306, + 1.4616605517870311887e-258, 4.511295979038907057e-275, -1.0867408727218185492e-291, -1.8462774028108107556e-307, + 4.2103684382208250692e-259, 4.511295979038907057e-275, -1.0867408727218185492e-291, -1.8462774028108107556e-307, + 4.2103684382208250692e-259, 4.511295979038907057e-275, -1.0867408727218185492e-291, -1.8462774028108107556e-307, + 1.6088091683084539423e-259, -1.2653260237285475864e-275, -1.0867408727218185492e-291, -1.8462774028108107556e-307, + 3.0802953335226794566e-260, 1.7882947696331595423e-276, 1.157601432835649396e-292, -6.6218316005049500917e-309, + 3.0802953335226794566e-260, 1.7882947696331595423e-276, 1.157601432835649396e-292, -6.6218316005049500917e-309, + 3.0802953335226794566e-260, 1.7882947696331595423e-276, 1.157601432835649396e-292, -6.6218316005049500917e-309, + 1.4543207898274471412e-260, 1.7882947696331595423e-276, 1.157601432835649396e-292, -6.6218316005049500917e-309, + 6.4133351797983116408e-261, -1.6899606231669914749e-278, -3.2373530919678260449e-294, 3.3152420733005423041e-310, + 2.3483988205602308525e-261, -1.6899606231669914749e-278, -3.2373530919678260449e-294, 3.3152420733005423041e-310, + 3.159306409411904583e-262, -1.6899606231669914749e-278, -3.2373530919678260449e-294, 3.3152420733005423041e-310, + 3.159306409411904583e-262, -1.6899606231669914749e-278, -3.2373530919678260449e-294, 3.3152420733005423041e-310, + 3.159306409411904583e-262, -1.6899606231669914749e-278, -3.2373530919678260449e-294, 3.3152420733005423041e-310, + 6.1872118488810394926e-263, -2.7965251702259368175e-279, -1.0584002945380573163e-295, -1.6143583061695985701e-311, + 6.1872118488810394926e-263, -2.7965251702259368175e-279, -1.0584002945380573163e-295, -1.6143583061695985701e-311, + 6.1872118488810394926e-263, -2.7965251702259368175e-279, -1.0584002945380573163e-295, -1.6143583061695985701e-311, + 3.0114803182262881715e-263, 4.255015360496053714e-279, -1.0584002945380573163e-295, -1.6143583061695985701e-311, + 1.4236145528989132162e-263, 7.2924509513505825253e-280, 8.9879536953320494488e-296, 5.585653837788402806e-312, + 6.2968167023522556218e-264, 7.2924509513505825253e-280, 8.9879536953320494488e-296, 5.585653837788402806e-312, + 2.3271522890338182334e-264, -1.5219747120519046606e-280, -7.9802462502426240049e-297, 1.5334461291730567932e-313, + 3.4232008237459887811e-265, 6.816317037987171359e-281, 1.6484699550648156977e-296, 1.5334461291730567932e-313, + 3.4232008237459887811e-265, 6.816317037987171359e-281, 1.6484699550648156977e-296, 1.5334461291730567932e-313, + 3.4232008237459887811e-265, 6.816317037987171359e-281, 1.6484699550648156977e-296, 1.5334461291730567932e-313, + 9.4216056542196541332e-266, 1.3073009983606177853e-281, 1.1941084250914188632e-297, 1.5334461291730567932e-313, + 9.4216056542196541332e-266, 1.3073009983606177853e-281, 1.1941084250914188632e-297, 1.5334461291730567932e-313, + 3.2190050084095957138e-266, -6.9953011546020875693e-283, 4.7314090674663653193e-299, 4.8049075497366172587e-315, + 1.1770468550456572943e-267, 1.6125364073144052565e-283, -4.6900659270114860315e-301, -2.739164169077830203e-318, + 1.1770468550456572943e-267, 1.6125364073144052565e-283, -4.6900659270114860315e-301, -2.739164169077830203e-318, + 1.1770468550456572943e-267, 1.6125364073144052565e-283, -4.6900659270114860315e-301, -2.739164169077830203e-318, + 1.1770468550456572943e-267, 1.6125364073144052565e-283, -4.6900659270114860315e-301, -2.739164169077830203e-318, + 1.1770468550456572943e-267, 1.6125364073144052565e-283, -4.6900659270114860315e-301, -2.739164169077830203e-318, + 2.0789050413783561243e-268, -1.4331355449370633767e-286, -2.3747834495391662483e-303, -1.4883727580967552143e-319, + 2.0789050413783561243e-268, -1.4331355449370633767e-286, -2.3747834495391662483e-303, -1.4883727580967552143e-319, + 2.0789050413783561243e-268, -1.4331355449370633767e-286, -2.3747834495391662483e-303, -1.4883727580967552143e-319, + 8.6745960274357882025e-269, -1.4331355449370633767e-286, -2.3747834495391662483e-303, -1.4883727580967552143e-319, + 2.6173688342619016824e-269, -1.4331355449370633767e-286, -2.3747834495391662483e-303, -1.4883727580967552143e-319, + 2.6173688342619016824e-269, -1.4331355449370633767e-286, -2.3747834495391662483e-303, -1.4883727580967552143e-319, + 1.1030620359684300523e-269, -1.4331355449370633767e-286, -2.3747834495391662483e-303, -1.4883727580967552143e-319, + 3.4590863682169423729e-270, -1.4331355449370633767e-286, -2.3747834495391662483e-303, -1.4883727580967552143e-319, + 3.4590863682169423729e-270, -1.4331355449370633767e-286, -2.3747834495391662483e-303, -1.4883727580967552143e-319, + 1.566202870350102415e-270, 2.7699101395924739026e-286, -2.3747834495391662483e-303, -1.4883727580967552143e-319, + 6.1976112141668285638e-271, 6.6838729732770526291e-287, -2.3747834495391662483e-303, -1.4883727580967552143e-319, + 1.4654024694997302453e-271, 1.4300658676151304467e-287, 3.4581141661059517454e-303, -1.4883727580967552143e-319, + 1.4654024694997302453e-271, 1.4300658676151304467e-287, 3.4581141661059517454e-303, -1.4883727580967552143e-319, + 2.8235028333295566563e-272, 1.1661409119965037501e-288, 1.7710925730557271209e-304, 1.3058155019584146163e-320, + 2.8235028333295566563e-272, 1.1661409119965037501e-288, 1.7710925730557271209e-304, 1.3058155019584146163e-320, + 2.8235028333295566563e-272, 1.1661409119965037501e-288, 1.7710925730557271209e-304, 1.3058155019584146163e-320, + 1.3446876006210882676e-272, 1.1661409119965037501e-288, 1.7710925730557271209e-304, 1.3058155019584146163e-320, + 6.0527998426685407325e-273, 1.1661409119965037501e-288, 1.7710925730557271209e-304, 1.3058155019584146163e-320, + 2.3557617608973705816e-273, 3.4523355173682868247e-289, -5.1687931833372113041e-306, -8.5473356730535652143e-322, + 5.0724272001178530095e-274, 1.4000671167190987001e-289, -5.1687931833372113041e-306, -8.5473356730535652143e-322, + 5.0724272001178530095e-274, 1.4000671167190987001e-289, -5.1687931833372113041e-306, -8.5473356730535652143e-322, + 4.511295979038907057e-275, -1.0867408727218185492e-291, -1.8462774028108107556e-307, 1.4821969375237396325e-323, + 4.511295979038907057e-275, -1.0867408727218185492e-291, -1.8462774028108107556e-307, 1.4821969375237396325e-323, + 4.511295979038907057e-275, -1.0867408727218185492e-291, -1.8462774028108107556e-307, 1.4821969375237396325e-323, + 4.511295979038907057e-275, -1.0867408727218185492e-291, -1.8462774028108107556e-307, 1.4821969375237396325e-323, + 1.6229849776551797353e-275, -1.0867408727218185492e-291, -1.8462774028108107556e-307, 1.4821969375237396325e-323, + 1.7882947696331595423e-276, 1.157601432835649396e-292, -6.6218316005049451511e-309, -4.9406564584124654418e-324, + 1.7882947696331595423e-276, 1.157601432835649396e-292, -6.6218316005049451511e-309, -4.9406564584124654418e-324, + 1.7882947696331595423e-276, 1.157601432835649396e-292, -6.6218316005049451511e-309, -4.9406564584124654418e-324, + 1.7882947696331595423e-276, 1.157601432835649396e-292, -6.6218316005049451511e-309, -4.9406564584124654418e-324, + 8.8569758170074475429e-277, 1.157601432835649396e-292, -6.6218316005049451511e-309, -4.9406564584124654418e-324, + 4.3439898773453746048e-277, 1.5551725283116295139e-293, -1.0591469542369416934e-309, -4.9406564584124654418e-324, + 2.0874969075143376347e-277, 1.5551725283116295139e-293, -1.0591469542369416934e-309, -4.9406564584124654418e-324, + 9.5925042259881914966e-278, 1.5551725283116295139e-293, -1.0591469542369416934e-309, -4.9406564584124654418e-324, + 3.951271801410600324e-278, 3.0256730330602138863e-294, 3.3152420733004928975e-310, 4.9406564584124654418e-324, + 1.1306555891218044246e-278, -1.0584002945380573163e-295, -1.6143583061691045044e-311, -4.9406564584124654418e-324, + 1.1306555891218044246e-278, -1.0584002945380573163e-295, -1.6143583061691045044e-311, -4.9406564584124654418e-324, + 4.255015360496053714e-279, -1.0584002945380573163e-295, -1.6143583061691045044e-311, -4.9406564584124654418e-324, + 7.2924509513505825253e-280, 8.9879536953320494488e-296, 5.5856538377834621495e-312, 4.9406564584124654418e-324, + 7.2924509513505825253e-280, 8.9879536953320494488e-296, 5.5856538377834621495e-312, 4.9406564584124654418e-324, + 7.2924509513505825253e-280, 8.9879536953320494488e-296, 5.5856538377834621495e-312, 4.9406564584124654418e-324, + 2.8852381196493394217e-280, -7.9802462502426240049e-297, 1.5334461291236502286e-313, 4.9406564584124654418e-324, + 6.816317037987171359e-281, 1.6484699550648156977e-296, 1.5334461291236502286e-313, 4.9406564584124654418e-324, + 6.816317037987171359e-281, 1.6484699550648156977e-296, 1.5334461291236502286e-313, 4.9406564584124654418e-324, + 1.3073009983606177853e-281, 1.1941084250914188632e-297, 1.5334461291236502286e-313, 4.9406564584124654418e-324, + 1.3073009983606177853e-281, 1.1941084250914188632e-297, 1.5334461291236502286e-313, 4.9406564584124654418e-324, + 1.3073009983606177853e-281, 1.1941084250914188632e-297, 1.5334461291236502286e-313, 4.9406564584124654418e-324, + 6.1867399340729855038e-282, -3.3495068746425477842e-298, -1.6415050354975449434e-314, -4.9406564584124654418e-324, + 2.7436049093063878e-282, 4.2957886881358212725e-298, -1.6415050354975449434e-314, -4.9406564584124654418e-324, + 1.0220373969230897127e-282, 4.7314090674663653193e-299, 4.8049075447959608003e-315, 4.9406564584124654418e-324, + 1.6125364073144052565e-283, -4.6900659270114860315e-301, -2.7391592284213717905e-318, -4.9406564584124654418e-324, + 1.6125364073144052565e-283, -4.6900659270114860315e-301, -2.7391592284213717905e-318, -4.9406564584124654418e-324, + 1.6125364073144052565e-283, -4.6900659270114860315e-301, -2.7391592284213717905e-318, -4.9406564584124654418e-324, + 5.3655671207484371304e-284, -4.6900659270114860315e-301, -2.7391592284213717905e-318, -4.9406564584124654418e-324, + 5.3655671207484371304e-284, -4.6900659270114860315e-301, -2.7391592284213717905e-318, -4.9406564584124654418e-324, + 2.6756178826495332717e-284, -4.6900659270114860315e-301, -2.7391592284213717905e-318, -4.9406564584124654418e-324, + 1.3306432636000813423e-284, -4.6900659270114860315e-301, -2.7391592284213717905e-318, -4.9406564584124654418e-324, + 6.5815595407535522826e-285, 1.0242151969040014375e-300, 1.63041752059427611e-316, 4.9406564584124654418e-324, + 3.2191229931299232058e-285, 2.7760430210142650004e-301, -2.7391592284213717905e-318, -4.9406564584124654418e-324, + 1.5379047193181082941e-285, 2.7760430210142650004e-301, -2.7391592284213717905e-318, -4.9406564584124654418e-324, + 6.9729558241220102486e-286, 9.0951578400782724241e-302, -2.7391592284213717905e-318, -4.9406564584124654418e-324, + 2.7699101395924739026e-286, -2.3747834495391662483e-303, -1.4883233515321710897e-319, -4.9406564584124654418e-324, + 6.6838729732770526291e-287, -2.3747834495391662483e-303, -1.4883233515321710897e-319, -4.9406564584124654418e-324, + 6.6838729732770526291e-287, -2.3747834495391662483e-303, -1.4883233515321710897e-319, -4.9406564584124654418e-324, + 1.4300658676151304467e-287, 3.4581141661059517454e-303, -1.4883233515321710897e-319, -4.9406564584124654418e-324, + 1.4300658676151304467e-287, 3.4581141661059517454e-303, -1.4883233515321710897e-319, -4.9406564584124654418e-324, + 1.1661409119965037501e-288, 1.7710925730557271209e-304, 1.3053214363125733697e-320, 4.9406564584124654418e-324, + 1.1661409119965037501e-288, 1.7710925730557271209e-304, 1.3053214363125733697e-320, 4.9406564584124654418e-324, + 1.1661409119965037501e-288, 1.7710925730557271209e-304, 1.3053214363125733697e-320, 4.9406564584124654418e-324, + 1.1661409119965037501e-288, 1.7710925730557271209e-304, 1.3053214363125733697e-320, 4.9406564584124654418e-324, + 3.4523355173682868247e-289, -5.1687931833372113041e-306, -8.4979291084694405598e-322, -4.9406564584124654418e-324, + 3.4523355173682868247e-289, -5.1687931833372113041e-306, -8.4979291084694405598e-322, -4.9406564584124654418e-324, + 1.4000671167190987001e-289, -5.1687931833372113041e-306, -8.4979291084694405598e-322, -4.9406564584124654418e-324, + 3.739329163945045238e-290, 6.2235849722196585125e-306, 4.0513382958982216622e-322, 4.9406564584124654418e-324, + 3.739329163945045238e-290, 6.2235849722196585125e-306, 4.0513382958982216622e-322, 4.9406564584124654418e-324, + 1.1739936631335606518e-290, 5.2739589444122328798e-307, 8.8931816251424377952e-323, 4.9406564584124654418e-324, + 1.1739936631335606518e-290, 5.2739589444122328798e-307, 8.8931816251424377952e-323, 4.9406564584124654418e-324, + 5.3265978793068936284e-291, 5.2739589444122328798e-307, 8.8931816251424377952e-323, 4.9406564584124654418e-324, + 2.1199285032925371836e-291, 5.2739589444122328798e-307, 8.8931816251424377952e-323, 4.9406564584124654418e-324, + 5.165938152853594952e-292, -6.6218316005049451511e-309, -0, -4.9406564584124654418e-324, + 5.165938152853594952e-292, -6.6218316005049451511e-309, -0, -4.9406564584124654418e-324, + 1.157601432835649396e-292, -6.6218316005049451511e-309, -0, -4.9406564584124654418e-324, + 1.157601432835649396e-292, -6.6218316005049451511e-309, -0, -4.9406564584124654418e-324, + 1.5551725283116295139e-293, -1.0591469542369416934e-309, -0, -4.9406564584124654418e-324, +}; + +NOEXPORT ALIGNED(64) const float rempitabsp[] = { + 0.1591549367, 6.420638243e-09, 7.342738699e-17, 1.518506657e-24, + 0.03415494412, -1.029942243e-09, -3.759491547e-17, 1.518506657e-24, + 0.03415494412, -1.029942243e-09, -3.759491547e-17, 1.518506657e-24, + 0.002904943191, -9.861970268e-11, -2.900444505e-18, 7.09405479e-26, + 0.002904943191, -9.861970268e-11, -2.900444505e-18, 7.09405479e-26, + 0.002904943191, -9.861970268e-11, -2.900444505e-18, 7.09405479e-26, + 0.002904943191, -9.861970268e-11, -2.900444505e-18, 7.09405479e-26, + 0.0009518180741, 1.779561568e-11, 5.69002499e-19, 1.92417627e-26, + 0.0009518180741, 1.779561568e-11, 5.69002499e-19, 1.92417627e-26, + 0.0004635368532, -1.130821391e-11, -2.983592131e-19, -6.607632216e-27, + 0.0002193962137, 3.243701098e-12, -8.151878508e-20, -1.452834522e-28, + 9.732590115e-05, 3.243701098e-12, -8.151878508e-20, -1.452834522e-28, + 3.629074854e-05, -3.942777908e-13, -2.036222915e-22, 6.177847236e-30, + 5.77316996e-06, 6.046956013e-14, -2.036222915e-22, 6.177847236e-30, + 5.77316996e-06, 6.046956013e-14, -2.036222915e-22, 6.177847236e-30, + 5.77316996e-06, 6.046956013e-14, -2.036222915e-22, 6.177847236e-30, + 1.958472694e-06, 6.046956013e-14, -2.036222915e-22, 6.177847236e-30, + 5.112412182e-08, 7.342738699e-17, 1.518506657e-24, -3.443243946e-32, + 5.112412182e-08, 7.342738699e-17, 1.518506657e-24, -3.443243946e-32, + 5.112412182e-08, 7.342738699e-17, 1.518506657e-24, -3.443243946e-32, + 5.112412182e-08, 7.342738699e-17, 1.518506657e-24, -3.443243946e-32, + 5.112412182e-08, 7.342738699e-17, 1.518506657e-24, -3.443243946e-32, + 5.112412182e-08, 7.342738699e-17, 1.518506657e-24, -3.443243946e-32, + 2.132179944e-08, 7.342738699e-17, 1.518506657e-24, -3.443243946e-32, + 6.420638243e-09, 7.342738699e-17, 1.518506657e-24, -3.443243946e-32, + 6.420638243e-09, 7.342738699e-17, 1.518506657e-24, -3.443243946e-32, + 2.695347945e-09, 7.342738699e-17, 1.518506657e-24, -3.443243946e-32, + 8.327028511e-10, 1.791623741e-17, -1.358546052e-25, 2.545416018e-33, + 8.327028511e-10, 1.791623741e-17, -1.358546052e-25, 2.545416018e-33, + 3.670415916e-10, -9.839338202e-18, -1.358546052e-25, 2.545416018e-33, + 1.34210934e-10, 4.038449606e-18, -1.358546052e-25, 2.545416018e-33, + 1.779561568e-11, 5.69002499e-19, 1.92417627e-26, -5.360718009e-34, + 1.779561568e-11, 5.69002499e-19, 1.92417627e-26, -5.360718009e-34, + 1.779561568e-11, 5.69002499e-19, 1.92417627e-26, -5.360718009e-34, + 3.243701098e-12, -8.151878508e-20, -1.452834522e-28, 5.595982685e-36, + 3.243701098e-12, -8.151878508e-20, -1.452834522e-28, 5.595982685e-36, + 3.243701098e-12, -8.151878508e-20, -1.452834522e-28, 5.595982685e-36, + 1.424711586e-12, 2.690143217e-20, -1.452834522e-28, 5.595982685e-36, + 5.152168839e-13, 2.690143217e-20, -1.452834522e-28, 5.595982685e-36, + 6.046956013e-14, -2.036222915e-22, 6.177847236e-30, -4.639017063e-38, + 6.046956013e-14, -2.036222915e-22, 6.177847236e-30, -4.639017063e-38, + 6.046956013e-14, -2.036222915e-22, 6.177847236e-30, -4.639017063e-38, + 3.626141271e-15, -2.036222915e-22, 6.177847236e-30, -4.639017063e-38, + 3.626141271e-15, -2.036222915e-22, 6.177847236e-30, -4.639017063e-38, + 3.626141271e-15, -2.036222915e-22, 6.177847236e-30, -4.639017063e-38, + 3.626141271e-15, -2.036222915e-22, 6.177847236e-30, -4.639017063e-38, + 7.342738699e-17, 1.518506657e-24, -3.443243946e-32, 6.296048013e-40, + 7.342738699e-17, 1.518506657e-24, -3.443243946e-32, 6.296048013e-40, + 7.342738699e-17, 1.518506657e-24, -3.443243946e-32, 6.296048013e-40, + 7.342738699e-17, 1.518506657e-24, -3.443243946e-32, 6.296048013e-40, + 7.342738699e-17, 1.518506657e-24, -3.443243946e-32, 6.296048013e-40, + 7.342738699e-17, 1.518506657e-24, -3.443243946e-32, 6.296048013e-40, + 1.791623741e-17, -1.358546052e-25, 2.545416018e-33, 7.859182437e-41, + 1.791623741e-17, -1.358546052e-25, 2.545416018e-33, 7.859182437e-41, + 4.038449606e-18, -1.358546052e-25, 2.545416018e-33, 7.859182437e-41, + 4.038449606e-18, -1.358546052e-25, 2.545416018e-33, 7.859182437e-41, + 5.69002499e-19, 1.92417627e-26, -5.360718009e-34, -1.324367179e-41, + 5.69002499e-19, 1.92417627e-26, -5.360718009e-34, -1.324367179e-41, + 5.69002499e-19, 1.92417627e-26, -5.360718009e-34, -1.324367179e-41, + 1.35321643e-19, 6.31706524e-27, -1.508858235e-34, -1.764234767e-42, + 1.35321643e-19, 6.31706524e-27, -1.508858235e-34, -1.764234767e-42, + 2.690143217e-20, -1.452834522e-28, 5.595982685e-36, 2.942726775e-44, + 2.690143217e-20, -1.452834522e-28, 5.595982685e-36, 2.942726775e-44, + 2.690143217e-20, -1.452834522e-28, 5.595982685e-36, 2.942726775e-44, + 1.334890502e-20, -1.452834522e-28, 5.595982685e-36, 2.942726775e-44, + 6.572641438e-21, -1.452834522e-28, 5.595982685e-36, 2.942726775e-44, + 3.184509447e-21, 5.666494555e-29, -4.225483461e-37, -1.541428311e-44, + 1.490443654e-21, -4.430925032e-29, -4.225483461e-37, -1.541428311e-44, + 6.434106558e-22, 6.177847236e-30, -4.639017063e-38, 1.401298464e-45, + 2.198941822e-22, 6.177847236e-30, -4.639017063e-38, 1.401298464e-45, + 8.135951656e-24, -1.330400526e-31, 6.296048013e-40, -0, + 8.135951656e-24, -1.330400526e-31, 6.296048013e-40, -0, + 8.135951656e-24, -1.330400526e-31, 6.296048013e-40, -0, + 8.135951656e-24, -1.330400526e-31, 6.296048013e-40, -0, + 8.135951656e-24, -1.330400526e-31, 6.296048013e-40, -0, + 1.518506657e-24, -3.443243946e-32, 6.296048013e-40, -0, + 1.518506657e-24, -3.443243946e-32, 6.296048013e-40, -0, + 1.518506657e-24, -3.443243946e-32, 6.296048013e-40, -0, + 6.91325995e-25, 1.487136711e-32, 6.296048013e-40, -0, + 2.777357134e-25, -9.780535442e-33, -1.050791679e-40, -0, + 7.09405479e-26, 2.545416018e-33, 7.859182437e-41, -0, + 7.09405479e-26, 2.545416018e-33, 7.859182437e-41, -0, + 1.92417627e-26, -5.360718009e-34, -1.324367179e-41, -0, + 1.92417627e-26, -5.360718009e-34, -1.324367179e-41, -0, + 6.31706524e-27, -1.508858235e-34, -1.764234767e-42, -0, + 6.31706524e-27, -1.508858235e-34, -1.764234767e-42, -0, + 3.085890779e-27, 4.170716807e-35, 1.105624488e-42, -0, + 1.470303646e-27, 4.170716807e-35, 1.105624488e-42, -0, + 6.625101268e-28, -6.441079108e-36, -3.293051391e-43, -0, + 2.586133433e-28, -6.441079108e-36, -3.293051391e-43, -0, + 5.666494555e-29, -4.225483461e-37, -1.541428311e-44, -0, + 5.666494555e-29, -4.225483461e-37, -1.541428311e-44, -0, + 6.177847236e-30, -4.639017063e-38, 1.401298464e-45, -0, + 6.177847236e-30, -4.639017063e-38, 1.401298464e-45, -0, + 6.177847236e-30, -4.639017063e-38, 1.401298464e-45, -0, + 6.177847236e-30, -4.639017063e-38, 1.401298464e-45, -0, + 3.022403615e-30, -4.639017063e-38, 1.401298464e-45, -0, + 1.444681805e-30, -4.639017063e-38, 1.401298464e-45, -0, + 6.558208526e-31, 6.296048013e-40, -0, -0, + 2.613904e-31, 6.296048013e-40, -0, -0, + 6.417517369e-32, 6.296048013e-40, -0, -0, + 6.417517369e-32, 6.296048013e-40, -0, -0, + 1.487136711e-32, 6.296048013e-40, -0, -0, +}; diff --git a/src/libm/sleefdp.c b/src/libm/sleefdp.c index 5db9491a..1937932e 100644 --- a/src/libm/sleefdp.c +++ b/src/libm/sleefdp.c @@ -1,4 +1,4 @@ -// Copyright Naoki Shibata 2010 - 2017. +// Copyright Naoki Shibata 2010 - 2018. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -20,6 +20,8 @@ #include "misc.h" +extern const double rempitabdp[]; + #ifdef DORENAME #include "rename.h" #endif @@ -714,20 +716,88 @@ EXPORT CONST double xatan_u1(double d) { return mulsign(r, d); } +typedef struct { + double d; + int32_t i; +} di_t; + +typedef struct { + Sleef_double2 dd; + int32_t i; +} ddi_t; + +static CONST di_t rempisub(double x) { + // This function is equivalent to : + // di_t ret = { x - round(4 * x) * 0.25, (int32_t)(round(4 * x) - round(x) * 4) }; + di_t ret; + double fr = x - (double)(1LL << 28) * (int32_t)(x * (1.0 / (1LL << 28))); + ret.i = ((7 & ((x > 0 ? 4 : 3) + (int32_t)(fr * 8))) - 3) >> 1; + fr = fr - 0.25 * (int32_t)(fr * 4 + mulsign(0.5, x)); + fr = fabsk(fr) > 0.25 ? (fr - mulsign(0.5, x)) : fr; + fr = fabsk(fr) > 1e+10 ? 0 : fr; + if (fabsk(x) == 0.12499999999999998612) { fr = x; ret.i = 0; } + ret.d = fr; + return ret; +} + +// Payne-Hanek like argument reduction +static CONST ddi_t rempi(double a) { + Sleef_double2 x, y, z; + di_t di; + double t; + int ex = ilogb2k(a) - 55, q; + if (ex < 0) ex = 0; + ex *= 4; + x = ddmul_d2_d_d(a, rempitabdp[ex]); + di = rempisub(x.x); + q = di.i; + x.x = di.d; + x = ddnormalize_d2_d2(x); + y = ddmul_d2_d_d(a, rempitabdp[ex+1]); + x = ddadd2_d2_d2_d2(x, y); + di = rempisub(x.x); + q += di.i; + x.x = di.d; + x = ddnormalize_d2_d2(x); + y = ddmul_d2_d2_d(dd(rempitabdp[ex+2], rempitabdp[ex+3]), a); + x = ddadd2_d2_d2_d2(x, y); + x = ddnormalize_d2_d2(x); + x = ddmul_d2_d2_d2(x, dd(3.141592653589793116*2, 1.2246467991473532072e-16*2)); + ddi_t ret = { fabsk(a) < 0.7 ? dd(a, 0) : x, q }; + return ret; +} + EXPORT CONST double xsin(double d) { double u, s, t = d; + int ql; + + if (fabsk(d) < TRIGRANGEMAX2) { + ql = rintk(d * M_1_PI); + d = mla(ql, -PI_A2, d); + d = mla(ql, -PI_B2, d); + } else if (fabsk(d) < TRIGRANGEMAX) { + double dqh = trunck(d * (M_1_PI / (1 << 24))) * (double)(1 << 24); + ql = rintk(mla(d, M_1_PI, -dqh)); - double dqh = trunck(d * (M_1_PI / (1 << 24))) * (double)(1 << 24); - int ql = rintk(mla(d, M_1_PI, -dqh)); + d = mla(dqh, -PI_A, d); + d = mla( ql, -PI_A, d); + d = mla(dqh, -PI_B, d); + d = mla( ql, -PI_B, d); + d = mla(dqh, -PI_C, d); + d = mla( ql, -PI_C, d); + d = mla(dqh + ql, -PI_D, d); + } else { + ddi_t ddi = rempi(t); + ql = ((ddi.i & 3) * 2 + (ddi.dd.x > 0) + 1) >> 2; + if ((ddi.i & 1) != 0) { + ddi.dd = ddadd2_d2_d2_d2(ddi.dd, dd(mulsign(3.141592653589793116*-0.5, ddi.dd.x), + mulsign(1.2246467991473532072e-16*-0.5, ddi.dd.x))); + } + d = ddi.dd.x + ddi.dd.y; + + if (fabsk(t) > 1e+299 && !xisinf(t)) d = 0; + } - d = mla(dqh, -PI_A, d); - d = mla( ql, -PI_A, d); - d = mla(dqh, -PI_B, d); - d = mla( ql, -PI_B, d); - d = mla(dqh, -PI_C, d); - d = mla( ql, -PI_C, d); - d = mla(dqh + ql, -PI_D, d); - s = d * d; if ((ql & 1) != 0) d = -d; @@ -744,7 +814,7 @@ EXPORT CONST double xsin(double d) { u = mla(s, u * d, d); - if (!xisinf(t) && (xisnegzero(t) || fabsk(t) > TRIGRANGEMAX)) u = -0.0; + if (xisnegzero(t)) u = t; return u; } @@ -758,7 +828,7 @@ EXPORT CONST double xsin_u1(double d) { ql = rintk(d * M_1_PI); u = mla(ql, -PI_A2, d); s = ddadd_d2_d_d (u, ql * -PI_B2); - } else { + } else if (fabsk(d) < TRIGRANGEMAX) { const double dqh = trunck(d * (M_1_PI / (1 << 24))) * (double)(1 << 24); ql = rintk(mla(d, M_1_PI, -dqh)); @@ -769,6 +839,16 @@ EXPORT CONST double xsin_u1(double d) { s = ddadd2_d2_d2_d(s, dqh * -PI_C); s = ddadd2_d2_d2_d(s, ql * -PI_C); s = ddadd_d2_d2_d (s, (dqh + ql) * -PI_D); + } else { + ddi_t ddi = rempi(d); + ql = ((ddi.i & 3) * 2 + (ddi.dd.x > 0) + 1) >> 2; + if ((ddi.i & 1) != 0) { + ddi.dd = ddadd2_d2_d2_d2(ddi.dd, dd(mulsign(3.141592653589793116*-0.5, ddi.dd.x), + mulsign(1.2246467991473532072e-16*-0.5, ddi.dd.x))); + } + s = ddnormalize_d2_d2(ddi.dd); + + if (fabsk(d) > 1e+299 && !xisinf(d)) s = dd(0, 0); } t = s; @@ -787,25 +867,42 @@ EXPORT CONST double xsin_u1(double d) { u = ddmul_d_d2_d2(t, x); if ((ql & 1) != 0) u = -u; - if (!xisinf(d) && (xisnegzero(d) || fabsk(d) > TRIGRANGEMAX)) u = -0.0; + if (xisnegzero(d)) u = d; return u; } EXPORT CONST double xcos(double d) { double u, s, t = d; + int ql; - double dqh = trunck(d * (M_1_PI / (1LL << 23)) - 0.5 * (M_1_PI / (1LL << 23))); - int ql = 2*rintk(d * M_1_PI - 0.5 - dqh * (double)(1LL << 23))+1; - dqh *= 1 << 24; + if (fabsk(d) < TRIGRANGEMAX2) { + ql = mla(2, rintk(d * M_1_PI - 0.5), 1); + d = mla(ql, -PI_A2*0.5, d); + d = mla(ql, -PI_B2*0.5, d); + } else if (fabsk(d) < TRIGRANGEMAX) { + double dqh = trunck(d * (M_1_PI / (1LL << 23)) - 0.5 * (M_1_PI / (1LL << 23))); + ql = 2*rintk(d * M_1_PI - 0.5 - dqh * (double)(1LL << 23))+1; + dqh *= 1 << 24; - d = mla(dqh, -PI_A*0.5, d); - d = mla( ql, -PI_A*0.5, d); - d = mla(dqh, -PI_B*0.5, d); - d = mla( ql, -PI_B*0.5, d); - d = mla(dqh, -PI_C*0.5, d); - d = mla( ql, -PI_C*0.5, d); - d = mla(dqh + ql , -PI_D*0.5, d); + d = mla(dqh, -PI_A*0.5, d); + d = mla( ql, -PI_A*0.5, d); + d = mla(dqh, -PI_B*0.5, d); + d = mla( ql, -PI_B*0.5, d); + d = mla(dqh, -PI_C*0.5, d); + d = mla( ql, -PI_C*0.5, d); + d = mla(dqh + ql , -PI_D*0.5, d); + } else { + ddi_t ddi = rempi(t); + ql = ((ddi.i & 3) * 2 + (ddi.dd.x > 0) + 7) >> 1; + if ((ddi.i & 1) == 0) { + ddi.dd = ddadd2_d2_d2_d2(ddi.dd, dd(mulsign(3.141592653589793116*-0.5, ddi.dd.x > 0 ? 1 : -1), + mulsign(1.2246467991473532072e-16*-0.5, ddi.dd.x > 0 ? 1 : -1))); + } + d = ddi.dd.x + ddi.dd.y; + + if (!xisinf(t) && fabsk(t) > 1e+299) d = 0; + } s = d * d; @@ -823,8 +920,6 @@ EXPORT CONST double xcos(double d) { u = mla(s, u * d, d); - if (!xisinf(t) && fabsk(t) > TRIGRANGEMAX) u = 1.0; - return u; } @@ -839,7 +934,7 @@ EXPORT CONST double xcos_u1(double d) { ql = mla(2, rintk(d * M_1_PI - 0.5), 1); s = ddadd2_d2_d_d(d, ql * (-PI_A2*0.5)); s = ddadd_d2_d2_d(s, ql * (-PI_B2*0.5)); - } else { + } else if (d < TRIGRANGEMAX) { double dqh = trunck(d * (M_1_PI / (1LL << 23)) - 0.5 * (M_1_PI / (1LL << 23))); ql = 2*rintk(d * M_1_PI - 0.5 - dqh * (double)(1LL << 23))+1; dqh *= 1 << 24; @@ -851,6 +946,16 @@ EXPORT CONST double xcos_u1(double d) { s = ddadd2_d2_d2_d(s, dqh * (-PI_C*0.5)); s = ddadd2_d2_d2_d(s, ql * (-PI_C*0.5)); s = ddadd_d2_d2_d(s, (dqh + ql) * (-PI_D*0.5)); + } else { + ddi_t ddi = rempi(d); + ql = ((ddi.i & 3) * 2 + (ddi.dd.x > 0) + 7) >> 1; + if ((ddi.i & 1) == 0) { + ddi.dd = ddadd2_d2_d2_d2(ddi.dd, dd(mulsign(3.141592653589793116*-0.5, ddi.dd.x > 0 ? 1 : -1), + mulsign(1.2246467991473532072e-16*-0.5, ddi.dd.x > 0 ? 1 : -1))); + } + s = ddnormalize_d2_d2(ddi.dd); + + if (!xisinf(d) && d > 1e+299) s = dd(0, 0); } t = s; @@ -869,7 +974,6 @@ EXPORT CONST double xcos_u1(double d) { u = ddmul_d_d2_d2(t, x); if ((((int)ql) & 2) == 0) u = -u; - if (!xisinf(d) && d > TRIGRANGEMAX) u = 1.0; return u; } @@ -877,20 +981,34 @@ EXPORT CONST double xcos_u1(double d) { EXPORT CONST Sleef_double2 xsincos(double d) { double u, s, t; Sleef_double2 r; + int ql; s = d; - double dqh = trunck(d * ((2 * M_1_PI) / (1 << 24))) * (double)(1 << 24); - int ql = rintk(d * (2 * M_1_PI) - dqh); + if (fabsk(d) < TRIGRANGEMAX2) { + ql = rintk(s * (2 * M_1_PI)); + s = mla(ql, -PI_A2*0.5, s); + s = mla(ql, -PI_B2*0.5, s); + } else if (fabsk(d) < TRIGRANGEMAX) { + double dqh = trunck(d * ((2 * M_1_PI) / (1 << 24))) * (double)(1 << 24); + ql = rintk(d * (2 * M_1_PI) - dqh); + + s = mla(dqh, -PI_A * 0.5, s); + s = mla( ql, -PI_A * 0.5, s); + s = mla(dqh, -PI_B * 0.5, s); + s = mla( ql, -PI_B * 0.5, s); + s = mla(dqh, -PI_C * 0.5, s); + s = mla( ql, -PI_C * 0.5, s); + s = mla(dqh + ql, -PI_D * 0.5, s); + } else { + ddi_t ddi = rempi(d); + ql = ddi.i; + s = ddi.dd.x + ddi.dd.y; + + if (fabsk(d) > 1e+299) s = 0; + if (xisinf(d)) s = SLEEF_NAN; + } - s = mla(dqh, -PI_A * 0.5, s); - s = mla( ql, -PI_A * 0.5, s); - s = mla(dqh, -PI_B * 0.5, s); - s = mla( ql, -PI_B * 0.5, s); - s = mla(dqh, -PI_C * 0.5, s); - s = mla( ql, -PI_C * 0.5, s); - s = mla(dqh + ql, -PI_D * 0.5, s); - t = s; s = s * s; @@ -921,9 +1039,6 @@ EXPORT CONST Sleef_double2 xsincos(double d) { if ((ql & 2) != 0) { r.x = -r.x; } if (((ql+1) & 2) != 0) { r.y = -r.y; } - if (fabsk(d) > TRIGRANGEMAX) { r.x = 0; r.y = 1; } - if (xisinf(d)) { r.x = r.y = SLEEF_NAN; } - return r; } @@ -936,7 +1051,7 @@ EXPORT CONST Sleef_double2 xsincos_u1(double d) { ql = rintk(d * (2 * M_1_PI)); u = mla(ql, -PI_A2*0.5, d); s = ddadd_d2_d_d (u, ql * (-PI_B2*0.5)); - } else { + } else if (fabsk(d) < TRIGRANGEMAX) { const double dqh = trunck(d * ((2 * M_1_PI) / (1 << 24))) * (double)(1 << 24); ql = rintk(d * (2 * M_1_PI) - dqh); @@ -947,6 +1062,13 @@ EXPORT CONST Sleef_double2 xsincos_u1(double d) { s = ddadd2_d2_d2_d(s, dqh * (-PI_C*0.5)); s = ddadd2_d2_d2_d(s, ql * (-PI_C*0.5)); s = ddadd_d2_d2_d(s, (dqh + ql) * (-PI_D*0.5)); + } else { + ddi_t ddi = rempi(d); + ql = ddi.i; + s = ddi.dd; + + if (fabsk(d) > 1e+299) s = dd(0, 0); + if (xisinf(d)) s = dd(SLEEF_NAN, SLEEF_NAN); } t = s; @@ -982,9 +1104,6 @@ EXPORT CONST Sleef_double2 xsincos_u1(double d) { if ((ql & 2) != 0) { r.x = -r.x; } if (((ql+1) & 2) != 0) { r.y = -r.y; } - if (fabsk(d) > TRIGRANGEMAX) { r.x = 0; r.y = 1; } - if (xisinf(d)) { r.x = r.y = SLEEF_NAN; } - return r; } @@ -1185,17 +1304,29 @@ EXPORT CONST double xcospi_u05(double d) { EXPORT CONST double xtan(double d) { double u, s, x; + int ql; - double dqh = trunck(d * ((2 * M_1_PI) / (1 << 24))) * (double)(1 << 24); - int ql = rintk(d * (2 * M_1_PI) - dqh); + if (fabsk(d) < TRIGRANGEMAX2) { + ql = rintk(d * (2 * M_1_PI)); + x = mla(ql, -PI_A2*0.5, d); + x = mla(ql, -PI_B2*0.5, x); + } else if (fabsk(d) < 1e+7) { + double dqh = trunck(d * ((2 * M_1_PI) / (1 << 24))) * (double)(1 << 24); + ql = rintk(d * (2 * M_1_PI) - dqh); - x = mla(dqh, -PI_A * 0.5, d); - x = mla( ql, -PI_A * 0.5, x); - x = mla(dqh, -PI_B * 0.5, x); - x = mla( ql, -PI_B * 0.5, x); - x = mla(dqh, -PI_C * 0.5, x); - x = mla( ql, -PI_C * 0.5, x); - x = mla(dqh + ql, -PI_D * 0.5, x); + x = mla(dqh, -PI_A * 0.5, d); + x = mla( ql, -PI_A * 0.5, x); + x = mla(dqh, -PI_B * 0.5, x); + x = mla( ql, -PI_B * 0.5, x); + x = mla(dqh, -PI_C * 0.5, x); + x = mla( ql, -PI_C * 0.5, x); + x = mla(dqh + ql, -PI_D * 0.5, x); + } else { + ddi_t ddi = rempi(d); + ql = ddi.i; + x = ddi.dd.x + ddi.dd.y; + if (xisinf(d)) x = SLEEF_NAN; + } s = x * x; @@ -1222,8 +1353,6 @@ EXPORT CONST double xtan(double d) { if ((ql & 1) != 0) u = 1.0 / u; - if (xisinf(d)) u = SLEEF_NAN; - return u; } @@ -1236,7 +1365,7 @@ EXPORT CONST double xtan_u1(double d) { ql = rintk(d * (2 * M_1_PI)); u = mla(ql, -PI_A2*0.5, d); s = ddadd_d2_d_d(u, ql * (-PI_B2*0.5)); - } else { + } else if (fabsk(d) < TRIGRANGEMAX) { const double dqh = trunck(d * (M_2_PI / (1 << 24))) * (double)(1 << 24); s = ddadd2_d2_d2_d(ddmul_d2_d2_d(dd(M_2_PI_H, M_2_PI_L), d), (d < 0 ? -0.5 : 0.5) - dqh); ql = s.x + s.y; @@ -1248,6 +1377,12 @@ EXPORT CONST double xtan_u1(double d) { s = ddadd2_d2_d2_d(s, dqh * (-PI_C*0.5)); s = ddadd2_d2_d2_d(s, ql * (-PI_C*0.5)); s = ddadd_d2_d2_d(s, (dqh + ql) * (-PI_D*0.5)); + } else { + ddi_t ddi = rempi(d); + ql = ddi.i; + s = ddi.dd; + + if (xisinf(d)) s = dd(SLEEF_NAN, SLEEF_NAN); } if ((ql & 1) != 0) s = ddneg_d2_d2(s); @@ -1277,7 +1412,7 @@ EXPORT CONST double xtan_u1(double d) { u = x.x + x.y; - if (!xisinf(d) && (xisnegzero(d) || fabsk(d) > TRIGRANGEMAX)) u = -0.0; + if (xisnegzero(d)) u = d; return u; } @@ -1932,7 +2067,7 @@ EXPORT CONST double xfma(double x, double y, double z) { z *= c2; q = 1.0 / c2; } - if (fabsk(h2) > 1e+300) { + if (fabsk(h2) > 1e+299) { const double c0 = 1ULL << 54, c1 = c0 * c0, c2 = c1 * c1; x *= 1.0 / c1; y *= 1.0 / c1; diff --git a/src/libm/sleefsimddp.c b/src/libm/sleefsimddp.c index 76af122b..13591f97 100644 --- a/src/libm/sleefsimddp.c +++ b/src/libm/sleefsimddp.c @@ -1,4 +1,4 @@ -// Copyright Naoki Shibata 2010 - 2017. +// Copyright Naoki Shibata 2010 - 2018. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -12,6 +12,8 @@ #include "misc.h" +extern const double rempitabdp[]; + #define __SLEEFSIMDDP_C__ #if (defined(_MSC_VER)) @@ -262,21 +264,120 @@ EXPORT CONST vint xilogb(vdouble d) { return vrint_vi_vd(e); } +#ifdef ENABLE_SVE +typedef __sizeless_struct { + vdouble d; + vint i; +} di_t; + +typedef __sizeless_struct { + vdouble2 dd; + vint i; +} ddi_t; +#else +typedef struct { + vdouble d; + vint i; +} di_t; + +typedef struct { + vdouble2 dd; + vint i; +} ddi_t; +#endif + +static INLINE CONST di_t rempisub(vdouble x) { +#ifdef FULL_FP_ROUNDING + vdouble y = vrint_vd_vd(vmul_vd_vd_vd(x, vcast_vd_d(4))); + vint vi = vtruncate_vi_vd(vsub_vd_vd_vd(y, vmul_vd_vd_vd(vrint_vd_vd(x), vcast_vd_d(4)))); + di_t ret = { vsub_vd_vd_vd(x, vmul_vd_vd_vd(y, vcast_vd_d(0.25))), vi }; +#else + vdouble fr = vsub_vd_vd_vd(x, vmul_vd_vd_vd(vcast_vd_d(1LL << 28), vtruncate_vd_vd(vmul_vd_vd_vd(x, vcast_vd_d(1.0 / (1LL << 28)))))); + vint vi = vadd_vi_vi_vi(vsel_vi_vo_vi_vi(vcast_vo32_vo64(vgt_vo_vd_vd(x, vcast_vd_d(0))), vcast_vi_i(4), vcast_vi_i(3)), vtruncate_vi_vd(vmul_vd_vd_vd(fr, vcast_vd_d(8)))); + vi = vsra_vi_vi_i(vsub_vi_vi_vi(vand_vi_vi_vi(vcast_vi_i(7), vi), vcast_vi_i(3)), 1); + fr = vsub_vd_vd_vd(fr, vmul_vd_vd_vd(vcast_vd_d(0.25), vtruncate_vd_vd(vmla_vd_vd_vd_vd(fr, vcast_vd_d(4), vmulsign_vd_vd_vd(vcast_vd_d(0.5), x))))); + fr = vsel_vd_vo_vd_vd(vgt_vo_vd_vd(vabs_vd_vd(fr), vcast_vd_d(0.25)), vsub_vd_vd_vd(fr, vmulsign_vd_vd_vd(vcast_vd_d(0.5), x)), fr); + fr = vsel_vd_vo_vd_vd(vgt_vo_vd_vd(vabs_vd_vd(fr), vcast_vd_d(1e+10)), vcast_vd_d(0), fr); + vopmask o = veq_vo_vd_vd(vabs_vd_vd(x), vcast_vd_d(0.12499999999999998612)); + fr = vsel_vd_vo_vd_vd(o, x, fr); + vi = vsel_vi_vo_vi_vi(vcast_vo32_vo64(o), vcast_vi_i(0), vi); + di_t ret = { fr, vi }; +#endif + return ret; +} + +static INLINE CONST ddi_t rempi(vdouble a) { + vdouble2 x, y, z; + vint ex = vilogb2k_vi_vd(a), q; +#ifdef ENABLE_AVX512F + ex = vandnot_vi_vi_vi(vsra_vi_vi_i(ex, 31), ex); + ex = vand_vi_vi_vi(ex, vcast_vi_i(1023)); +#endif + ex = vsub_vi_vi_vi(ex, vcast_vi_i(55)); + ex = vandnot_vi_vi_vi(vsra_vi_vi_i(ex, 31), ex); + ex = vadd_vi_vi_vi(ex, ex); + ex = vadd_vi_vi_vi(ex, ex); + x = ddmul_vd2_vd_vd(a, vgather_vd_p_vi(rempitabdp, ex)); + di_t di = rempisub(x.x); + q = di.i; + x.x = di.d; + x = ddnormalize_vd2_vd2(x); + y = ddmul_vd2_vd_vd(a, vgather_vd_p_vi(rempitabdp+1, ex)); + x = ddadd2_vd2_vd2_vd2(x, y); + di = rempisub(x.x); + q = vadd_vi_vi_vi(q, di.i); + x.x = di.d; + x = ddnormalize_vd2_vd2(x); + y = vcast_vd2_vd_vd(vgather_vd_p_vi(rempitabdp+2, ex), vgather_vd_p_vi(rempitabdp+3, ex)); + y = ddmul_vd2_vd2_vd(y, a); + x = ddadd2_vd2_vd2_vd2(x, y); + x = ddnormalize_vd2_vd2(x); + x = ddmul_vd2_vd2_vd2(x, vcast_vd2_d_d(3.141592653589793116*2, 1.2246467991473532072e-16*2)); + vopmask o = vlt_vo_vd_vd(vabs_vd_vd(a), vcast_vd_d(0.7)); + x.x = vsel_vd_vo_vd_vd(o, a, x.x); + x.y = vreinterpret_vd_vm(vandnot_vm_vo64_vm(o, vreinterpret_vm_vd(x.y))); + ddi_t ret = { x, q }; + return ret; +} + EXPORT CONST vdouble xsin(vdouble d) { vdouble u, s, r = d; - vdouble dqh = vtruncate_vd_vd(vmul_vd_vd_vd(d, vcast_vd_d(M_1_PI / (1 << 24)))); - dqh = vmul_vd_vd_vd(dqh, vcast_vd_d(1 << 24)); - vdouble dql = vrint_vd_vd(vmlapn_vd_vd_vd_vd(d, vcast_vd_d(M_1_PI), dqh)); - vint ql = vrint_vi_vd(dql); - - d = vmla_vd_vd_vd_vd(dqh, vcast_vd_d(-PI_A), d); - d = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_A), d); - d = vmla_vd_vd_vd_vd(dqh, vcast_vd_d(-PI_B), d); - d = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_B), d); - d = vmla_vd_vd_vd_vd(dqh, vcast_vd_d(-PI_C), d); - d = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_C), d); - d = vmla_vd_vd_vd_vd(vadd_vd_vd_vd(dqh, dql), vcast_vd_d(-PI_D), d); - + vint ql; + + if (LIKELY(vtestallones_i_vo64(vlt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(TRIGRANGEMAX2))))) { + vdouble dql = vrint_vd_vd(vmul_vd_vd_vd(d, vcast_vd_d(M_1_PI))); + ql = vrint_vi_vd(dql); + d = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_A2), d); + d = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_B2), d); + } else if (LIKELY(vtestallones_i_vo64(vlt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(TRIGRANGEMAX))))) { + vdouble dqh = vtruncate_vd_vd(vmul_vd_vd_vd(d, vcast_vd_d(M_1_PI / (1 << 24)))); + dqh = vmul_vd_vd_vd(dqh, vcast_vd_d(1 << 24)); + vdouble dql = vrint_vd_vd(vmlapn_vd_vd_vd_vd(d, vcast_vd_d(M_1_PI), dqh)); + ql = vrint_vi_vd(dql); + + d = vmla_vd_vd_vd_vd(dqh, vcast_vd_d(-PI_A), d); + d = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_A), d); + d = vmla_vd_vd_vd_vd(dqh, vcast_vd_d(-PI_B), d); + d = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_B), d); + d = vmla_vd_vd_vd_vd(dqh, vcast_vd_d(-PI_C), d); + d = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_C), d); + d = vmla_vd_vd_vd_vd(vadd_vd_vd_vd(dqh, dql), vcast_vd_d(-PI_D), d); + } else { + ddi_t ddi = rempi(d); + ql = vand_vi_vi_vi(ddi.i, vcast_vi_i(3)); + ql = vadd_vi_vi_vi(vadd_vi_vi_vi(ql, ql), vsel_vi_vo_vi_vi(vcast_vo32_vo64(vgt_vo_vd_vd(ddi.dd.x, vcast_vd_d(0))), vcast_vi_i(2), vcast_vi_i(1))); + ql = vsra_vi_vi_i(ql, 2); + vopmask o = veq_vo_vi_vi(vand_vi_vi_vi(ddi.i, vcast_vi_i(1)), vcast_vi_i(1)); + vdouble2 x = vcast_vd2_vd_vd(vmulsign_vd_vd_vd(vcast_vd_d(-3.141592653589793116 * 0.5), ddi.dd.x), + vmulsign_vd_vd_vd(vcast_vd_d(-1.2246467991473532072e-16 * 0.5), ddi.dd.x)); + x = ddadd2_vd2_vd2_vd2(ddi.dd, x); + ddi.dd = vsel_vd2_vo_vd2_vd2(vcast_vo64_vo32(o), x, ddi.dd); + d = vadd_vd_vd_vd(ddi.dd.x, ddi.dd.y); + d = vsel_vd_vo_vd_vd(vandnot_vo_vo_vo(visinf_vo_vd(r), + vgt_vo_vd_vd(vabs_vd_vd(r), vcast_vd_d(1e+299))), + vcast_vd_d(0), d); + } + s = vmul_vd_vd_vd(d, d); d = vreinterpret_vd_vm(vxor_vm_vm_vm(vand_vm_vo64_vm(vcast_vo64_vo32(veq_vo_vi_vi(vand_vi_vi_vi(ql, vcast_vi_i(1)), vcast_vi_i(1))), vreinterpret_vm_vd(vcast_vd_d(-0.0))), vreinterpret_vm_vd(d))); @@ -293,10 +394,7 @@ EXPORT CONST vdouble xsin(vdouble d) { u = vadd_vd_vd_vd(vmul_vd_vd_vd(s, vmul_vd_vd_vd(u, d)), d); - u = vsel_vd_vo_vd_vd(vandnot_vo_vo_vo(visinf_vo_vd(r), - vor_vo_vo_vo(visnegzero_vo_vd(r), - vgt_vo_vd_vd(vabs_vd_vd(r), vcast_vd_d(TRIGRANGEMAX)))), - vcast_vd_d(-0.0), u); + u = vsel_vd_vo_vd_vd(visnegzero_vo_vd(r), r, u); return u; } @@ -306,12 +404,12 @@ EXPORT CONST vdouble xsin_u1(vdouble d) { vdouble2 s, t, x; vint ql; - if (vtestallones_i_vo64(vlt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(TRIGRANGEMAX2)))) { + if (LIKELY(vtestallones_i_vo64(vlt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(TRIGRANGEMAX2))))) { const vdouble dql = vrint_vd_vd(vmul_vd_vd_vd(d, vcast_vd_d(M_1_PI))); ql = vrint_vi_vd(dql); u = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_A2), d); s = ddadd_vd2_vd_vd (u, vmul_vd_vd_vd(dql, vcast_vd_d(-PI_B2))); - } else { + } else if (LIKELY(vtestallones_i_vo64(vlt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(TRIGRANGEMAX))))) { vdouble dqh = vtruncate_vd_vd(vmul_vd_vd_vd(d, vcast_vd_d(M_1_PI / (1 << 24)))); dqh = vmul_vd_vd_vd(dqh, vcast_vd_d(1 << 24)); const vdouble dql = vrint_vd_vd(vmlapn_vd_vd_vd_vd(d, vcast_vd_d(M_1_PI), dqh)); @@ -324,6 +422,19 @@ EXPORT CONST vdouble xsin_u1(vdouble d) { s = ddadd2_vd2_vd2_vd(s, vmul_vd_vd_vd(dqh, vcast_vd_d(-PI_C))); s = ddadd2_vd2_vd2_vd(s, vmul_vd_vd_vd(dql, vcast_vd_d(-PI_C))); s = ddadd_vd2_vd2_vd(s, vmul_vd_vd_vd(vadd_vd_vd_vd(dqh, dql), vcast_vd_d(-PI_D))); + } else { + ddi_t ddi = rempi(d); + ql = vand_vi_vi_vi(ddi.i, vcast_vi_i(3)); + ql = vadd_vi_vi_vi(vadd_vi_vi_vi(ql, ql), vsel_vi_vo_vi_vi(vcast_vo32_vo64(vgt_vo_vd_vd(ddi.dd.x, vcast_vd_d(0))), vcast_vi_i(2), vcast_vi_i(1))); + ql = vsra_vi_vi_i(ql, 2); + vopmask o = veq_vo_vi_vi(vand_vi_vi_vi(ddi.i, vcast_vi_i(1)), vcast_vi_i(1)); + vdouble2 x = vcast_vd2_vd_vd(vmulsign_vd_vd_vd(vcast_vd_d(-3.141592653589793116 * 0.5), ddi.dd.x), + vmulsign_vd_vd_vd(vcast_vd_d(-1.2246467991473532072e-16 * 0.5), ddi.dd.x)); + x = ddadd2_vd2_vd2_vd2(ddi.dd, x); + ddi.dd = vsel_vd2_vo_vd2_vd2(vcast_vo64_vo32(o), x, ddi.dd); + s = ddnormalize_vd2_vd2(ddi.dd); + s = vsel_vd2_vo_vd2_vd2(vandnot_vo_vo_vo(visinf_vo_vd(d), vgt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(1e+299))), + vcast_vd2_d_d(0, 0), s); } t = s; @@ -343,29 +454,53 @@ EXPORT CONST vdouble xsin_u1(vdouble d) { u = vreinterpret_vd_vm(vxor_vm_vm_vm(vand_vm_vo64_vm(vcast_vo64_vo32(veq_vo_vi_vi(vand_vi_vi_vi(ql, vcast_vi_i(1)), vcast_vi_i(1))), vreinterpret_vm_vd(vcast_vd_d(-0.0))), vreinterpret_vm_vd(u))); - u = vsel_vd_vo_vd_vd(vandnot_vo_vo_vo(visinf_vo_vd(d), vor_vo_vo_vo(visnegzero_vo_vd(d), - vgt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(TRIGRANGEMAX)))), - vcast_vd_d(-0.0), u); + u = vsel_vd_vo_vd_vd(visnegzero_vo_vd(d), d, u); return u; } EXPORT CONST vdouble xcos(vdouble d) { vdouble u, s, r = d; - vdouble dqh = vtruncate_vd_vd(vmla_vd_vd_vd_vd(d, vcast_vd_d(M_1_PI / (1 << 23)), vcast_vd_d(-M_1_PI / (1 << 24)))); - vint ql = vrint_vi_vd(vadd_vd_vd_vd(vmul_vd_vd_vd(d, vcast_vd_d(M_1_PI)), - vmla_vd_vd_vd_vd(dqh, vcast_vd_d(-(1 << 23)), vcast_vd_d(-0.5)))); - dqh = vmul_vd_vd_vd(dqh, vcast_vd_d(1 << 24)); - ql = vadd_vi_vi_vi(vadd_vi_vi_vi(ql, ql), vcast_vi_i(1)); - vdouble dql = vcast_vd_vi(ql); - - d = vmla_vd_vd_vd_vd(dqh, vcast_vd_d(-PI_A * 0.5), d); - d = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_A * 0.5), d); - d = vmla_vd_vd_vd_vd(dqh, vcast_vd_d(-PI_B * 0.5), d); - d = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_B * 0.5), d); - d = vmla_vd_vd_vd_vd(dqh, vcast_vd_d(-PI_C * 0.5), d); - d = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_C * 0.5), d); - d = vmla_vd_vd_vd_vd(vadd_vd_vd_vd(dqh, dql), vcast_vd_d(-PI_D * 0.5), d); + vint ql; + + if (LIKELY(vtestallones_i_vo64(vlt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(TRIGRANGEMAX2))))) { + vdouble dql = vmla_vd_vd_vd_vd(vcast_vd_d(2), + vrint_vd_vd(vmla_vd_vd_vd_vd(d, vcast_vd_d(M_1_PI), vcast_vd_d(-0.5))), + vcast_vd_d(1)); + ql = vrint_vi_vd(dql); + d = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_A2 * 0.5), d); + d = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_B2 * 0.5), d); + } else if (LIKELY(vtestallones_i_vo64(vlt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(TRIGRANGEMAX))))) { + vdouble dqh = vtruncate_vd_vd(vmla_vd_vd_vd_vd(d, vcast_vd_d(M_1_PI / (1 << 23)), vcast_vd_d(-M_1_PI / (1 << 24)))); + ql = vrint_vi_vd(vadd_vd_vd_vd(vmul_vd_vd_vd(d, vcast_vd_d(M_1_PI)), + vmla_vd_vd_vd_vd(dqh, vcast_vd_d(-(1 << 23)), vcast_vd_d(-0.5)))); + dqh = vmul_vd_vd_vd(dqh, vcast_vd_d(1 << 24)); + ql = vadd_vi_vi_vi(vadd_vi_vi_vi(ql, ql), vcast_vi_i(1)); + vdouble dql = vcast_vd_vi(ql); + + d = vmla_vd_vd_vd_vd(dqh, vcast_vd_d(-PI_A * 0.5), d); + d = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_A * 0.5), d); + d = vmla_vd_vd_vd_vd(dqh, vcast_vd_d(-PI_B * 0.5), d); + d = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_B * 0.5), d); + d = vmla_vd_vd_vd_vd(dqh, vcast_vd_d(-PI_C * 0.5), d); + d = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_C * 0.5), d); + d = vmla_vd_vd_vd_vd(vadd_vd_vd_vd(dqh, dql), vcast_vd_d(-PI_D * 0.5), d); + } else { + ddi_t ddi = rempi(d); + ql = vand_vi_vi_vi(ddi.i, vcast_vi_i(3)); + ql = vadd_vi_vi_vi(vadd_vi_vi_vi(ql, ql), vsel_vi_vo_vi_vi(vcast_vo32_vo64(vgt_vo_vd_vd(ddi.dd.x, vcast_vd_d(0))), vcast_vi_i(8), vcast_vi_i(7))); + ql = vsra_vi_vi_i(ql, 1); + vopmask o = veq_vo_vi_vi(vand_vi_vi_vi(ddi.i, vcast_vi_i(1)), vcast_vi_i(0)); + vdouble y = vsel_vd_vo_vd_vd(vgt_vo_vd_vd(ddi.dd.x, vcast_vd_d(0)), vcast_vd_d(0), vcast_vd_d(-1)); + vdouble2 x = vcast_vd2_vd_vd(vmulsign_vd_vd_vd(vcast_vd_d(-3.141592653589793116 * 0.5), y), + vmulsign_vd_vd_vd(vcast_vd_d(-1.2246467991473532072e-16 * 0.5), y)); + x = ddadd2_vd2_vd2_vd2(ddi.dd, x); + ddi.dd = vsel_vd2_vo_vd2_vd2(vcast_vo64_vo32(o), x, ddi.dd); + d = vadd_vd_vd_vd(ddi.dd.x, ddi.dd.y); + d = vsel_vd_vo_vd_vd(vandnot_vo_vo_vo(visinf_vo_vd(r), + vgt_vo_vd_vd(vabs_vd_vd(r), vcast_vd_d(1e+299))), + vcast_vd_d(0), d); + } s = vmul_vd_vd_vd(d, d); @@ -382,8 +517,6 @@ EXPORT CONST vdouble xcos(vdouble d) { u = vmla_vd_vd_vd_vd(u, s, vcast_vd_d(-0.166666666666666657414808)); u = vadd_vd_vd_vd(vmul_vd_vd_vd(s, vmul_vd_vd_vd(u, d)), d); - - u = vsel_vd_vo_vd_vd(vandnot_vo_vo_vo(visinf_vo_vd(r), vgt_vo_vd_vd(vabs_vd_vd(r), vcast_vd_d(TRIGRANGEMAX))), vcast_vd_d(1), u); return u; } @@ -393,13 +526,13 @@ EXPORT CONST vdouble xcos_u1(vdouble d) { vdouble2 s, t, x; vint ql; - if (vtestallones_i_vo64(vlt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(TRIGRANGEMAX2)))) { + if (LIKELY(vtestallones_i_vo64(vlt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(TRIGRANGEMAX2))))) { vdouble dql = vrint_vd_vd(vmla_vd_vd_vd_vd(d, vcast_vd_d(M_1_PI), vcast_vd_d(-0.5))); dql = vmla_vd_vd_vd_vd(vcast_vd_d(2), dql, vcast_vd_d(1)); ql = vrint_vi_vd(dql); s = ddadd2_vd2_vd_vd(d, vmul_vd_vd_vd(dql, vcast_vd_d(-PI_A2*0.5))); s = ddadd_vd2_vd2_vd(s, vmul_vd_vd_vd(dql, vcast_vd_d(-PI_B2*0.5))); - } else { + } else if (LIKELY(vtestallones_i_vo64(vlt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(TRIGRANGEMAX))))) { vdouble dqh = vtruncate_vd_vd(vmla_vd_vd_vd_vd(d, vcast_vd_d(M_1_PI / (1 << 23)), vcast_vd_d(-M_1_PI / (1 << 24)))); ql = vrint_vi_vd(vadd_vd_vd_vd(vmul_vd_vd_vd(d, vcast_vd_d(M_1_PI)), vmla_vd_vd_vd_vd(dqh, vcast_vd_d(-(1 << 23)), vcast_vd_d(-0.5)))); @@ -414,6 +547,21 @@ EXPORT CONST vdouble xcos_u1(vdouble d) { s = ddadd2_vd2_vd2_vd(s, vmul_vd_vd_vd(dqh, vcast_vd_d(-PI_C*0.5))); s = ddadd2_vd2_vd2_vd(s, vmul_vd_vd_vd(dql, vcast_vd_d(-PI_C*0.5))); s = ddadd_vd2_vd2_vd(s, vmul_vd_vd_vd(vadd_vd_vd_vd(dqh, dql), vcast_vd_d(-PI_D*0.5))); + } else { + ddi_t ddi = rempi(d); + ql = vand_vi_vi_vi(ddi.i, vcast_vi_i(3)); + ql = vadd_vi_vi_vi(vadd_vi_vi_vi(ql, ql), vsel_vi_vo_vi_vi(vcast_vo32_vo64(vgt_vo_vd_vd(ddi.dd.x, vcast_vd_d(0))), vcast_vi_i(8), vcast_vi_i(7))); + ql = vsra_vi_vi_i(ql, 1); + vopmask o = veq_vo_vi_vi(vand_vi_vi_vi(ddi.i, vcast_vi_i(1)), vcast_vi_i(0)); + vdouble y = vsel_vd_vo_vd_vd(vgt_vo_vd_vd(ddi.dd.x, vcast_vd_d(0)), vcast_vd_d(0), vcast_vd_d(-1)); + vdouble2 x = vcast_vd2_vd_vd(vmulsign_vd_vd_vd(vcast_vd_d(-3.141592653589793116 * 0.5), y), + vmulsign_vd_vd_vd(vcast_vd_d(-1.2246467991473532072e-16 * 0.5), y)); + x = ddadd2_vd2_vd2_vd2(ddi.dd, x); + ddi.dd = vsel_vd2_vo_vd2_vd2(vcast_vo64_vo32(o), x, ddi.dd); + s = ddnormalize_vd2_vd2(ddi.dd); + + s = vsel_vd2_vo_vd2_vd2(vandnot_vo_vo_vo(visinf_vo_vd(d), vgt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(1e+299))), + vcast_vd2_d_d(0, 0), s); } t = s; @@ -432,8 +580,6 @@ EXPORT CONST vdouble xcos_u1(vdouble d) { u = ddmul_vd_vd2_vd2(t, x); u = vreinterpret_vd_vm(vxor_vm_vm_vm(vand_vm_vo64_vm(vcast_vo64_vo32(veq_vo_vi_vi(vand_vi_vi_vi(ql, vcast_vi_i(2)), vcast_vi_i(0))), vreinterpret_vm_vd(vcast_vd_d(-0.0))), vreinterpret_vm_vd(u))); - - u = vsel_vd_vo_vd_vd(vandnot_vo_vo_vo(visinf_vo_vd(d), vgt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(TRIGRANGEMAX))), vcast_vd_d(1), u); return u; } @@ -460,22 +606,35 @@ EXPORT CONST vdouble xcos_u1(vdouble d) { TYPE2_FUNCATR vdouble2 XSINCOS(vdouble d) { vopmask o; - vdouble u, s, t, rx, ry; + vdouble u, t, rx, ry, s = d; vdouble2 r; + vint ql; - s = d; - vdouble dqh = vtruncate_vd_vd(vmul_vd_vd_vd(d, vcast_vd_d(2*M_1_PI / (1 << 24)))); - dqh = vmul_vd_vd_vd(dqh, vcast_vd_d(1 << 24)); - vdouble dql = vrint_vd_vd(vsub_vd_vd_vd(vmul_vd_vd_vd(d, vcast_vd_d(2*M_1_PI)), dqh)); - vint ql = vrint_vi_vd(dql); + if (LIKELY(vtestallones_i_vo64(vlt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(TRIGRANGEMAX2))))) { + vdouble dql = vrint_vd_vd(vmul_vd_vd_vd(s, vcast_vd_d(2 * M_1_PI))); + ql = vrint_vi_vd(dql); + s = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_A2 * 0.5), s); + s = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_B2 * 0.5), s); + } else if (LIKELY(vtestallones_i_vo64(vlt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(TRIGRANGEMAX))))) { + vdouble dqh = vtruncate_vd_vd(vmul_vd_vd_vd(d, vcast_vd_d(2*M_1_PI / (1 << 24)))); + dqh = vmul_vd_vd_vd(dqh, vcast_vd_d(1 << 24)); + vdouble dql = vrint_vd_vd(vsub_vd_vd_vd(vmul_vd_vd_vd(d, vcast_vd_d(2*M_1_PI)), dqh)); + ql = vrint_vi_vd(dql); - s = vmla_vd_vd_vd_vd(dqh, vcast_vd_d(-PI_A * 0.5), s); - s = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_A * 0.5), s); - s = vmla_vd_vd_vd_vd(dqh, vcast_vd_d(-PI_B * 0.5), s); - s = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_B * 0.5), s); - s = vmla_vd_vd_vd_vd(dqh, vcast_vd_d(-PI_C * 0.5), s); - s = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_C * 0.5), s); - s = vmla_vd_vd_vd_vd(vadd_vd_vd_vd(dqh, dql), vcast_vd_d(-PI_D * 0.5), s); + s = vmla_vd_vd_vd_vd(dqh, vcast_vd_d(-PI_A * 0.5), s); + s = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_A * 0.5), s); + s = vmla_vd_vd_vd_vd(dqh, vcast_vd_d(-PI_B * 0.5), s); + s = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_B * 0.5), s); + s = vmla_vd_vd_vd_vd(dqh, vcast_vd_d(-PI_C * 0.5), s); + s = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_C * 0.5), s); + s = vmla_vd_vd_vd_vd(vadd_vd_vd_vd(dqh, dql), vcast_vd_d(-PI_D * 0.5), s); + } else { + ddi_t ddi = rempi(d); + ql = ddi.i; + s = vadd_vd_vd_vd(ddi.dd.x, ddi.dd.y); + s = vreinterpret_vd_vm(vandnot_vm_vo64_vm(vgt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(1e+299)), vreinterpret_vm_vd(s))); + s = vreinterpret_vd_vm(vor_vm_vo64_vm(visinf_vo_vd(d), vreinterpret_vm_vd(s))); + } t = s; @@ -510,14 +669,6 @@ TYPE2_FUNCATR vdouble2 XSINCOS(vdouble d) { o = vcast_vo64_vo32(veq_vo_vi_vi(vand_vi_vi_vi(vadd_vi_vi_vi(ql, vcast_vi_i(1)), vcast_vi_i(2)), vcast_vi_i(2))); r.y = vreinterpret_vd_vm(vxor_vm_vm_vm(vand_vm_vo64_vm(o, vreinterpret_vm_vd(vcast_vd_d(-0.0))), vreinterpret_vm_vd(r.y))); - - o = vgt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(TRIGRANGEMAX)); - r.x = vreinterpret_vd_vm(vandnot_vm_vo64_vm(o, vreinterpret_vm_vd(r.x))); - r.y = vsel_vd_vo_vd_vd(o, vcast_vd_d(1), r.y); - - o = visinf_vo_vd(d); - r.x = vreinterpret_vd_vm(vor_vm_vo64_vm(o, vreinterpret_vm_vd(r.x))); - r.y = vreinterpret_vd_vm(vor_vm_vo64_vm(o, vreinterpret_vm_vd(r.y))); return r; } @@ -528,12 +679,12 @@ TYPE2_FUNCATR vdouble2 XSINCOS_U1(vdouble d) { vdouble2 r, s, t, x; vint ql; - if (vtestallones_i_vo64(vlt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(TRIGRANGEMAX2)))) { + if (LIKELY(vtestallones_i_vo64(vlt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(TRIGRANGEMAX2))))) { const vdouble dql = vrint_vd_vd(vmul_vd_vd_vd(d, vcast_vd_d(2 * M_1_PI))); ql = vrint_vi_vd(dql); u = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_A2*0.5), d); s = ddadd_vd2_vd_vd (u, vmul_vd_vd_vd(dql, vcast_vd_d(-PI_B2*0.5))); - } else { + } else if (LIKELY(vtestallones_i_vo64(vlt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(TRIGRANGEMAX))))) { vdouble dqh = vtruncate_vd_vd(vmul_vd_vd_vd(d, vcast_vd_d(2*M_1_PI / (1 << 24)))); dqh = vmul_vd_vd_vd(dqh, vcast_vd_d(1 << 24)); const vdouble dql = vrint_vd_vd(vsub_vd_vd_vd(vmul_vd_vd_vd(d, vcast_vd_d(2*M_1_PI)), dqh)); @@ -546,6 +697,16 @@ TYPE2_FUNCATR vdouble2 XSINCOS_U1(vdouble d) { s = ddadd2_vd2_vd2_vd(s, vmul_vd_vd_vd(dqh, vcast_vd_d(-PI_C*0.5))); s = ddadd2_vd2_vd2_vd(s, vmul_vd_vd_vd(dql, vcast_vd_d(-PI_C*0.5))); s = ddadd_vd2_vd2_vd(s, vmul_vd_vd_vd(vadd_vd_vd_vd(dqh, dql), vcast_vd_d(-PI_D*0.5))); + } else { + ddi_t ddi = rempi(d); + ql = ddi.i; + s = ddi.dd; + o = vgt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(1e+299)); + s.x = vreinterpret_vd_vm(vandnot_vm_vo64_vm(o, vreinterpret_vm_vd(s.x))); + s.y = vreinterpret_vd_vm(vandnot_vm_vo64_vm(o, vreinterpret_vm_vd(s.y))); + o = visinf_vo_vd(d); + s.x = vreinterpret_vd_vm(vor_vm_vo64_vm(o, vreinterpret_vm_vd(s.x))); + s.y = vreinterpret_vd_vm(vor_vm_vo64_vm(o, vreinterpret_vm_vd(s.y))); } t = s; @@ -587,14 +748,6 @@ TYPE2_FUNCATR vdouble2 XSINCOS_U1(vdouble d) { o = vcast_vo64_vo32(veq_vo_vi_vi(vand_vi_vi_vi(vadd_vi_vi_vi(ql, vcast_vi_i(1)), vcast_vi_i(2)), vcast_vi_i(2))); r.y = vreinterpret_vd_vm(vxor_vm_vm_vm(vand_vm_vo64_vm(o, vreinterpret_vm_vd(vcast_vd_d(-0.0))), vreinterpret_vm_vd(r.y))); - o = vgt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(TRIGRANGEMAX)); - r.x = vreinterpret_vd_vm(vandnot_vm_vo64_vm(o, vreinterpret_vm_vd(r.x))); - r.y = vsel_vd_vo_vd_vd(o, vcast_vd_d(1), r.y); - - o = visinf_vo_vd(d); - r.x = vreinterpret_vd_vm(vor_vm_vo64_vm(o, vreinterpret_vm_vd(r.x))); - r.y = vreinterpret_vd_vm(vor_vm_vo64_vm(o, vreinterpret_vm_vd(r.y))); - return r; } @@ -875,19 +1028,35 @@ EXPORT CONST vdouble xcospi_u05(vdouble d) { EXPORT CONST vdouble xtan(vdouble d) { vdouble u, s, x; vopmask o; - vdouble dqh = vtruncate_vd_vd(vmul_vd_vd_vd(d, vcast_vd_d(2*M_1_PI / (1 << 24)))); - dqh = vmul_vd_vd_vd(dqh, vcast_vd_d(1 << 24)); - vdouble dql = vrint_vd_vd(vsub_vd_vd_vd(vmul_vd_vd_vd(d, vcast_vd_d(2*M_1_PI)), dqh)); - vint ql = vrint_vi_vd(dql); - - x = vmla_vd_vd_vd_vd(dqh, vcast_vd_d(-PI_A * 0.5), d); - x = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_A * 0.5), x); - x = vmla_vd_vd_vd_vd(dqh, vcast_vd_d(-PI_B * 0.5), x); - x = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_B * 0.5), x); - x = vmla_vd_vd_vd_vd(dqh, vcast_vd_d(-PI_C * 0.5), x); - x = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_C * 0.5), x); - x = vmla_vd_vd_vd_vd(vadd_vd_vd_vd(dqh, dql), vcast_vd_d(-PI_D * 0.5), x); - + vint ql; + + if (LIKELY(vtestallones_i_vo64(vlt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(TRIGRANGEMAX2))))) { + vdouble dql = vrint_vd_vd(vmul_vd_vd_vd(d, vcast_vd_d(2 * M_1_PI))); + ql = vrint_vi_vd(dql); + x = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_A2 * 0.5), d); + x = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_B2 * 0.5), x); + } else if (LIKELY(vtestallones_i_vo64(vlt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(1e+7))))) { + vdouble dqh = vtruncate_vd_vd(vmul_vd_vd_vd(d, vcast_vd_d(2*M_1_PI / (1 << 24)))); + dqh = vmul_vd_vd_vd(dqh, vcast_vd_d(1 << 24)); + vdouble dql = vrint_vd_vd(vsub_vd_vd_vd(vmul_vd_vd_vd(d, vcast_vd_d(2*M_1_PI)), dqh)); + ql = vrint_vi_vd(dql); + + x = vmla_vd_vd_vd_vd(dqh, vcast_vd_d(-PI_A * 0.5), d); + x = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_A * 0.5), x); + x = vmla_vd_vd_vd_vd(dqh, vcast_vd_d(-PI_B * 0.5), x); + x = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_B * 0.5), x); + x = vmla_vd_vd_vd_vd(dqh, vcast_vd_d(-PI_C * 0.5), x); + x = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_C * 0.5), x); + x = vmla_vd_vd_vd_vd(vadd_vd_vd_vd(dqh, dql), vcast_vd_d(-PI_D * 0.5), x); + x = vsel_vd_vo_vd_vd(visnegzero_vo_vd(d), d, x); + } else { + ddi_t ddi = rempi(d); + ql = ddi.i; + x = vadd_vd_vd_vd(ddi.dd.x, ddi.dd.y); + x = vreinterpret_vd_vm(vor_vm_vo64_vm(visinf_vo_vd(d), vreinterpret_vm_vd(x))); + x = vsel_vd_vo_vd_vd(visnegzero_vo_vd(d), d, x); + } + s = vmul_vd_vd_vd(x, x); o = vcast_vo64_vo32(veq_vo_vi_vi(vand_vi_vi_vi(ql, vcast_vi_i(1)), vcast_vi_i(1))); @@ -937,17 +1106,6 @@ EXPORT CONST vdouble xtan(vdouble d) { u = vmla_vd_vd_vd_vd(s, vmul_vd_vd_vd(u, x), x); u = vsel_vd_vo_vd_vd(o, vrec_vd_vd(u), u); - -#ifndef ENABLE_AVX512F - u = vreinterpret_vd_vm(vor_vm_vo64_vm(visinf_vo_vd(d), vreinterpret_vm_vd(u))); -#else - u = vfixup_vd_vd_vd_vi2_i(u, d, vcast_vi2_i((3 << (4*4)) | (3 << (5*4))), 0); -#endif - - u = vsel_vd_vo_vd_vd(vandnot_vo_vo_vo(visinf_vo_vd(d), - vor_vo_vo_vo(visnegzero_vo_vd(d), - vgt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(TRIGRANGEMAX)))), - vcast_vd_d(-0.0), u); return u; } @@ -958,12 +1116,12 @@ EXPORT CONST vdouble xtan_u1(vdouble d) { vopmask o; vint ql; - if (vtestallones_i_vo64(vlt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(TRIGRANGEMAX2)))) { + if (LIKELY(vtestallones_i_vo64(vlt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(TRIGRANGEMAX2))))) { vdouble dql = vrint_vd_vd(vmul_vd_vd_vd(d, vcast_vd_d(2 * M_1_PI))); ql = vrint_vi_vd(dql); u = vmla_vd_vd_vd_vd(dql, vcast_vd_d(-PI_A2*0.5), d); s = ddadd_vd2_vd_vd (u, vmul_vd_vd_vd(dql, vcast_vd_d(-PI_B2*0.5))); - } else { + } else if (LIKELY(vtestallones_i_vo64(vlt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(TRIGRANGEMAX))))) { vdouble dqh = vtruncate_vd_vd(vmul_vd_vd_vd(d, vcast_vd_d(2*M_1_PI / (1 << 24)))); dqh = vmul_vd_vd_vd(dqh, vcast_vd_d(1 << 24)); s = ddadd2_vd2_vd2_vd(ddmul_vd2_vd2_vd(vcast_vd2_d_d(M_2_PI_H, M_2_PI_L), d), @@ -979,6 +1137,13 @@ EXPORT CONST vdouble xtan_u1(vdouble d) { s = ddadd2_vd2_vd2_vd(s, vmul_vd_vd_vd(dqh, vcast_vd_d(-PI_C*0.5))); s = ddadd2_vd2_vd2_vd(s, vmul_vd_vd_vd(dql, vcast_vd_d(-PI_C*0.5 ))); s = ddadd_vd2_vd2_vd(s, vmul_vd_vd_vd(vadd_vd_vd_vd(dqh, dql), vcast_vd_d(-PI_D*0.5))); + } else { + ddi_t ddi = rempi(d); + ql = ddi.i; + s = ddi.dd; + o = visinf_vo_vd(d); + s.x = vreinterpret_vd_vm(vor_vm_vo64_vm(o, vreinterpret_vm_vd(s.x))); + s.y = vreinterpret_vd_vm(vor_vm_vo64_vm(o, vreinterpret_vm_vd(s.y))); } o = vcast_vo64_vo32(veq_vo_vi_vi(vand_vi_vi_vi(ql, vcast_vi_i(1)), vcast_vi_i(1))); @@ -1033,10 +1198,7 @@ EXPORT CONST vdouble xtan_u1(vdouble d) { u = vadd_vd_vd_vd(x.x, x.y); - u = vsel_vd_vo_vd_vd(vandnot_vo_vo_vo(visinf_vo_vd(d), - vor_vo_vo_vo(visnegzero_vo_vd(d), - vgt_vo_vd_vd(vabs_vd_vd(d), vcast_vd_d(TRIGRANGEMAX)))), - vcast_vd_d(-0.0), u); + u = vsel_vd_vo_vd_vd(visnegzero_vo_vd(d), d, u); return u; } diff --git a/src/libm/sleefsimdsp.c b/src/libm/sleefsimdsp.c index bc0c91bc..466b018b 100644 --- a/src/libm/sleefsimdsp.c +++ b/src/libm/sleefsimdsp.c @@ -1,4 +1,4 @@ -// Copyright Naoki Shibata 2010 - 2017. +// Copyright Naoki Shibata 2010 - 2018. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -12,6 +12,8 @@ #include "misc.h" +extern const float rempitabsp[]; + #define __SLEEFSIMDSP_C__ #if (defined(_MSC_VER)) @@ -256,17 +258,113 @@ static INLINE CONST vfloat vldexp3_vf_vf_vi2(vfloat d, vint2 q) { EXPORT CONST vfloat xldexpf(vfloat x, vint2 q) { return vldexp_vf_vf_vi2(x, q); } +#ifdef ENABLE_SVE +typedef __sizeless_struct { + vfloat d; + vint2 i; +} fi_t; + +typedef __sizeless_struct { + vfloat2 df; + vint2 i; +} dfi_t; +#else +typedef struct { + vfloat d; + vint2 i; +} fi_t; + +typedef struct { + vfloat2 df; + vint2 i; +} dfi_t; +#endif + +static INLINE CONST fi_t rempisubf(vfloat x) { +#ifdef FULL_FP_ROUNDING + vfloat y = vrint_vf_vf(vmul_vf_vf_vf(x, vcast_vf_f(4))); + vint2 vi = vtruncate_vi2_vf(vsub_vf_vf_vf(y, vmul_vf_vf_vf(vrint_vf_vf(x), vcast_vf_f(4)))); + fi_t ret = { vsub_vf_vf_vf(x, vmul_vf_vf_vf(y, vcast_vf_f(0.25))), vi }; +#else + vfloat fr = vsub_vf_vf_vf(x, vmul_vf_vf_vf(vcast_vf_f(1LL << 10), vtruncate_vf_vf(vmul_vf_vf_vf(x, vcast_vf_f(1.0 / (1LL << 10)))))); + vint2 vi = vadd_vi2_vi2_vi2(vsel_vi2_vo_vi2_vi2(vgt_vo_vf_vf(x, vcast_vf_f(0)), vcast_vi2_i(4), vcast_vi2_i(3)), vtruncate_vi2_vf(vmul_vf_vf_vf(fr, vcast_vf_f(8)))); + vi = vsra_vi2_vi2_i(vsub_vi2_vi2_vi2(vand_vi2_vi2_vi2(vcast_vi2_i(7), vi), vcast_vi2_i(3)), 1); + fr = vsub_vf_vf_vf(fr, vmul_vf_vf_vf(vcast_vf_f(0.25), vtruncate_vf_vf(vmla_vf_vf_vf_vf(fr, vcast_vf_f(4), vmulsign_vf_vf_vf(vcast_vf_f(0.5), x))))); + fr = vsel_vf_vo_vf_vf(vgt_vo_vf_vf(vabs_vf_vf(fr), vcast_vf_f(0.25)), vsub_vf_vf_vf(fr, vmulsign_vf_vf_vf(vcast_vf_f(0.5), x)), fr); + fr = vsel_vf_vo_vf_vf(vgt_vo_vf_vf(vabs_vf_vf(fr), vcast_vf_f(1e+10)), vcast_vf_f(0), fr); + vopmask o = veq_vo_vf_vf(vabs_vf_vf(x), vcast_vf_f(0.12499999254941940308f)); + fr = vsel_vf_vo_vf_vf(o, x, fr); + vi = vsel_vi2_vo_vi2_vi2(o, vcast_vi2_i(0), vi); + fi_t ret = { fr, vi }; +#endif + return ret; +} + +static INLINE CONST dfi_t rempif(vfloat a) { + vfloat2 x, y, z; + vint2 ex = vilogb2k_vi2_vf(a), q; +#ifdef ENABLE_AVX512F + ex = vandnot_vi2_vi2_vi2(vsra_vi2_vi2_i(ex, 31), ex); + ex = vand_vi2_vi2_vi2(ex, vcast_vi2_i(127)); +#endif + ex = vsub_vi2_vi2_vi2(ex, vcast_vi2_i(25)); + ex = vandnot_vi2_vi2_vi2(vsra_vi2_vi2_i(ex, 31), ex); + ex = vadd_vi2_vi2_vi2(ex, ex); + ex = vadd_vi2_vi2_vi2(ex, ex); + x = dfmul_vf2_vf_vf(a, vgather_vf_p_vi2(rempitabsp, ex)); + fi_t di = rempisubf(x.x); + q = di.i; + x.x = di.d; + x = dfnormalize_vf2_vf2(x); + y = dfmul_vf2_vf_vf(a, vgather_vf_p_vi2(rempitabsp+1, ex)); + x = dfadd2_vf2_vf2_vf2(x, y); + di = rempisubf(x.x); + q = vadd_vi2_vi2_vi2(q, di.i); + x.x = di.d; + x = dfnormalize_vf2_vf2(x); + y = vcast_vf2_vf_vf(vgather_vf_p_vi2(rempitabsp+2, ex), vgather_vf_p_vi2(rempitabsp+3, ex)); + y = dfmul_vf2_vf2_vf(y, a); + x = dfadd2_vf2_vf2_vf2(x, y); + x = dfnormalize_vf2_vf2(x); + x = dfmul_vf2_vf2_vf2(x, vcast_vf2_f_f(3.1415927410125732422f*2, -8.7422776573475857731e-08f*2)); + x = vsel_vf2_vo_vf2_vf2(vlt_vo_vf_vf(vabs_vf_vf(a), vcast_vf_f(0.7)), vcast_vf2_vf_vf(a, vcast_vf_f(0)), x); + dfi_t ret = { x, q }; + return ret; +} + EXPORT CONST vfloat xsinf(vfloat d) { vint2 q; vfloat u, s, r = d; - q = vrint_vi2_vf(vmul_vf_vf_vf(d, vcast_vf_f((float)M_1_PI))); - u = vcast_vf_vi2(q); - - d = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Af), d); - d = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Bf), d); - d = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Cf), d); - d = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Df), d); + if (LIKELY(vtestallones_i_vo32(vlt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(TRIGRANGEMAX2f))))) { + q = vrint_vi2_vf(vmul_vf_vf_vf(d, vcast_vf_f((float)M_1_PI))); + u = vcast_vf_vi2(q); + d = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_A2f), d); + d = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_B2f), d); + d = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_C2f), d); + } else if (LIKELY(vtestallones_i_vo32(vlt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(TRIGRANGEMAXf))))) { + q = vrint_vi2_vf(vmul_vf_vf_vf(d, vcast_vf_f((float)M_1_PI))); + u = vcast_vf_vi2(q); + d = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Af), d); + d = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Bf), d); + d = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Cf), d); + d = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Df), d); + } else { + dfi_t dfi = rempif(d); + q = vand_vi2_vi2_vi2(dfi.i, vcast_vi2_i(3)); + q = vadd_vi2_vi2_vi2(vadd_vi2_vi2_vi2(q, q), vsel_vi2_vo_vi2_vi2(vgt_vo_vf_vf(dfi.df.x, vcast_vf_f(0)), vcast_vi2_i(2), vcast_vi2_i(1))); + q = vsra_vi2_vi2_i(q, 2); + vopmask o = veq_vo_vi2_vi2(vand_vi2_vi2_vi2(dfi.i, vcast_vi2_i(1)), vcast_vi2_i(1)); + vfloat2 x = vcast_vf2_vf_vf(vmulsign_vf_vf_vf(vcast_vf_f(3.1415927410125732422f*-0.5), dfi.df.x), + vmulsign_vf_vf_vf(vcast_vf_f(-8.7422776573475857731e-08f*-0.5), dfi.df.x)); + x = dfadd2_vf2_vf2_vf2(dfi.df, x); + dfi.df = vsel_vf2_vo_vf2_vf2(o, x, dfi.df); + d = vadd_vf_vf_vf(dfi.df.x, dfi.df.y); + + d = vsel_vf_vo_vf_vf(vandnot_vo_vo_vo(visinf_vo_vf(r), + vgt_vo_vf_vf(vabs_vf_vf(r), vcast_vf_f(1e+28f))), + vcast_vf_f(0), d); + } s = vmul_vf_vf_vf(d, d); @@ -279,11 +377,7 @@ EXPORT CONST vfloat xsinf(vfloat d) { u = vadd_vf_vf_vf(vmul_vf_vf_vf(s, vmul_vf_vf_vf(u, d)), d); - u = vsel_vf_vo_vf_vf(vor_vo_vo_vo(visnegzero_vo_vf(r), - vgt_vo_vf_vf(vabs_vf_vf(r), vcast_vf_f(TRIGRANGEMAXf))), - vcast_vf_f(-0.0), u); - - u = vreinterpret_vf_vm(vor_vm_vo32_vm(visinf_vo_vf(d), vreinterpret_vm_vf(u))); + u = vsel_vf_vo_vf_vf(visnegzero_vo_vf(r), r, u); return u; } @@ -292,14 +386,40 @@ EXPORT CONST vfloat xcosf(vfloat d) { vint2 q; vfloat u, s, r = d; - q = vrint_vi2_vf(vsub_vf_vf_vf(vmul_vf_vf_vf(d, vcast_vf_f((float)M_1_PI)), vcast_vf_f(0.5f))); - q = vadd_vi2_vi2_vi2(vadd_vi2_vi2_vi2(q, q), vcast_vi2_i(1)); - - u = vcast_vf_vi2(q); - d = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Af*0.5f), d); - d = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Bf*0.5f), d); - d = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Cf*0.5f), d); - d = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Df*0.5f), d); + if (LIKELY(vtestallones_i_vo32(vlt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(TRIGRANGEMAX2f))))) { + q = vrint_vi2_vf(vsub_vf_vf_vf(vmul_vf_vf_vf(d, vcast_vf_f((float)M_1_PI)), vcast_vf_f(0.5f))); + q = vadd_vi2_vi2_vi2(vadd_vi2_vi2_vi2(q, q), vcast_vi2_i(1)); + + u = vcast_vf_vi2(q); + d = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_A2f*0.5f), d); + d = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_B2f*0.5f), d); + d = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_C2f*0.5f), d); + } else if (LIKELY(vtestallones_i_vo32(vlt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(TRIGRANGEMAXf))))) { + q = vrint_vi2_vf(vsub_vf_vf_vf(vmul_vf_vf_vf(d, vcast_vf_f((float)M_1_PI)), vcast_vf_f(0.5f))); + q = vadd_vi2_vi2_vi2(vadd_vi2_vi2_vi2(q, q), vcast_vi2_i(1)); + + u = vcast_vf_vi2(q); + d = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Af*0.5f), d); + d = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Bf*0.5f), d); + d = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Cf*0.5f), d); + d = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Df*0.5f), d); + } else { + dfi_t dfi = rempif(d); + q = vand_vi2_vi2_vi2(dfi.i, vcast_vi2_i(3)); + q = vadd_vi2_vi2_vi2(vadd_vi2_vi2_vi2(q, q), vsel_vi2_vo_vi2_vi2(vgt_vo_vf_vf(dfi.df.x, vcast_vf_f(0)), vcast_vi2_i(8), vcast_vi2_i(7))); + q = vsra_vi2_vi2_i(q, 1); + vopmask o = veq_vo_vi2_vi2(vand_vi2_vi2_vi2(dfi.i, vcast_vi2_i(1)), vcast_vi2_i(0)); + vfloat y = vsel_vf_vo_vf_vf(vgt_vo_vf_vf(dfi.df.x, vcast_vf_f(0)), vcast_vf_f(0), vcast_vf_f(-1)); + vfloat2 x = vcast_vf2_vf_vf(vmulsign_vf_vf_vf(vcast_vf_f(3.1415927410125732422f*-0.5), y), + vmulsign_vf_vf_vf(vcast_vf_f(-8.7422776573475857731e-08f*-0.5), y)); + x = dfadd2_vf2_vf2_vf2(dfi.df, x); + dfi.df = vsel_vf2_vo_vf2_vf2(o, x, dfi.df); + d = vadd_vf_vf_vf(dfi.df.x, dfi.df.y); + + d = vsel_vf_vo_vf_vf(vandnot_vo_vo_vo(visinf_vo_vf(r), + vgt_vo_vf_vf(vabs_vf_vf(r), vcast_vf_f(1e+28f))), + vcast_vf_f(0), d); + } s = vmul_vf_vf_vf(d, d); @@ -312,11 +432,6 @@ EXPORT CONST vfloat xcosf(vfloat d) { u = vadd_vf_vf_vf(vmul_vf_vf_vf(s, vmul_vf_vf_vf(u, d)), d); - u = vreinterpret_vf_vm(vandnot_vm_vo32_vm(vgt_vo_vf_vf(vabs_vf_vf(r), vcast_vf_f(TRIGRANGEMAXf)), - vreinterpret_vm_vf(u))); - - u = vreinterpret_vf_vm(vor_vm_vo32_vm(visinf_vo_vf(d), vreinterpret_vm_vf(u))); - return u; } @@ -325,15 +440,28 @@ EXPORT CONST vfloat xtanf(vfloat d) { vopmask o; vfloat u, s, x; - q = vrint_vi2_vf(vmul_vf_vf_vf(d, vcast_vf_f((float)(2 * M_1_PI)))); - x = d; - u = vcast_vf_vi2(q); - x = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Af*0.5f), x); - x = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Bf*0.5f), x); - x = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Cf*0.5f), x); - x = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Df*0.5f), x); + if (LIKELY(vtestallones_i_vo32(vlt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(TRIGRANGEMAX2f))))) { + q = vrint_vi2_vf(vmul_vf_vf_vf(d, vcast_vf_f((float)(2 * M_1_PI)))); + u = vcast_vf_vi2(q); + x = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_A2f*0.5f), x); + x = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_B2f*0.5f), x); + x = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_C2f*0.5f), x); + } else if (LIKELY(vtestallones_i_vo32(vlt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(TRIGRANGEMAXf))))) { + q = vrint_vi2_vf(vmul_vf_vf_vf(d, vcast_vf_f((float)(2 * M_1_PI)))); + u = vcast_vf_vi2(q); + x = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Af*0.5f), x); + x = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Bf*0.5f), x); + x = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Cf*0.5f), x); + x = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Df*0.5f), x); + } else { + dfi_t dfi = rempif(d); + q = dfi.i; + x = vadd_vf_vf_vf(dfi.df.x, dfi.df.y); + x = vreinterpret_vf_vm(vor_vm_vo32_vm(visinf_vo_vf(d), vreinterpret_vm_vf(x))); + x = vsel_vf_vo_vf_vf(visnegzero_vo_vf(d), d, x); + } s = vmul_vf_vf_vf(x, x); @@ -350,13 +478,7 @@ EXPORT CONST vfloat xtanf(vfloat d) { u = vmla_vf_vf_vf_vf(s, vmul_vf_vf_vf(u, x), x); u = vsel_vf_vo_vf_vf(o, vrec_vf_vf(u), u); - -#ifndef ENABLE_AVX512F - u = vreinterpret_vf_vm(vor_vm_vo32_vm(visinf_vo_vf(d), vreinterpret_vm_vf(u))); -#else - u = vfixup_vf_vf_vf_vi2_i(u, d, vcast_vi2_i((3 << (4*4)) | (3 << (5*4))), 0); -#endif - + return u; } @@ -365,30 +487,26 @@ EXPORT CONST vfloat xsinf_u1(vfloat d) { vfloat u, v; vfloat2 s, t, x; - if (vtestallones_i_vo32(vlt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(TRIGRANGEMAX2f)))) { + if (LIKELY(vtestallones_i_vo32(vlt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(TRIGRANGEMAX2f))))) { u = vrint_vf_vf(vmul_vf_vf_vf(d, vcast_vf_f(M_1_PI))); q = vrint_vi2_vf(u); v = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_A2f), d); s = dfadd2_vf2_vf_vf(v, vmul_vf_vf_vf(u, vcast_vf_f(-PI_B2f))); s = dfadd_vf2_vf2_vf(s, vmul_vf_vf_vf(u, vcast_vf_f(-PI_C2f))); } else { - vfloat2 dfq = dfmul_vf2_vf2_vf(vcast_vf2_f_f(M_1_PI, M_1_PI - (float)M_1_PI), d); - vfloat t = vrint_vf_vf(vmul_vf_vf_vf(dfq.x, vcast_vf_f(1.0f / (1 << 16)))); - dfq.y = vrint_vf_vf(vadd_vf_vf_vf(vmla_vf_vf_vf_vf(t, vcast_vf_f(-(1 << 16)), dfq.x), dfq.y)); - q = vrint_vi2_vf(dfq.y); - dfq.x = vmul_vf_vf_vf(t, vcast_vf_f(1 << 16)); - dfq = dfnormalize_vf2_vf2(dfq); - - s = dfadd2_vf2_vf_vf2 (d, dfmul_vf2_vf2_vf(dfq, vcast_vf_f(-PI_A3f))); - s = dfnormalize_vf2_vf2(s); - s = dfadd2_vf2_vf2_vf2(s, dfmul_vf2_vf2_vf(dfq, vcast_vf_f(-PI_B3f))); - s = dfnormalize_vf2_vf2(s); - s = dfadd2_vf2_vf2_vf2(s, dfmul_vf2_vf2_vf(dfq, vcast_vf_f(-PI_C3f))); - s = dfnormalize_vf2_vf2(s); - s = dfadd2_vf2_vf2_vf2(s, dfmul_vf2_vf2_vf(dfq, vcast_vf_f(-PI_D3f))); - s = dfnormalize_vf2_vf2(s); - s = dfadd2_vf2_vf2_vf2(s, dfmul_vf2_vf2_vf(dfq, vcast_vf_f(-PI_E3f))); - s = dfnormalize_vf2_vf2(s); + dfi_t dfi = rempif(d); + q = vand_vi2_vi2_vi2(dfi.i, vcast_vi2_i(3)); + q = vadd_vi2_vi2_vi2(vadd_vi2_vi2_vi2(q, q), vsel_vi2_vo_vi2_vi2(vgt_vo_vf_vf(dfi.df.x, vcast_vf_f(0)), vcast_vi2_i(2), vcast_vi2_i(1))); + q = vsra_vi2_vi2_i(q, 2); + vopmask o = veq_vo_vi2_vi2(vand_vi2_vi2_vi2(dfi.i, vcast_vi2_i(1)), vcast_vi2_i(1)); + vfloat2 x = vcast_vf2_vf_vf(vmulsign_vf_vf_vf(vcast_vf_f(3.1415927410125732422f*-0.5), dfi.df.x), + vmulsign_vf_vf_vf(vcast_vf_f(-8.7422776573475857731e-08f*-0.5), dfi.df.x)); + x = dfadd2_vf2_vf2_vf2(dfi.df, x); + dfi.df = vsel_vf2_vo_vf2_vf2(o, x, dfi.df); + s = dfnormalize_vf2_vf2(dfi.df); + + s = vsel_vf2_vo_vf2_vf2(vandnot_vo_vo_vo(visinf_vo_vf(d), vgt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(1e+28f))), + vcast_vf2_f_f(0, 0), s); } t = s; @@ -403,9 +521,8 @@ EXPORT CONST vfloat xsinf_u1(vfloat d) { u = dfmul_vf_vf2_vf2(t, x); u = vreinterpret_vf_vm(vxor_vm_vm_vm(vand_vm_vo32_vm(veq_vo_vi2_vi2(vand_vi2_vi2_vi2(q, vcast_vi2_i(1)), vcast_vi2_i(1)), vreinterpret_vm_vf(vcast_vf_f(-0.0))), vreinterpret_vm_vf(u))); - u = vsel_vf_vo_vf_vf(vandnot_vo_vo_vo(visinf_vo_vf(d), vor_vo_vo_vo(visnegzero_vo_vf(d), - vgt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(TRIGRANGEMAX3f)))), - vcast_vf_f(-0.0), u); + + u = vsel_vf_vo_vf_vf(visnegzero_vo_vf(d), d, u); return u; } @@ -415,7 +532,7 @@ EXPORT CONST vfloat xcosf_u1(vfloat d) { vfloat u; vfloat2 s, t, x; - if (vtestallones_i_vo32(vlt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(TRIGRANGEMAX2f)))) { + if (LIKELY(vtestallones_i_vo32(vlt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(TRIGRANGEMAX2f))))) { vfloat dq = vmla_vf_vf_vf_vf(vrint_vf_vf(vmla_vf_vf_vf_vf(d, vcast_vf_f(M_1_PI), vcast_vf_f(-0.5f))), vcast_vf_f(2), vcast_vf_f(1)); q = vrint_vi2_vf(dq); @@ -423,24 +540,20 @@ EXPORT CONST vfloat xcosf_u1(vfloat d) { s = dfadd2_vf2_vf2_vf(s, vmul_vf_vf_vf(dq, vcast_vf_f(-PI_B2f*0.5f))); s = dfadd2_vf2_vf2_vf(s, vmul_vf_vf_vf(dq, vcast_vf_f(-PI_C2f*0.5f))); } else { - vfloat2 dfq = dfadd2_vf2_vf2_vf(dfmul_vf2_vf2_vf(vcast_vf2_f_f(M_1_PI, M_1_PI - (float)M_1_PI), d), vcast_vf_f(-0.5f)); - vfloat t = vrint_vf_vf(vmul_vf_vf_vf(dfq.x, vcast_vf_f(1.0f / (1 << 16)))); - dfq.y = vmla_vf_vf_vf_vf(vrint_vf_vf(vadd_vf_vf_vf(vmla_vf_vf_vf_vf(t, vcast_vf_f(-(1 << 16)), dfq.x), dfq.y)), - vcast_vf_f(2), vcast_vf_f(1)); - q = vrint_vi2_vf(dfq.y); - dfq.x = vmul_vf_vf_vf(t, vcast_vf_f(1 << 17)); - dfq = dfnormalize_vf2_vf2(dfq); - - s = dfadd2_vf2_vf_vf2 (d, dfmul_vf2_vf2_vf(dfq, vcast_vf_f(-PI_A3f*0.5f))); - s = dfnormalize_vf2_vf2(s); - s = dfadd2_vf2_vf2_vf2(s, dfmul_vf2_vf2_vf(dfq, vcast_vf_f(-PI_B3f*0.5f))); - s = dfnormalize_vf2_vf2(s); - s = dfadd2_vf2_vf2_vf2(s, dfmul_vf2_vf2_vf(dfq, vcast_vf_f(-PI_C3f*0.5f))); - s = dfnormalize_vf2_vf2(s); - s = dfadd2_vf2_vf2_vf2(s, dfmul_vf2_vf2_vf(dfq, vcast_vf_f(-PI_D3f*0.5f))); - s = dfnormalize_vf2_vf2(s); - s = dfadd2_vf2_vf2_vf2(s, dfmul_vf2_vf2_vf(dfq, vcast_vf_f(-PI_E3f*0.5f))); - s = dfnormalize_vf2_vf2(s); + dfi_t dfi = rempif(d); + q = vand_vi2_vi2_vi2(dfi.i, vcast_vi2_i(3)); + q = vadd_vi2_vi2_vi2(vadd_vi2_vi2_vi2(q, q), vsel_vi2_vo_vi2_vi2(vgt_vo_vf_vf(dfi.df.x, vcast_vf_f(0)), vcast_vi2_i(8), vcast_vi2_i(7))); + q = vsra_vi2_vi2_i(q, 1); + vopmask o = veq_vo_vi2_vi2(vand_vi2_vi2_vi2(dfi.i, vcast_vi2_i(1)), vcast_vi2_i(0)); + vfloat y = vsel_vf_vo_vf_vf(vgt_vo_vf_vf(dfi.df.x, vcast_vf_f(0)), vcast_vf_f(0), vcast_vf_f(-1)); + vfloat2 x = vcast_vf2_vf_vf(vmulsign_vf_vf_vf(vcast_vf_f(3.1415927410125732422f*-0.5), y), + vmulsign_vf_vf_vf(vcast_vf_f(-8.7422776573475857731e-08f*-0.5), y)); + x = dfadd2_vf2_vf2_vf2(dfi.df, x); + dfi.df = vsel_vf2_vo_vf2_vf2(o, x, dfi.df); + s = dfnormalize_vf2_vf2(dfi.df); + + s = vsel_vf2_vo_vf2_vf2(vandnot_vo_vo_vo(visinf_vo_vf(d), vgt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(1e+28f))), + vcast_vf2_f_f(0, 0), s); } t = s; @@ -455,9 +568,6 @@ EXPORT CONST vfloat xcosf_u1(vfloat d) { u = dfmul_vf_vf2_vf2(t, x); u = vreinterpret_vf_vm(vxor_vm_vm_vm(vand_vm_vo32_vm(veq_vo_vi2_vi2(vand_vi2_vi2_vi2(q, vcast_vi2_i(2)), vcast_vi2_i(0)), vreinterpret_vm_vf(vcast_vf_f(-0.0))), vreinterpret_vm_vf(u))); - - u = vreinterpret_vf_vm(vandnot_vm_vo32_vm(vandnot_vo_vo_vo(visinf_vo_vf(d), vgt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(TRIGRANGEMAX3f))), - vreinterpret_vm_vf(u))); return u; } @@ -488,15 +598,28 @@ TYPE2_FUNCATR vfloat2 XSINCOSF(vfloat d) { vfloat u, s, t, rx, ry; vfloat2 r; - q = vrint_vi2_vf(vmul_vf_vf_vf(d, vcast_vf_f((float)M_2_PI))); - s = d; - u = vcast_vf_vi2(q); - s = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Af*0.5f), s); - s = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Bf*0.5f), s); - s = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Cf*0.5f), s); - s = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Df*0.5f), s); + if (LIKELY(vtestallones_i_vo32(vlt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(TRIGRANGEMAX2f))))) { + q = vrint_vi2_vf(vmul_vf_vf_vf(d, vcast_vf_f((float)M_2_PI))); + u = vcast_vf_vi2(q); + s = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_A2f*0.5f), s); + s = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_B2f*0.5f), s); + s = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_C2f*0.5f), s); + } else if (LIKELY(vtestallones_i_vo32(vlt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(TRIGRANGEMAXf))))) { + q = vrint_vi2_vf(vmul_vf_vf_vf(d, vcast_vf_f((float)M_2_PI))); + u = vcast_vf_vi2(q); + s = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Af*0.5f), s); + s = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Bf*0.5f), s); + s = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Cf*0.5f), s); + s = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_Df*0.5f), s); + } else { + dfi_t dfi = rempif(d); + q = dfi.i; + s = vadd_vf_vf_vf(dfi.df.x, dfi.df.y); + s = vreinterpret_vf_vm(vandnot_vm_vo32_vm(vgt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(1e+28f)), vreinterpret_vm_vf(s))); + s = vreinterpret_vf_vm(vor_vm_vo32_vm(visinf_vo_vf(d), vreinterpret_vm_vf(s))); + } t = s; @@ -527,14 +650,6 @@ TYPE2_FUNCATR vfloat2 XSINCOSF(vfloat d) { o = veq_vo_vi2_vi2(vand_vi2_vi2_vi2(vadd_vi2_vi2_vi2(q, vcast_vi2_i(1)), vcast_vi2_i(2)), vcast_vi2_i(2)); r.y = vreinterpret_vf_vm(vxor_vm_vm_vm(vand_vm_vo32_vm(o, vreinterpret_vm_vf(vcast_vf_f(-0.0))), vreinterpret_vm_vf(r.y))); - o = vgt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(TRIGRANGEMAXf)); - r.x = vreinterpret_vf_vm(vandnot_vm_vo32_vm(o, vreinterpret_vm_vf(r.x))); - r.y = vreinterpret_vf_vm(vandnot_vm_vo32_vm(o, vreinterpret_vm_vf(r.y))); - - o = visinf_vo_vf(d); - r.x = vreinterpret_vf_vm(vor_vm_vo32_vm(o, vreinterpret_vm_vf(r.x))); - r.y = vreinterpret_vf_vm(vor_vm_vo32_vm(o, vreinterpret_vm_vf(r.y))); - return r; } @@ -544,30 +659,22 @@ TYPE2_FUNCATR vfloat2 XSINCOSF_U1(vfloat d) { vfloat u, v, rx, ry; vfloat2 r, s, t, x; - if (vtestallones_i_vo32(vlt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(TRIGRANGEMAX2f)))) { + if (LIKELY(vtestallones_i_vo32(vlt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(TRIGRANGEMAX2f))))) { u = vrint_vf_vf(vmul_vf_vf_vf(d, vcast_vf_f(2 * M_1_PI))); q = vrint_vi2_vf(u); v = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_A2f*0.5f), d); s = dfadd2_vf2_vf_vf(v, vmul_vf_vf_vf(u, vcast_vf_f(-PI_B2f*0.5f))); s = dfadd_vf2_vf2_vf(s, vmul_vf_vf_vf(u, vcast_vf_f(-PI_C2f*0.5f))); } else { - vfloat2 dfq = dfmul_vf2_vf2_vf(vcast_vf2_f_f(2*M_1_PI, 2*M_1_PI - (float)(2*M_1_PI)), d); - vfloat t = vrint_vf_vf(vmul_vf_vf_vf(dfq.x, vcast_vf_f(1.0f / (1 << 16)))); - dfq.y = vrint_vf_vf(vadd_vf_vf_vf(vmla_vf_vf_vf_vf(t, vcast_vf_f(-(1 << 16)), dfq.x), dfq.y)); - q = vrint_vi2_vf(dfq.y); - dfq.x = vmul_vf_vf_vf(t, vcast_vf_f(1 << 16)); - dfq = dfnormalize_vf2_vf2(dfq); - - s = dfadd2_vf2_vf_vf2 (d, dfmul_vf2_vf2_vf(dfq, vcast_vf_f(-PI_A3f*0.5f))); - s = dfnormalize_vf2_vf2(s); - s = dfadd2_vf2_vf2_vf2(s, dfmul_vf2_vf2_vf(dfq, vcast_vf_f(-PI_B3f*0.5f))); - s = dfnormalize_vf2_vf2(s); - s = dfadd2_vf2_vf2_vf2(s, dfmul_vf2_vf2_vf(dfq, vcast_vf_f(-PI_C3f*0.5f))); - s = dfnormalize_vf2_vf2(s); - s = dfadd2_vf2_vf2_vf2(s, dfmul_vf2_vf2_vf(dfq, vcast_vf_f(-PI_D3f*0.5f))); - s = dfnormalize_vf2_vf2(s); - s = dfadd2_vf2_vf2_vf2(s, dfmul_vf2_vf2_vf(dfq, vcast_vf_f(-PI_E3f*0.5f))); - s = dfnormalize_vf2_vf2(s); + dfi_t dfi = rempif(d); + q = dfi.i; + s = dfi.df; + o = vgt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(1e+28f)); + s.x = vreinterpret_vf_vm(vandnot_vm_vo32_vm(o, vreinterpret_vm_vf(s.x))); + s.y = vreinterpret_vf_vm(vandnot_vm_vo32_vm(o, vreinterpret_vm_vf(s.y))); + o = visinf_vo_vf(d); + s.x = vreinterpret_vf_vm(vor_vm_vo32_vm(o, vreinterpret_vm_vf(s.x))); + s.y = vreinterpret_vf_vm(vor_vm_vo32_vm(o, vreinterpret_vm_vf(s.y))); } t = s; @@ -604,14 +711,6 @@ TYPE2_FUNCATR vfloat2 XSINCOSF_U1(vfloat d) { o = veq_vo_vi2_vi2(vand_vi2_vi2_vi2(vadd_vi2_vi2_vi2(q, vcast_vi2_i(1)), vcast_vi2_i(2)), vcast_vi2_i(2)); r.y = vreinterpret_vf_vm(vxor_vm_vm_vm(vand_vm_vo32_vm(o, vreinterpret_vm_vf(vcast_vf_f(-0.0))), vreinterpret_vm_vf(r.y))); - o = vgt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(TRIGRANGEMAX3f)); - r.x = vreinterpret_vf_vm(vandnot_vm_vo32_vm(o, vreinterpret_vm_vf(r.x))); - r.y = vreinterpret_vf_vm(vandnot_vm_vo32_vm(o, vreinterpret_vm_vf(r.y))); - - o = visinf_vo_vf(d); - r.x = vreinterpret_vf_vm(vor_vm_vo32_vm(o, vreinterpret_vm_vf(r.x))); - r.y = vreinterpret_vf_vm(vor_vm_vo32_vm(o, vreinterpret_vm_vf(r.y))); - return r; } @@ -665,7 +764,7 @@ TYPE2_FUNCATR vfloat2 XSINCOSPIF_U05(vfloat d) { o = veq_vo_vi2_vi2(vand_vi2_vi2_vi2(vadd_vi2_vi2_vi2(q, vcast_vi2_i(2)), vcast_vi2_i(4)), vcast_vi2_i(4)); r.y = vreinterpret_vf_vm(vxor_vm_vm_vm(vand_vm_vo32_vm(o, vreinterpret_vm_vf(vcast_vf_f(-0.0))), vreinterpret_vm_vf(r.y))); - o = vgt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(TRIGRANGEMAXf)); + o = vgt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(1e+7f)); r.x = vreinterpret_vf_vm(vandnot_vm_vo32_vm(o, vreinterpret_vm_vf(r.x))); r.y = vreinterpret_vf_vm(vandnot_vm_vo32_vm(o, vreinterpret_vm_vf(r.y))); @@ -720,7 +819,7 @@ TYPE2_FUNCATR vfloat2 XSINCOSPIF_U35(vfloat d) { o = veq_vo_vi2_vi2(vand_vi2_vi2_vi2(vadd_vi2_vi2_vi2(q, vcast_vi2_i(2)), vcast_vi2_i(4)), vcast_vi2_i(4)); r.y = vreinterpret_vf_vm(vxor_vm_vm_vm(vand_vm_vo32_vm(o, vreinterpret_vm_vf(vcast_vf_f(-0.0))), vreinterpret_vm_vf(r.y))); - o = vgt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(TRIGRANGEMAXf)); + o = vgt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(1e+7f)); r.x = vreinterpret_vf_vm(vandnot_vm_vo32_vm(o, vreinterpret_vm_vf(r.x))); r.y = vreinterpret_vf_vm(vandnot_vm_vo32_vm(o, vreinterpret_vm_vf(r.y))); @@ -781,30 +880,19 @@ EXPORT CONST vfloat xtanf_u1(vfloat d) { vfloat2 s, t, x; vopmask o; - if (vtestallones_i_vo32(vlt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(TRIGRANGEMAX2f)))) { + if (LIKELY(vtestallones_i_vo32(vlt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(TRIGRANGEMAX2f))))) { u = vrint_vf_vf(vmul_vf_vf_vf(d, vcast_vf_f(2 * M_1_PI))); q = vrint_vi2_vf(u); v = vmla_vf_vf_vf_vf(u, vcast_vf_f(-PI_A2f*0.5f), d); s = dfadd2_vf2_vf_vf(v, vmul_vf_vf_vf(u, vcast_vf_f(-PI_B2f*0.5f))); s = dfadd_vf2_vf2_vf(s, vmul_vf_vf_vf(u, vcast_vf_f(-PI_C2f*0.5f))); } else { - vfloat2 dfq = dfmul_vf2_vf2_vf(vcast_vf2_f_f(2*M_1_PI, 2*M_1_PI - (float)(2*M_1_PI)), d); - vfloat t = vrint_vf_vf(vmul_vf_vf_vf(dfq.x, vcast_vf_f(1.0f / (1 << 16)))); - dfq.y = vrint_vf_vf(vadd_vf_vf_vf(vmla_vf_vf_vf_vf(t, vcast_vf_f(-(1 << 16)), dfq.x), dfq.y)); - q = vrint_vi2_vf(dfq.y); - dfq.x = vmul_vf_vf_vf(t, vcast_vf_f(1 << 16)); - dfq = dfnormalize_vf2_vf2(dfq); - - s = dfadd2_vf2_vf_vf2 (d, dfmul_vf2_vf2_vf(dfq, vcast_vf_f(-PI_A3f*0.5f))); - s = dfnormalize_vf2_vf2(s); - s = dfadd2_vf2_vf2_vf2(s, dfmul_vf2_vf2_vf(dfq, vcast_vf_f(-PI_B3f*0.5f))); - s = dfnormalize_vf2_vf2(s); - s = dfadd2_vf2_vf2_vf2(s, dfmul_vf2_vf2_vf(dfq, vcast_vf_f(-PI_C3f*0.5f))); - s = dfnormalize_vf2_vf2(s); - s = dfadd2_vf2_vf2_vf2(s, dfmul_vf2_vf2_vf(dfq, vcast_vf_f(-PI_D3f*0.5f))); - s = dfnormalize_vf2_vf2(s); - s = dfadd2_vf2_vf2_vf2(s, dfmul_vf2_vf2_vf(dfq, vcast_vf_f(-PI_E3f*0.5f))); - s = dfnormalize_vf2_vf2(s); + dfi_t dfi = rempif(d); + q = dfi.i; + s = dfi.df; + o = visinf_vo_vf(d); + s.x = vreinterpret_vf_vm(vor_vm_vo32_vm(o, vreinterpret_vm_vf(s.x))); + s.y = vreinterpret_vf_vm(vor_vm_vo32_vm(o, vreinterpret_vm_vf(s.y))); } o = veq_vo_vi2_vi2(vand_vi2_vi2_vi2(q, vcast_vi2_i(1)), vcast_vi2_i(1)); @@ -830,10 +918,7 @@ EXPORT CONST vfloat xtanf_u1(vfloat d) { u = vadd_vf_vf_vf(x.x, x.y); - u = vsel_vf_vo_vf_vf(vandnot_vo_vo_vo(visinf_vo_vf(d), - vor_vo_vo_vo(visnegzero_vo_vf(d), - vgt_vo_vf_vf(vabs_vf_vf(d), vcast_vf_f(TRIGRANGEMAX3f)))), - vcast_vf_f(-0.0f), u); + u = vsel_vf_vo_vf_vf(visnegzero_vo_vf(d), d, u); return u; } diff --git a/src/libm/sleefsp.c b/src/libm/sleefsp.c index 65756667..e87114ff 100644 --- a/src/libm/sleefsp.c +++ b/src/libm/sleefsp.c @@ -1,4 +1,4 @@ -// Copyright Naoki Shibata 2010 - 2017. +// Copyright Naoki Shibata 2010 - 2018. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -20,6 +20,8 @@ #include "misc.h" +extern const float rempitabsp[]; + #ifdef DORENAME #include "rename.h" #endif @@ -410,20 +412,83 @@ static INLINE CONST Sleef_float2 dfsqrt_f2_f(float d) { // +typedef struct { + float d; + int32_t i; +} fi_t; + +typedef struct { + Sleef_float2 df; + int32_t i; +} dfi_t; + +static CONST fi_t rempisubf(float x) { + fi_t ret; + float fr = x - (float)(1LL << 10) * (int32_t)(x * (1.0f / (1LL << 10))); + ret.i = ((7 & ((x > 0 ? 4 : 3) + (int32_t)(fr * 8))) - 3) >> 1; + fr = fr - 0.25f * (int32_t)(fr * 4 + mulsignf(0.5f, x)); + fr = fabsfk(fr) > 0.125f ? (fr - mulsignf(0.5f, x)) : fr; + fr = fabsfk(fr) > 1e+10f ? 0 : fr; + if (fabsfk(x) == 0.12499999254941940308f) { fr = x; ret.i = 0; } + ret.d = fr; + return ret; +} + +static CONST dfi_t rempif(float a) { + Sleef_float2 x, y, z; + fi_t di; + float t; + int ex = ilogb2kf(a) - 25, q; + if (ex < 0) ex = 0; + ex *= 4; + x = dfmul_f2_f_f(a, rempitabsp[ex]); + di = rempisubf(x.x); + q = di.i; + x.x = di.d; + x = dfnormalize_f2_f2(x); + y = dfmul_f2_f_f(a, rempitabsp[ex+1]); + x = dfadd2_f2_f2_f2(x, y); + di = rempisubf(x.x); + q += di.i; + x.x = di.d; + x = dfnormalize_f2_f2(x); + y = dfmul_f2_f2_f(df(rempitabsp[ex+2], rempitabsp[ex+3]), a); + x = dfadd2_f2_f2_f2(x, y); + x = dfnormalize_f2_f2(x); + x = dfmul_f2_f2_f2(x, df(3.1415927410125732422f*2, -8.7422776573475857731e-08f*2)); + dfi_t ret = { fabsfk(a) < 0.7f ? df(a, 0) : x, q }; + return ret; +} + EXPORT CONST float xsinf(float d) { int q; float u, s, t = d; - q = (int)rintfk(d * (float)M_1_PI); - - d = mlaf(q, -PI_Af, d); - d = mlaf(q, -PI_Bf, d); - d = mlaf(q, -PI_Cf, d); - d = mlaf(q, -PI_Df, d); + if (fabsfk(d) < TRIGRANGEMAX2f) { + q = (int)rintfk(d * (float)M_1_PI); + d = mlaf(q, -PI_A2f, d); + d = mlaf(q, -PI_B2f, d); + d = mlaf(q, -PI_C2f, d); + } else if (fabsfk(d) < TRIGRANGEMAXf) { + q = (int)rintfk(d * (float)M_1_PI); + d = mlaf(q, -PI_Af, d); + d = mlaf(q, -PI_Bf, d); + d = mlaf(q, -PI_Cf, d); + d = mlaf(q, -PI_Df, d); + } else { + dfi_t dfi = rempif(t); + q = ((dfi.i & 3) * 2 + (dfi.df.x > 0) + 1) >> 2; + if ((dfi.i & 1) != 0) { + dfi.df = dfadd2_f2_f2_f2(dfi.df, df(mulsignf(3.1415927410125732422f*-0.5, dfi.df.x), + mulsignf(-8.7422776573475857731e-08f*-0.5, dfi.df.x))); + } + d = dfi.df.x + dfi.df.y; + + if (fabsfk(t) > 1e+28f && !xisinff(t)) d = 0; + } s = d * d; - if (floatToRawIntBits(d) == floatToRawIntBits(-0.0f)) s = -0.0f; if ((q & 1) != 0) d = -d; u = 2.6083159809786593541503e-06f; @@ -433,8 +498,7 @@ EXPORT CONST float xsinf(float d) { u = mlaf(s, u * d, d); - if (xisnegzerof(t) || fabsfk(t) > TRIGRANGEMAXf) u = -0.0f; - if (xisinff(t)) u = SLEEF_NANf; + if (xisnegzerof(t)) u = -0.0f; return u; } @@ -450,23 +514,15 @@ EXPORT CONST float xsinf_u1(float d) { s = dfadd2_f2_f_f(u, q * (-PI_B2f)); s = dfadd_f2_f2_f(s, q * (-PI_C2f)); } else { - Sleef_float2 dfq = dfmul_f2_f2_f(df(M_1_PI, M_1_PI - (float)M_1_PI), d); - float t = rintfk(dfq.x * (1.0f / (1 << 16))); - dfq.y = rintfk(dfq.x - t * (1 << 16) + dfq.y); - q = (int)dfq.y; - dfq.x = t * (1 << 16); - dfq = dfnormalize_f2_f2(dfq); - - s = dfadd2_f2_f_f2 (d, dfmul_f2_f2_f(dfq, -PI_A3f)); - s = dfnormalize_f2_f2(s); - s = dfadd2_f2_f2_f2(s, dfmul_f2_f2_f(dfq, -PI_B3f)); - s = dfnormalize_f2_f2(s); - s = dfadd2_f2_f2_f2(s, dfmul_f2_f2_f(dfq, -PI_C3f)); - s = dfnormalize_f2_f2(s); - s = dfadd2_f2_f2_f2(s, dfmul_f2_f2_f(dfq, -PI_D3f)); - s = dfnormalize_f2_f2(s); - s = dfadd2_f2_f2_f2(s, dfmul_f2_f2_f(dfq, -PI_E3f)); - s = dfnormalize_f2_f2(s); + dfi_t dfi = rempif(d); + q = ((dfi.i & 3) * 2 + (dfi.df.x > 0) + 1) >> 2; + if ((dfi.i & 1) != 0) { + dfi.df = dfadd2_f2_f2_f2(dfi.df, df(mulsignf(3.1415927410125732422f*-0.5, dfi.df.x), + mulsignf(-8.7422776573475857731e-08f*-0.5, dfi.df.x))); + } + s = dfnormalize_f2_f2(dfi.df); + + if (fabsfk(d) > 1e+28f && !xisinff(d)) s = df(0, 0); } t = s; @@ -481,7 +537,7 @@ EXPORT CONST float xsinf_u1(float d) { u = dfmul_f_f2_f2(t, x); if ((q & 1) != 0) u = -u; - if (!xisinff(d) && (xisnegzerof(d) || fabsfk(d) > TRIGRANGEMAX3f)) u = -0.0f; + if (xisnegzerof(d)) u = d; return u; } @@ -490,12 +546,28 @@ EXPORT CONST float xcosf(float d) { int q; float u, s, t = d; - q = 1 + 2*(int)rintfk(d * (float)M_1_PI - 0.5f); - - d = mlaf(q, -PI_Af*0.5f, d); - d = mlaf(q, -PI_Bf*0.5f, d); - d = mlaf(q, -PI_Cf*0.5f, d); - d = mlaf(q, -PI_Df*0.5f, d); + if (fabsfk(d) < TRIGRANGEMAX2f) { + q = 1 + 2*(int)rintfk(d * (float)M_1_PI - 0.5f); + d = mlaf(q, -PI_A2f*0.5f, d); + d = mlaf(q, -PI_B2f*0.5f, d); + d = mlaf(q, -PI_C2f*0.5f, d); + } else if (fabsfk(d) < TRIGRANGEMAXf) { + q = 1 + 2*(int)rintfk(d * (float)M_1_PI - 0.5f); + d = mlaf(q, -PI_Af*0.5f, d); + d = mlaf(q, -PI_Bf*0.5f, d); + d = mlaf(q, -PI_Cf*0.5f, d); + d = mlaf(q, -PI_Df*0.5f, d); + } else { + dfi_t dfi = rempif(t); + q = ((dfi.i & 3) * 2 + (dfi.df.x > 0) + 7) >> 1; + if ((dfi.i & 1) == 0) { + dfi.df = dfadd2_f2_f2_f2(dfi.df, df(mulsignf(3.1415927410125732422f*-0.5, dfi.df.x > 0 ? 1 : -1), + mulsignf(-8.7422776573475857731e-08f*-0.5, dfi.df.x > 0 ? 1 : -1))); + } + d = dfi.df.x + dfi.df.y; + + if (!xisinff(t) && fabsfk(t) > 1e+28f) d = 0; + } s = d * d; @@ -507,9 +579,6 @@ EXPORT CONST float xcosf(float d) { u = mlaf(u, s, -0.166666597127914428710938f); u = mlaf(s, u * d, d); - - if (fabsfk(t) > TRIGRANGEMAXf) u = 1.0f; - if (xisinff(t)) u = SLEEF_NANf; return u; } @@ -519,32 +588,23 @@ EXPORT CONST float xcosf_u1(float d) { Sleef_float2 s, t, x; int q; - d = fabsfk(d); - - if (d < TRIGRANGEMAX2f) { + if (fabsfk(d) < TRIGRANGEMAX2f) { + d = fabsfk(d); float dq = mlaf(rintfk(d * (float)M_1_PI - 0.5f), 2, 1); q = (int)dq; s = dfadd2_f2_f_f (d, dq * (-PI_A2f*0.5f)); s = dfadd2_f2_f2_f(s, dq * (-PI_B2f*0.5f)); s = dfadd2_f2_f2_f(s, dq * (-PI_C2f*0.5f)); } else { - Sleef_float2 dfq = dfadd2_f2_f2_f(dfmul_f2_f2_f(df(M_1_PI, M_1_PI - (float)M_1_PI), d), -0.5f); - float t = rintfk(dfq.x * (1.0f / (1 << 16))); - dfq.y = rintfk(dfq.x - t * (1 << 16) + dfq.y) * 2 + 1; - q = (int)dfq.y; - dfq.x = t * (1 << 17); - dfq = dfnormalize_f2_f2(dfq); - - s = dfadd2_f2_f_f2 (d, dfmul_f2_f2_f(dfq, -PI_A3f*0.5f)); - s = dfnormalize_f2_f2(s); - s = dfadd2_f2_f2_f2(s, dfmul_f2_f2_f(dfq, -PI_B3f*0.5f)); - s = dfnormalize_f2_f2(s); - s = dfadd2_f2_f2_f2(s, dfmul_f2_f2_f(dfq, -PI_C3f*0.5f)); - s = dfnormalize_f2_f2(s); - s = dfadd2_f2_f2_f2(s, dfmul_f2_f2_f(dfq, -PI_D3f*0.5f)); - s = dfnormalize_f2_f2(s); - s = dfadd2_f2_f2_f2(s, dfmul_f2_f2_f(dfq, -PI_E3f*0.5f)); - s = dfnormalize_f2_f2(s); + dfi_t dfi = rempif(d); + q = ((dfi.i & 3) * 2 + (dfi.df.x > 0) + 7) >> 1; + if ((dfi.i & 1) == 0) { + dfi.df = dfadd2_f2_f2_f2(dfi.df, df(mulsignf(3.1415927410125732422f*-0.5, dfi.df.x > 0 ? 1 : -1), + mulsignf(-8.7422776573475857731e-08f*-0.5, dfi.df.x > 0 ? 1 : -1))); + } + s = dfnormalize_f2_f2(dfi.df); + + if (!xisinff(d) && d > 1e+28f) s = df(0, 0); } t = s; @@ -559,7 +619,7 @@ EXPORT CONST float xcosf_u1(float d) { u = dfmul_f_f2_f2(t, x); if ((((int)q) & 2) == 0) u = -u; - if (!xisinff(d) && d > TRIGRANGEMAX3f) u = 1.0f; + return u; } @@ -568,14 +628,27 @@ EXPORT CONST Sleef_float2 xsincosf(float d) { float u, s, t; Sleef_float2 r; - q = (int)rintfk(d * ((float)(2 * M_1_PI))); - s = d; - s = mlaf(q, -PI_Af*0.5f, s); - s = mlaf(q, -PI_Bf*0.5f, s); - s = mlaf(q, -PI_Cf*0.5f, s); - s = mlaf(q, -PI_Df*0.5f, s); + if (fabsfk(d) < TRIGRANGEMAX2f) { + q = (int)rintfk(d * ((float)(2 * M_1_PI))); + s = mlaf(q, -PI_A2f*0.5f, s); + s = mlaf(q, -PI_B2f*0.5f, s); + s = mlaf(q, -PI_C2f*0.5f, s); + } else if (fabsfk(d) < TRIGRANGEMAXf) { + q = (int)rintfk(d * ((float)(2 * M_1_PI))); + s = mlaf(q, -PI_Af*0.5f, s); + s = mlaf(q, -PI_Bf*0.5f, s); + s = mlaf(q, -PI_Cf*0.5f, s); + s = mlaf(q, -PI_Df*0.5f, s); + } else { + dfi_t dfi = rempif(d); + q = dfi.i; + s = dfi.df.x + dfi.df.y; + + if (fabsfk(d) > 1e+28f) s = 0; + if (xisinff(d)) s = SLEEF_NANf; + } t = s; @@ -602,9 +675,6 @@ EXPORT CONST Sleef_float2 xsincosf(float d) { if ((q & 2) != 0) { r.x = -r.x; } if (((q+1) & 2) != 0) { r.y = -r.y; } - if (fabsfk(d) > TRIGRANGEMAXf) { r.x = 0; r.y = 1; } - if (xisinff(d)) { r.x = r.y = SLEEF_NANf; } - return r; } @@ -619,23 +689,12 @@ EXPORT CONST Sleef_float2 xsincosf_u1(float d) { s = dfadd2_f2_f_f(u, q * (-PI_B2f*0.5f)); s = dfadd_f2_f2_f(s, q * (-PI_C2f*0.5f)); } else { - Sleef_float2 dfq = dfmul_f2_f2_f(df((2 * M_1_PI), (2 * M_1_PI) - (float)(2 * M_1_PI)), d); - float t = rintfk(dfq.x * (1.0f / (1 << 16))); - dfq.y = rintfk(dfq.x - t * (1 << 16) + dfq.y); - q = (int)dfq.y; - dfq.x = t * (1 << 16); - dfq = dfnormalize_f2_f2(dfq); - - s = dfadd2_f2_f_f2 (d, dfmul_f2_f2_f(dfq, -PI_A3f*0.5f)); - s = dfnormalize_f2_f2(s); - s = dfadd2_f2_f2_f2(s, dfmul_f2_f2_f(dfq, -PI_B3f*0.5f)); - s = dfnormalize_f2_f2(s); - s = dfadd2_f2_f2_f2(s, dfmul_f2_f2_f(dfq, -PI_C3f*0.5f)); - s = dfnormalize_f2_f2(s); - s = dfadd2_f2_f2_f2(s, dfmul_f2_f2_f(dfq, -PI_D3f*0.5f)); - s = dfnormalize_f2_f2(s); - s = dfadd2_f2_f2_f2(s, dfmul_f2_f2_f(dfq, -PI_E3f*0.5f)); - s = dfnormalize_f2_f2(s); + dfi_t dfi = rempif(d); + q = dfi.i; + s = dfi.df; + + if (fabsfk(d) > 1e+28f) s = df(0, 0); + if (xisinff(d)) s = df(SLEEF_NANf, SLEEF_NANf); } t = s; @@ -664,9 +723,6 @@ EXPORT CONST Sleef_float2 xsincosf_u1(float d) { if ((q & 2) != 0) { r.x = -r.x; } if (((q+1) & 2) != 0) { r.y = -r.y; } - if (fabsfk(d) > TRIGRANGEMAX3f) { r.x = 0; r.y = 1; } - if (xisinff(d)) { r.x = r.y = SLEEF_NAN; } - return r; } @@ -707,7 +763,7 @@ EXPORT CONST Sleef_float2 xsincospif_u05(float d) { if ((q & 4) != 0) { r.x = -r.x; } if (((q+2) & 4) != 0) { r.y = -r.y; } - if (fabsfk(d) > TRIGRANGEMAXf/4) { r.x = 0; r.y = 1; } + if (fabsfk(d) > 1e+7f) { r.x = 0; r.y = 1; } if (xisinff(d)) { r.x = r.y = SLEEF_NANf; } return r; @@ -745,7 +801,7 @@ EXPORT CONST Sleef_float2 xsincospif_u35(float d) { if ((q & 4) != 0) { r.x = -r.x; } if (((q+2) & 4) != 0) { r.y = -r.y; } - if (fabsfk(d) > TRIGRANGEMAXf/4) { r.x = 0; r.y = 1; } + if (fabsfk(d) > 1e+7f) { r.x = 0; r.y = 1; } if (xisinff(d)) { r.x = r.y = SLEEF_NANf; } return r; @@ -755,14 +811,25 @@ EXPORT CONST float xtanf(float d) { int q; float u, s, x; - q = (int)rintfk(d * (float)(2 * M_1_PI)); - x = d; - x = mlaf(q, -PI_Af*0.5f, x); - x = mlaf(q, -PI_Bf*0.5f, x); - x = mlaf(q, -PI_Cf*0.5f, x); - x = mlaf(q, -PI_Df*0.5f, x); + if (fabsfk(d) < TRIGRANGEMAX2f) { + q = (int)rintfk(d * (float)(2 * M_1_PI)); + x = mlaf(q, -PI_A2f*0.5f, x); + x = mlaf(q, -PI_B2f*0.5f, x); + x = mlaf(q, -PI_C2f*0.5f, x); + } else if (fabsfk(d) < TRIGRANGEMAXf) { + q = (int)rintfk(d * (float)(2 * M_1_PI)); + x = mlaf(q, -PI_Af*0.5f, x); + x = mlaf(q, -PI_Bf*0.5f, x); + x = mlaf(q, -PI_Cf*0.5f, x); + x = mlaf(q, -PI_Df*0.5f, x); + } else { + dfi_t dfi = rempif(d); + q = dfi.i; + x = dfi.df.x + dfi.df.y; + if (xisinff(d)) x = SLEEF_NANf; + } s = x * x; @@ -779,8 +846,6 @@ EXPORT CONST float xtanf(float d) { if ((q & 1) != 0) u = 1.0f / u; - if (xisinff(d)) u = SLEEF_NANf; - return u; } @@ -795,23 +860,9 @@ EXPORT CONST float xtanf_u1(float d) { s = dfadd2_f2_f_f(u, q * (-PI_B2f*0.5f)); s = dfadd_f2_f2_f(s, q * (-PI_C2f*0.5f)); } else { - Sleef_float2 dfq = dfmul_f2_f2_f(df((2 * M_1_PI), (2 * M_1_PI) - (float)(2 * M_1_PI)), d); - float t = rintfk(dfq.x * (1.0f / (1 << 16))); - dfq.y = rintfk(dfq.x - t * (1 << 16) + dfq.y); - q = (int)dfq.y; - dfq.x = t * (1 << 16); - dfq = dfnormalize_f2_f2(dfq); - - s = dfadd2_f2_f_f2 (d, dfmul_f2_f2_f(dfq, -PI_A3f*0.5f)); - s = dfnormalize_f2_f2(s); - s = dfadd2_f2_f2_f2(s, dfmul_f2_f2_f(dfq, -PI_B3f*0.5f)); - s = dfnormalize_f2_f2(s); - s = dfadd2_f2_f2_f2(s, dfmul_f2_f2_f(dfq, -PI_C3f*0.5f)); - s = dfnormalize_f2_f2(s); - s = dfadd2_f2_f2_f2(s, dfmul_f2_f2_f(dfq, -PI_D3f*0.5f)); - s = dfnormalize_f2_f2(s); - s = dfadd2_f2_f2_f2(s, dfmul_f2_f2_f(dfq, -PI_E3f*0.5f)); - s = dfnormalize_f2_f2(s); + dfi_t dfi = rempif(d); + q = dfi.i; + s = dfi.df; } if ((q & 1) != 0) s = dfneg_f2_f2(s); @@ -834,7 +885,7 @@ EXPORT CONST float xtanf_u1(float d) { u = x.x + x.y; - if (!xisinff(d) && (xisnegzerof(d) || fabsfk(d) > TRIGRANGEMAX3f)) u = -0.0f; + if (!xisinff(d) && (xisnegzerof(d) || fabsfk(d) > 1e+28f)) u = -0.0f; return u; }