37 v8di ix = _mm512_castpd_si512(x);
38 v8di is = _mm512_and_epi64(ix, asinh_mask2);
39 ix = _mm512_and_epi64(ix, asinh_mask1);
40 x = _mm512_castsi512_pd(ix);
41 __mmask8 invalid = _mm512_cmp_pd_mask(x, dbl_max, _CMP_NLE_UQ);
42 if( ! _mm512_kortestz(invalid, invalid) )
43 throw domain_error( DEMsg(
"v1asinhd", x, invalid) );
44 v8df rh = v1logd_core(x);
45 rh = _mm512_add_pd(rh, ln_two);
46 v8df xl = _mm512_min_pd(x, asinh_2p28);
47 v8df rl = v1asinhd_core(xl);
48 v8df r = _mm512_setzero_pd();
49 __mmask8 mask = _mm512_cmp_pd_mask(xl, x, _CMP_EQ_OQ);
50 r = _mm512_mask_add_pd(rh, mask, rl, r);
51 v8di ir = _mm512_castpd_si512(r);
52 ir = _mm512_or_epi64(ir, is);
53 return _mm512_castsi512_pd(ir);
58 __mmask8 invalid1 = _mm512_cmp_pd_mask(x,
zero, _CMP_LT_OQ);
59 __mmask8 invalid2 = _mm512_cmp_pd_mask(x, sqrt_dbl_max, _CMP_NLE_UQ);
60 if( ! _mm512_kortestz(invalid1, invalid2) )
62 __mmask8 invalid = invalid1 | invalid2;
63 throw domain_error( DEMsg(
"v1fast_asinhd", x, invalid) );
65 return v1asinhd_core(x);
70 v16si ix = _mm512_castps_si512(x);
71 v16si is = _mm512_and_epi32(ix, asinh_mask2f);
72 ix = _mm512_and_epi32(ix, asinh_mask1f);
73 x = _mm512_castsi512_ps(ix);
74 __mmask16 invalid = _mm512_cmp_ps_mask(x, flt_max, _CMP_NLE_UQ);
75 if( ! _mm512_kortestz(invalid, invalid) )
76 throw domain_error( DEMsg(
"v1asinhf", x, invalid) );
77 v16sf rh = v1logf_core(x);
78 rh = _mm512_add_ps(rh, ln_twof);
79 v16sf xl = _mm512_min_ps(x, asinhf_2p28);
80 v16sf rl = v1asinhf_core(xl);
81 v16sf r = _mm512_setzero_ps();
82 __mmask16 mask = _mm512_cmp_ps_mask(xl, x, _CMP_EQ_OQ);
83 r = _mm512_mask_add_ps(rh, mask, rl, r);
84 v16si ir = _mm512_castps_si512(r);
85 ir = _mm512_or_epi32(ir, is);
86 return _mm512_castsi512_ps(ir);
91 __mmask16 invalid1 = _mm512_cmp_ps_mask(x, zerof, _CMP_LT_OQ);
92 __mmask16 invalid2 = _mm512_cmp_ps_mask(x, sqrt_flt_max, _CMP_NLE_UQ);
93 if( ! _mm512_kortestz(invalid1, invalid2) )
95 __mmask16 invalid = invalid1 | invalid2;
96 throw domain_error( DEMsg(
"v1fast_asinhf", x, invalid) );
98 return v1asinhf_core(x);
106 v4df mask1 = _mm256_castsi256_pd(asinh_mask1);
107 x = _mm256_and_pd(x, mask1);
108 v4df invalid = _mm256_cmp_pd(x, dbl_max, _CMP_NLE_UQ);
109 if( ! _mm256_testz_pd(invalid, invalid) )
110 throw domain_error( DEMsg(
"v1asinhd", x, invalid) );
111 mask1 = _mm256_castsi256_pd(asinh_mask2);
112 signbit = _mm256_and_pd(signbit, mask1);
115 v4df rh = v1logd_core(x);
116 rh = _mm256_add_pd(rh, ln_two);
119 v4df xl = _mm256_min_pd(x, asinh_2p28);
120 v4df rl = v1asinhd_core(xl);
121 v4df mask = _mm256_cmp_pd(xl, x, _CMP_EQ_OQ);
122 v4df r = _mm256_blendv_pd(rh, rl, mask);
123 return _mm256_or_pd(r, signbit);
128 v4df invalid1 = _mm256_cmp_pd(x,
zero, _CMP_LT_OQ);
129 v4df invalid2 = _mm256_cmp_pd(x, sqrt_dbl_max, _CMP_NLE_UQ);
130 v4df invalid = _mm256_or_pd(invalid1, invalid2);
131 if( ! _mm256_testz_pd(invalid, invalid) )
132 throw domain_error( DEMsg(
"v1fast_asinhd", x, invalid) );
133 return v1asinhd_core(x);
139 v8sf mask1 = _mm256_castsi256_ps(asinh_mask1f);
140 x = _mm256_and_ps(x, mask1);
141 v8sf invalid = _mm256_cmp_ps(x, flt_max, _CMP_NLE_UQ);
142 if( ! _mm256_testz_ps(invalid, invalid) )
143 throw domain_error( DEMsg(
"v1asinhf", x, invalid) );
144 mask1 = _mm256_castsi256_ps(asinh_mask2f);
145 signbit = _mm256_and_ps(signbit, mask1);
146 v8sf rh = v1logf_core(x);
147 rh = _mm256_add_ps(rh, ln_twof);
148 v8sf xl = _mm256_min_ps(x, asinhf_2p28);
149 v8sf rl = v1asinhf_core(xl);
150 v8sf mask = _mm256_cmp_ps(xl, x, _CMP_EQ_OQ);
151 v8sf r = _mm256_blendv_ps(rh, rl, mask);
152 return _mm256_or_ps(r, signbit);
157 v8sf invalid1 = _mm256_cmp_ps(x, zerof, _CMP_LT_OQ);
158 v8sf invalid2 = _mm256_cmp_ps(x, sqrt_flt_max, _CMP_NLE_UQ);
159 v8sf invalid = _mm256_or_ps(invalid1, invalid2);
160 if( ! _mm256_testz_ps(invalid, invalid) )
161 throw domain_error( DEMsg(
"v1fast_asinhf", x, invalid) );
162 return v1asinhf_core(x);
165 #endif // __AVX512F__
200 void vasinh(
const double x[],
double y[],
long nlo,
long nhi)
207 void vfast_asinh(
const double x[],
double y[],
long nlo,
long nhi)
238 void vasinh(
double *y,
double x0,
double x1,
double x2,
double x3,
double x4,
double x5,
double x6,
double x7)
243 void vfast_asinh(
double *y,
double x0,
double x1,
double x2,
double x3,
double x4,
double x5,
double x6,
double x7)
#define V1FUN_PD_8(FUN, V)
sys_float wr_asinhf(sys_float x)
void vfast_asinh(const double x[], double y[], long nlo, long nhi)
sys_float fast_asinhf(sys_float x)
void vecfun(const T x[], T y[], long nlo, long nhi, T(*scalfun1)(T), V(*)(V))
#define V1FUN_PS_4(FUN, V)
void vasinh(const double x[], double y[], long nlo, long nhi)
#define V1FUN_PD_4(FUN, V)
double wr_asinhd(double x)
#define DEBUG_ENTRY(funcname)
double fast_asinh(double x)
#define V1FUN_PS_8(FUN, V)
#define V1FUN_PS_16(FUN, V)