123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- #ifndef _INC_MATH
- #define _INC_MATH
- #define HUGE_VALF 3.402823466e+38
- #define PI 3.1415926536
- #define TWO_PI 6.2831853071
- #define HALF_PI 1.5707963268
- #define QUART_PI 0.7853981634
- #define iPI 0.3183098862
- #define iTWO_PI 0.1591549431
- #define TWO_O_PI 0.6366197724
- #define EPS 244.14062E-6
- #define EPS2 59.6046E-9
- union float_long
- {
- float f;
- long l;
- };
- #if defined(__SDCC_MATH_LIB) && defined(__SDCC_mcs51) && !defined(__SDCC_USE_XSTACK) && !defined(__SDCC_STACK_AUTO) && !defined(_SDCC_NO_ASM_LIB_FUNCS)
- #define MATH_ASM_MCS51
- #endif
- #if defined(__SDCC_z80) || defined(__SDCC_z180) || defined(__SDCC_r2k) || defined(__SDCC_r3ka) || defined(__SDCC_r4k) || defined(__SDCC_gbz80)
- #define _FLOAT_FUNC_REENTRANT
- #else
- #define _FLOAT_FUNC_REENTRANT __reentrant
- #endif
- float sinf(const float x) _FLOAT_FUNC_REENTRANT;
- float cosf(const float x) _FLOAT_FUNC_REENTRANT;
- float tanf(const float x) _FLOAT_FUNC_REENTRANT;
- float cotf(const float x) _FLOAT_FUNC_REENTRANT;
- float asinf(const float x) _FLOAT_FUNC_REENTRANT;
- float acosf(const float x) _FLOAT_FUNC_REENTRANT;
- float atanf(const float x) _FLOAT_FUNC_REENTRANT;
- float atan2f(const float x, const float y);
- float sinhf(const float x) _FLOAT_FUNC_REENTRANT;
- float coshf(const float x) _FLOAT_FUNC_REENTRANT;
- float tanhf(const float x) _FLOAT_FUNC_REENTRANT;
- float expf(const float x);
- float logf(const float x) _FLOAT_FUNC_REENTRANT;
- float log10f(const float x) _FLOAT_FUNC_REENTRANT;
- float powf(const float x, const float y);
- float sqrtf(const float a) _FLOAT_FUNC_REENTRANT;
- float fabsf(const float x) _FLOAT_FUNC_REENTRANT;
- float frexpf(const float x, int *pw2);
- float ldexpf(const float x, const int pw2);
- float ceilf(float x) _FLOAT_FUNC_REENTRANT;
- float floorf(float x) _FLOAT_FUNC_REENTRANT;
- float modff(float x, float * y);
- #endif
|