HermesCommon  2.0
c99_functions.cpp
Go to the documentation of this file.
1 #include <cmath>
2 #include "common.h"
3 #include "c99_functions.h"
7 #ifdef IMPLEMENT_C99
8 
9 double exp2(double x)
10 {
11  return pow(2.0, x);
12 }
13 
14 double log2(double x)
15 {
16  return log(x) / M_LN2;
17 }
18 
19 double cbrt(double x)
20 {
21  if(!_isnan(x))
22  return pow(x, 1.0 / 3.0);
23  else
24  return x;
25 }
26 
27 #endif