0cf81b23ff32b1825bfcc4f20bffdcdc75d61cb4
[fw/sdcc] / doc / SDCCUdoc-15.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2 <HTML>
3 <HEAD>
4  <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.7">
5  <TITLE>SDCC Compiler User Guide: Floating point support</TITLE>
6  <LINK HREF="SDCCUdoc-16.html" REL=next>
7  <LINK HREF="SDCCUdoc-14.html" REL=previous>
8  <LINK HREF="SDCCUdoc.html#toc15" REL=contents>
9 </HEAD>
10 <BODY>
11 <A HREF="SDCCUdoc-16.html">Next</A>
12 <A HREF="SDCCUdoc-14.html">Previous</A>
13 <A HREF="SDCCUdoc.html#toc15">Contents</A>
14 <HR>
15 <H2><A NAME="Float"></A> <A NAME="s15">15. Floating point support</A> </H2>
16
17 <P>SDCC supports IEEE (single precision 4bytes) floating point numbers.The
18 floating point support routines are derived from gcc's floatlib.c and consists
19 of the following routines. 
20 <P>
21 <UL>
22 <LI>_fsadd.c - add floating point numbers.</LI>
23 <LI>_fssub.c - subtract floating point numbers</LI>
24 <LI>_fsdiv.c - divide floating point numbers</LI>
25 <LI>_fsmul.c - multiply floating point numbers</LI>
26 <LI>_fs2uchar.c - convert floating point to unsigned char</LI>
27 <LI>_fs2char.c - convert floating point to signed char.</LI>
28 <LI>_fs2uint.c - convert floating point to unsigned int.</LI>
29 <LI>_fs2int.c - convert floating point to signed int.</LI>
30 <LI>_fs2ulong.c - convert floating point to unsigned long.</LI>
31 <LI>_fs2long.c - convert floating point to signed long.</LI>
32 <LI>_uchar2fs.c - convert unsigned char to floating point</LI>
33 <LI>_char2fs.c - convert char to floating point number</LI>
34 <LI>_uint2fs.c - convert unsigned int to floating point</LI>
35 <LI>_int2fs.c - convert int to floating point numbers</LI>
36 <LI>_ulong2fs.c - convert unsigned long to floating point number</LI>
37 <LI>_long2fs.c - convert long to floating point number.</LI>
38 </UL>
39 <P>Note if all these routines are used simultaneously the data space might
40 overflow. For serious floating point usage it is strongly recommended that
41 the Large model be used (in which case the floating point routines mentioned
42 above will need to recompiled with the --model-Large option)
43 <HR>
44 <A HREF="SDCCUdoc-16.html">Next</A>
45 <A HREF="SDCCUdoc-14.html">Previous</A>
46 <A HREF="SDCCUdoc.html#toc15">Contents</A>
47 </BODY>
48 </HTML>