math.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef CASA_STD_MATH_H
00029 #define CASA_STD_MATH_H
00030
00031
00032
00033
00034
00035
00036 #include <casacore/casa/aips.h>
00037
00038 #if defined(__APPLE__) || defined(AIPS_DARWIN)
00039 #include <math.h>
00040 #include <ostream>
00041 #include <cmath>
00042 namespace casacore {
00043 using std::isnan;
00044 using std::isinf;
00045 using std::isfinite;
00046 }
00047 #endif
00048
00049 #if defined(AIPS_SGI) || defined(AIPS_SUN_NATIVE)
00050 # include <math.h>
00051 #else
00052 # include <cmath>
00053 # if !defined(AIPS_INTELCC)
00054 namespace casacore {
00055 using std::abs;
00056 }
00057 # endif
00058 # if !(defined(AIPS_KAICC) || defined(AIPS_GCC) || defined(AIPS_INTELCC) || defined(AIPS_DARWIN) || defined(AIPS_CRAY_PGI))
00059 # define NEEDS_POWFLOATFLOAT
00060 # endif
00061 #endif
00062
00063 namespace casacore {
00064
00065 using std::abs;
00066 using std::fabs;
00067 using std::cos;
00068 using std::cosh;
00069 using std::sin;
00070 using std::sinh;
00071 using std::tan;
00072 using std::tanh;
00073 using std::asin;
00074 using std::acos;
00075 using std::atan;
00076 using std::atan2;
00077 using std::exp;
00078 using std::log;
00079 using std::log10;
00080 using std::sqrt;
00081 using std::pow;
00082 using std::floor;
00083 using std::ceil;
00084 using std::fmod;
00085 using ::erf;
00086 using ::erfc;
00087
00088
00089 # if defined(NEEDS_POWFLOATFLOAT)
00090 inline Float pow(Float f1, Float f2)
00091 { return Float(pow(Double(f1), Double(f2))); };
00092 # endif
00093
00094
00095 #if defined(AIPS_CRAY_PGI)
00096 inline float abs(float v)
00097 { return fabs(v); }
00098 #endif
00099
00100
00101 }
00102
00103 #endif