Exemple #1
0
 static inline result_type rem(A0 const& x, A0 & xr, A0& xc)
 {
   typedef typename meta::as_integer<A0>::type i_type;
   A0 n = tofloat(rem_pio2_medium(x, xr, xc));
   xr = xr+n*Pio_2<A0>();
   xr = if_else(gt(xr, Pi<A0>()), xr-Twopi<A0>(), xr);
 }
Exemple #2
0
 static inline result_type rem(A0 const& x)
 {
   A0 xr;
   typedef typename nt2::meta::as_integer<A0>::type iA0;
   iA0 n = rem_pio2_medium(x, xr);
   xr += nt2::tofloat(n)*Pio_2<A0>();
   xr = if_else(gt(xr, Pi<A0>()), xr-Twopi<A0>(), xr);
   return xr;
 }