next up previous contents index
Next: 3.16 MCS51 Memory Models Up: 3. Using SDCC Previous: 3.14 int(16 bit) and   Contents   Index

3.15 Floating Point Support

SDCC supports IEEE (single precision 4bytes) floating point numbers.The floating point support routines are derived from gcc's floatlib.c and consists of the following routines:

<pending: tabularise this>

_fsadd.c - add floating point numbers
_fssub.c - subtract floating point numbers
_fsdiv.c - divide floating point numbers
_fsmul.c - multiply floating point numbers
_fs2uchar.c - convert floating point to unsigned char
_fs2char.c - convert floating point to signed char
_fs2uint.c - convert floating point to unsigned int
_fs2int.c - convert floating point to signed int
_fs2ulong.c - convert floating point to unsigned long
_fs2long.c - convert floating point to signed long
_uchar2fs.c - convert unsigned char to floating point
_char2fs.c - convert char to floating point number
_uint2fs.c - convert unsigned int to floating point
_int2fs.c - convert int to floating point numbers
_ulong2fs.c - convert unsigned long to floating point number
_long2fs.c - convert long to floating point number

Note if all these routines are used simultaneously the data space might overflow. For serious floating point usage it is strongly recommended that the large model be used.


next up previous contents index
Next: 3.16 MCS51 Memory Models Up: 3. Using SDCC Previous: 3.14 int(16 bit) and   Contents   Index
Johan Knol
2001-07-13