Changeset 74 for mppenc/branches/r2d/common
- Timestamp:
- 10/12/06 19:03:11 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mppenc/branches/r2d/common/mpcmath.h
r64 r74 27 27 #endif 28 28 29 // fast but maybe more inaccurate, use if you need speed 30 #if defined(__GNUC__) && !defined(__APPLE__) 31 # define SIN(x) sinf ((float)(x)) 32 # define COS(x) cosf ((float)(x)) 33 # define ATAN2(x,y) atan2f ((float)(x), (float)(y)) 34 # define SQRT(x) sqrtf ((float)(x)) 35 # define LOG(x) logf ((float)(x)) 36 # define LOG10(x) log10f ((float)(x)) 37 # define POW(x,y) expf (logf(x) * (y)) 38 # define POW10(x) expf (M_LN10 * (x)) 39 # define FLOOR(x) floorf ((float)(x)) 40 # define IFLOOR(x) (int) floorf ((float)(x)) 41 # define FABS(x) fabsf ((float)(x)) 42 #else 43 # define SIN(x) (float) sin (x) 44 # define COS(x) (float) cos (x) 45 # define ATAN2(x,y) (float) atan2 (x, y) 46 # define SQRT(x) (float) sqrt (x) 47 # define LOG(x) (float) log (x) 48 # define LOG10(x) (float) log10 (x) 49 # define POW(x,y) (float) pow (x,y) 50 # define POW10(x) (float) pow (10., (x)) 51 # define FLOOR(x) (float) floor (x) 52 # define IFLOOR(x) (int) floor (x) 53 # define FABS(x) (float) fabs (x) 54 #endif 55 56 #define SQRTF(x) SQRT (x) 57 #define COSF(x) COS (x) 58 #define ATAN2F(x,y) ATAN2 (x,y) 59 #define IFLOORF(x) IFLOOR (x)
Note: See TracChangeset
for help on using the changeset viewer.