• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/toolchains/hndtools-armeabi-2011.09/share/doc/arm-arm-none-eabi/html/gcc/
1<html lang="en">
2<head>
3<title>Floating point implementation - Using the GNU Compiler Collection (GCC)</title>
4<meta http-equiv="Content-Type" content="text/html">
5<meta name="description" content="Using the GNU Compiler Collection (GCC)">
6<meta name="generator" content="makeinfo 4.13">
7<link title="Top" rel="start" href="index.html#Top">
8<link rel="up" href="C-Implementation.html#C-Implementation" title="C Implementation">
9<link rel="prev" href="Integers-implementation.html#Integers-implementation" title="Integers implementation">
10<link rel="next" href="Arrays-and-pointers-implementation.html#Arrays-and-pointers-implementation" title="Arrays and pointers implementation">
11<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
12<!--
13Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
141998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
152010 Free Software Foundation, Inc.
16
17Permission is granted to copy, distribute and/or modify this document
18under the terms of the GNU Free Documentation License, Version 1.3 or
19any later version published by the Free Software Foundation; with the
20Invariant Sections being ``Funding Free Software'', the Front-Cover
21Texts being (a) (see below), and with the Back-Cover Texts being (b)
22(see below).  A copy of the license is included in the section entitled
23``GNU Free Documentation License''.
24
25(a) The FSF's Front-Cover Text is:
26
27     A GNU Manual
28
29(b) The FSF's Back-Cover Text is:
30
31     You have freedom to copy and modify this GNU Manual, like GNU
32     software.  Copies published by the Free Software Foundation raise
33     funds for GNU development.-->
34<meta http-equiv="Content-Style-Type" content="text/css">
35<style type="text/css"><!--
36  pre.display { font-family:inherit }
37  pre.format  { font-family:inherit }
38  pre.smalldisplay { font-family:inherit; font-size:smaller }
39  pre.smallformat  { font-family:inherit; font-size:smaller }
40  pre.smallexample { font-size:smaller }
41  pre.smalllisp    { font-size:smaller }
42  span.sc    { font-variant:small-caps }
43  span.roman { font-family:serif; font-weight:normal; } 
44  span.sansserif { font-family:sans-serif; font-weight:normal; } 
45--></style>
46<link rel="stylesheet" type="text/css" href="../cs.css">
47</head>
48<body>
49<div class="node">
50<a name="Floating-point-implementation"></a>
51<p>
52Next:&nbsp;<a rel="next" accesskey="n" href="Arrays-and-pointers-implementation.html#Arrays-and-pointers-implementation">Arrays and pointers implementation</a>,
53Previous:&nbsp;<a rel="previous" accesskey="p" href="Integers-implementation.html#Integers-implementation">Integers implementation</a>,
54Up:&nbsp;<a rel="up" accesskey="u" href="C-Implementation.html#C-Implementation">C Implementation</a>
55<hr>
56</div>
57
58<h3 class="section">4.6 Floating point</h3>
59
60     <ul>
61<li><cite>The accuracy of the floating-point operations and of the library
62functions in </cite><code>&lt;math.h&gt;</code><cite> and </cite><code>&lt;complex.h&gt;</code><cite> that return floating-point
63results (C90 and C99 5.2.4.2.2).</cite>
64
65     <p>The accuracy is unknown.
66
67     <li><cite>The rounding behaviors characterized by non-standard values
68of </cite><code>FLT_ROUNDS</code><cite> 
69(C90 and C99 5.2.4.2.2).</cite>
70
71     <p>GCC does not use such values.
72
73     <li><cite>The evaluation methods characterized by non-standard negative
74values of </cite><code>FLT_EVAL_METHOD</code><cite> (C99 5.2.4.2.2).</cite>
75
76     <p>GCC does not use such values.
77
78     <li><cite>The direction of rounding when an integer is converted to a
79floating-point number that cannot exactly represent the original
80value (C90 6.2.1.3, C99 6.3.1.4).</cite>
81
82     <p>C99 Annex F is followed.
83
84     <li><cite>The direction of rounding when a floating-point number is
85converted to a narrower floating-point number (C90 6.2.1.4, C99
866.3.1.5).</cite>
87
88     <p>C99 Annex F is followed.
89
90     <li><cite>How the nearest representable value or the larger or smaller
91representable value immediately adjacent to the nearest representable
92value is chosen for certain floating constants (C90 6.1.3.1, C99
936.4.4.2).</cite>
94
95     <p>C99 Annex F is followed.
96
97     <li><cite>Whether and how floating expressions are contracted when not
98disallowed by the </cite><code>FP_CONTRACT</code><cite> pragma (C99 6.5).</cite>
99
100     <p>Expressions are currently only contracted if
101<samp><span class="option">-funsafe-math-optimizations</span></samp> or <samp><span class="option">-ffast-math</span></samp> are used. 
102This is subject to change.
103
104     <li><cite>The default state for the </cite><code>FENV_ACCESS</code><cite> pragma (C99 7.6.1).</cite>
105
106     <p>This pragma is not implemented, but the default is to &ldquo;off&rdquo; unless
107<samp><span class="option">-frounding-math</span></samp> is used in which case it is &ldquo;on&rdquo;.
108
109     <li><cite>Additional floating-point exceptions, rounding modes, environments,
110and classifications, and their macro names (C99 7.6, C99 7.12).</cite>
111
112     <p>This is dependent on the implementation of the C library, and is not
113defined by GCC itself.
114
115     <li><cite>The default state for the </cite><code>FP_CONTRACT</code><cite> pragma (C99 7.12.2).</cite>
116
117     <p>This pragma is not implemented.  Expressions are currently only
118contracted if <samp><span class="option">-funsafe-math-optimizations</span></samp> or
119<samp><span class="option">-ffast-math</span></samp> are used.  This is subject to change.
120
121     <li><cite>Whether the &ldquo;inexact&rdquo; floating-point exception can be raised
122when the rounded result actually does equal the mathematical result
123in an IEC 60559 conformant implementation (C99 F.9).</cite>
124
125     <p>This is dependent on the implementation of the C library, and is not
126defined by GCC itself.
127
128     <li><cite>Whether the &ldquo;underflow&rdquo; (and &ldquo;inexact&rdquo;) floating-point
129exception can be raised when a result is tiny but not inexact in an
130IEC 60559 conformant implementation (C99 F.9).</cite>
131
132     <p>This is dependent on the implementation of the C library, and is not
133defined by GCC itself.
134
135</ul>
136
137 </body></html>
138
139