コード例 #1
0
ファイル: f_trig_reduction.hpp プロジェクト: francescog/nt2
 static inline int_type reduce(const A0& x, A0& xr, A0& xc)
 {
   // x is always positive here
   if (all(isalreadyreduced(x))) // all of x are in [0, pi/4], no reduction
   {
     return pio2_reducing<A0>::noreduction(x, xr, xc);
   }
   else if (all(issmall(x))) // all of x are in [0, 20*pi],  cephes algorithm is sufficient for 1 ulp
   {
     return pio2_reducing<A0>::cephes_reduction(x, xr, xc);
   }
   else if (all(ismedium(x))) // all of x are in [0, 2^7*pi/2],  fdlibm medium way
   {
     return pio2_reducing<A0>::fdlibm_medium_reduction(x, xr, xc);
   }
   else  // all of x are in [0, inf],  standard big way
   {
     // This is never taken
     return pio2_reducing<A0>::fdlibm_big_reduction(x, xr, xc);
   }
 }
コード例 #2
0
ファイル: 1038.cpp プロジェクト: vadimkantorov/acm
bool ispunct(char c)
{
	return (!iscapital(c) && !issmall(c) && !isstop(c));
}
コード例 #3
0
ファイル: 1038.cpp プロジェクト: vadimkantorov/acm
bool isalpha(char c)
{
	return issmall(c) || iscapital(c);
}