static inline A0 finalize(const A0& a0, const A0& , const A0& c , const A0& k, const A0& , const A0& ) { A0 y = fast_ldexp(c, toint(k)); //adjust for 10^n n flint return sel(b_and(is_gtz(a0), is_flint(a0)), round2even(y), y); }
static inline A0 finalize(const A0& a0, const A0& x, const A0& c, const A0 & k, const A0& ,const A0& ) { A0 y = oneminus(((-(x*c)/(Two<A0>()-c))-x)); y = fast_ldexp(y, toint(k)); // adjust for 2^n n flint return sel(b_and(is_gtz(a0), is_flint(a0)), round2even(y), y); }
static inline logic tan_invalid(const A0& x) { return /*is_invalid(x)|*/is_flint(x-Half<A0>()) ; }
static inline logic cot_invalid(const A0& x) { return /*is_invalid(x)|*/(is_nez(x)&is_flint(x)); }
static inline logic tan_invalid(const A0& x) { return /*is_invalid(x)|*/is_flint((x-Ninety<A0>())/C_180<A0>()); }
inline typename simd_batch_traits<B>::batch_bool_type is_even(const simd_base<B>& x) { return is_flint(x * batch_type_t<B>(0.5)); }