00001
00002
00003
00004
00005 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00006
00007 namespace ACE_OS {
00008
00009 ACE_INLINE double
00010 floor (double x)
00011 {
00012
00013 if(x > 0)
00014 return static_cast<long> (x);
00015 else if (static_cast<long> (x) == x)
00016 return x;
00017 else
00018 return static_cast<long>(x) - 1;
00019 }
00020
00021 ACE_INLINE double
00022 ceil (double x)
00023 {
00024
00025 if (x < 0)
00026 return static_cast<long> (x);
00027 else if (static_cast<long> (x) == x)
00028 return x;
00029 else
00030 return static_cast<long> (x) + 1;
00031 }
00032
00033 ACE_INLINE double
00034 log2 (double x)
00035 {
00036 return ace_log2_helper (x);
00037 }
00038
00039 }
00040
00041 ACE_END_VERSIONED_NAMESPACE_DECL