root/lib/math/wrapper.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. pow
  2. sqrt
  3. log
  4. log10
  5. log2

   1 #include "math.h"
   2 
   3 extern double _pow(double x, double y);
   4 extern double _log(double x);
   5 extern double _log10(double x);
   6 extern double _sqrt(double x);
   7 
   8 double pow(double x, double y)  {   return d2d( _pow( d2d(x), d2d(y) ) );   }
   9 
  10 double sqrt(double x)           {   return d2d( _sqrt( d2d(x) ) );  }
  11 
  12 double log(double x)            {   return d2d( _log( d2d(x) ) );   }
  13 
  14 double log10(double x)          {   return d2d( _log10( d2d(x) ) ); }
  15 
  16 // log2(x) = log(x) * (1 / log(2))
  17 double log2(double x)           {   return (log(x) * ((double)1.44269504088906));   }

/* [<][>][^][v][top][bottom][index][help] */