#include "ace/config-all.h"
#include "ace/os_include/os_math.h"
Go to the source code of this file.
Namespaces | |
namespace | ACE_OS |
This namespace defines an OS independent programming API that shields developers from nonportable aspects of writing efficient system programs on Win32, POSIX and other versions of UNIX, and various real-time operating systems. | |
Defines | |
#define | ACE_EXPORT_MACRO ACE_Export |
Functions | |
double | ace_log2_helper (double x) |
template<typename T > | |
T | ACE_OS::floor (T x) |
This method computes the largest integral value not greater than x. | |
template<typename T > | |
T | ACE_OS::ceil (T x) |
This method computes the smallest integral value not less than x. | |
double | ACE_OS::log2 (double x) |
This method computes the base-2 logarithm of x. |
Originally in OS.h.
Definition in file OS_NS_math.h.
#define ACE_EXPORT_MACRO ACE_Export |
Definition at line 35 of file OS_NS_math.h.
double ace_log2_helper | ( | double | x | ) | [inline] |
Definition at line 45 of file OS_NS_math.h.
{ #if defined (log2) return log2 (x); #undef log2 #else # if !defined (ACE_LACKS_LOG2) return ACE_STD_NAMESPACE::log2 (x); # else /* ================================================================== log (x) k log (x) = ------- b log (b) k meaning the binary logarithm of x using the natural logarithm, for example, is: log (x) e log (x) = ------- 2 log (2) e ================================================================== */ // Precomputed value of 1/log(2.0). Saves an expensive division and // computing log(2.0) in each call. double const _1_ln2 = 1.442695040888963407359924681002; return log (x) * _1_ln2; # endif /* !ACE_LACKS_LOG2 */ #endif /* defined (log2) */ }