home *** CD-ROM | disk | FTP | other *** search
- /*
- * math.h glue functions (float precision math) ...
- */
-
- #ifndef __FP__
- #include <fp.h>
- #endif
-
- /*
- * We can't include both fp.h and math.h since their definitions of cos, etc... conflict
- */
-
- #ifdef cplusplus
- extern "C" {
- #endif
- float cosf(float);
- float sinf(float);
- float tanf(float);
- float acosf(float);
- float asinf(float);
- float atanf(float);
- float atan2f(float, float);
- float coshf(float);
- float sinhf(float);
- float tanhf(float);
- float expf(float);
- float frexpf(float, int *);
- float ldexpf(float, int);
- float logf(float);
- float log10f(float);
- float modff(float, float *);
- float fabsf(float);
- float powf(float, float);
- float sqrtf(float);
- float ceilf(float);
- float floorf(float);
- float fmodf(float, float);
- #ifdef cplusplus
- }
- #endif
-
- /*******************************************************************************
- * Trigonometric functions *
- *******************************************************************************/
-
- float cosf(float x)
- {
- return((cos)(x));
- }
-
- float sinf(float x)
- {
- return((sin)(x));
- }
-
- float tanf(float x)
- {
- return((tan)(x));
- }
-
- float acosf(float x)
- {
- return((acos)(x));
- }
-
- float asinf(float x)
- {
- return((asin)(x));
- }
-
- float atanf(float x)
- {
- return((atan)(x));
- }
-
- float atan2f(float x, float y)
- {
- return((atan2)(x,y));
- }
-
- /*******************************************************************************
- * Hyperbolic functions *
- *******************************************************************************/
-
- float coshf(float x)
- {
- return((cosh)(x));
- }
-
- float sinhf(float x)
- {
- return((sinh)(x));
- }
-
- float tanhf(float x)
- {
- return((tanh)(x));
- }
-
- /*******************************************************************************
- * Exponential functions *
- *******************************************************************************/
-
- float expf(float x)
- {
- return((exp)(x));
- }
-
- float frexpf(float x, int *exponent)
- {
- return((frexp)(x,exponent));
- }
-
- float ldexpf(float x, int n)
- {
- return((ldexp)(x,n));
- }
-
- float logf(float x)
- {
- return((log)(x));
- }
-
- float log10f(float x)
- {
- return((log10)(x));
- }
-
- /*******************************************************************************
- * Power and absolute value functions *
- *******************************************************************************/
-
- float fabsf(float x)
- {
- return((fabs)(x));
- }
-
- float powf(float x, float y)
- {
- return((pow)(x,y));
- }
-
- float sqrtf(float x)
- {
- return((sqrt)(x));
- }
-
- /*******************************************************************************
- * Nearest integer functions *
- *******************************************************************************/
-
- float ceilf(float x)
- {
- return((ceil)(x));
- }
-
- float floorf(float x)
- {
- return((floor)(x));
- }
-
- /*******************************************************************************
- * Remainder functions *
- *******************************************************************************/
-
- float fmodf(float x, float y)
- {
- return((fmod)(x,y));
- }
-
-