123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- #ifndef __SDC51_FLOAT_H
- #define __SDC51_FLOAT_H 1
- #include <limits.h>
- #define FLT_RADIX 2
- #define FLT_MANT_DIG 24
- #define FLT_EPSILON 1.192092896E-07F
- #define FLT_DIG 6
- #define FLT_MIN_EXP (-125)
- #define FLT_MIN 1.175494351E-38F
- #define FLT_MIN_10_EXP (-37)
- #define FLT_MAX_EXP (+128)
- #define FLT_MAX 3.402823466E+38F
- #define FLT_MAX_10_EXP (+38)
- #define EXCESS 126
- #define SIGNBIT ((unsigned long)0x80000000)
- #define __INFINITY ((unsigned long)0x7F800000)
- #define HIDDEN (unsigned long)(1ul << 23)
- #define SIGN(fp) (((unsigned long)(fp) >> (8*sizeof(fp)-1)) & 1)
- #define EXP(fp) (((unsigned long)(fp) >> 23) & (unsigned int) 0x00FF)
- #define MANT(fp) (((fp) & (unsigned long)0x007FFFFF) | HIDDEN)
- #define NORM 0xff000000
- #define PACK(s,e,m) ((s) | ((unsigned long)(e) << 23) | (m))
- float __uchar2fs (unsigned char);
- float __schar2fs (signed char);
- float __uint2fs (unsigned int);
- float __sint2fs (signed int);
- float __ulong2fs (unsigned long);
- float __slong2fs (signed long);
- unsigned char __fs2uchar (float);
- signed char __fs2schar (float);
- unsigned int __fs2uint (float);
- signed int __fs2sint (float);
- unsigned long __fs2ulong (float);
- signed long __fs2slong (float);
- float __fsadd (float, float);
- float __fssub (float, float);
- float __fsmul (float, float);
- float __fsdiv (float, float);
- char __fslt (float, float);
- char __fseq (float, float);
- char __fsgt (float, float);
- #if defined(__SDCC_FLOAT_LIB) && defined(__SDCC_mcs51) && !defined(__SDCC_USE_XSTACK) && !defined(_SDCC_NO_ASM_LIB_FUNCS)
- #define FLOAT_ASM_MCS51
- #define FLOAT_FULL_ACCURACY
- #define FLOAT_SHIFT_SPEEDUP
- #define sign_a psw.1
- #define sign_b psw.5
- #define exp_a dpl
- #define exp_b dph
- #endif /* using mcs51 assembly */
- #endif /* __SDC51_FLOAT_H */
|