OS_NS_math.h File Reference

#include "ace/config-all.h"
#include "ace/os_include/os_math.h"
#include "ace/OS_NS_math.inl"

Include dependency graph for OS_NS_math.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  ACE_OS

Defines

#define ACE_EXPORT_MACRO   ACE_Export
#define ACE_INLINE   inline

Functions

double ace_log2_helper (double x)
ACE_NAMESPACE_INLINE_FUNCTION
double 
ACE_OS::floor (double x)
 This method computes the largest integral value not greater than x.
ACE_NAMESPACE_INLINE_FUNCTION
double 
ACE_OS::ceil (double x)
 This method computes the smallest integral value not less than x.
ACE_NAMESPACE_INLINE_FUNCTION
double 
ACE_OS::log2 (double x)
 This method computes the base-2 logarithm of x.


Detailed Description

Id
OS_NS_math.h 80826 2008-03-04 14:51:23Z wotte

Author:
Douglas C. Schmidt <schmidt@cs.wustl.edu>

Jesper S. M|ller<stophph@diku.dk>

and a cast of thousands...

Originally in OS.h.

Definition in file OS_NS_math.h.


Define Documentation

#define ACE_EXPORT_MACRO   ACE_Export

Definition at line 35 of file OS_NS_math.h.

#define ACE_INLINE   inline

Definition at line 110 of file OS_NS_math.h.


Function Documentation

double ace_log2_helper ( double  x  )  [inline]

Definition at line 45 of file OS_NS_math.h.

References ACE::log2().

Referenced by ACE_OS::log2().

00046 {
00047 #if defined (log2)
00048   return log2 (x);
00049 #undef log2
00050 #else
00051 #  if !defined (ACE_LACKS_LOG2)
00052   return ACE_STD_NAMESPACE::log2 (x);
00053 #  else
00054   /*
00055     ==================================================================
00056 
00057                 log (x)
00058                    k
00059       log (x) = -------
00060          b      log (b)
00061                    k
00062 
00063     meaning the binary logarithm of x using the natural logarithm, for
00064     example, is:
00065 
00066 
00067                 log (x)
00068                    e
00069       log (x) = -------
00070          2      log (2)
00071                    e
00072 
00073     ==================================================================
00074    */
00075 
00076   // Precomputed value of 1/log(2.0).  Saves an expensive division and
00077   // computing log(2.0) in each call.
00078   double const _1_ln2 = 1.442695040888963407359924681002;
00079 
00080   return log (x) * _1_ln2;
00081 #  endif /* !ACE_LACKS_LOG2 */
00082 #endif /* defined (log2) */
00083 }


Generated on Tue Feb 2 17:30:18 2010 for ACE by  doxygen 1.4.7