~ubuntu-branches/debian/squeeze/glib2.0/squeeze

« back to all changes in this revision

Viewing changes to docs/reference/glib/html/glib-Numerical-Definitions.html

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2009-02-15 13:00:43 UTC
  • mfrom: (1.3.1 upstream) (69.1.10 intrepid)
  • Revision ID: james.westby@ubuntu.com-20090215130043-q47fbt3owmt42m2f
Tags: 2.18.4-2
* Release to unstable
* debian/rules:
- bump SHVER, since we are already forcing a 2.18.0 dependecy on the
  symbols introduced in the development versions
* debian/control.in:
- added Homepage and Vcs-* control fields

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
2
<html>
3
3
<head>
4
 
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>Numerical Definitions</title>
6
 
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
7
 
<link rel="start" href="index.html" title="GLib Reference Manual">
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 
7
<link rel="home" href="index.html" title="GLib Reference Manual">
8
8
<link rel="up" href="glib-fundamentals.html" title="GLib Fundamentals">
9
9
<link rel="prev" href="glib-Byte-Order-Macros.html" title="Byte Order Macros">
10
10
<link rel="next" href="glib-Miscellaneous-Macros.html" title="Miscellaneous Macros">
11
 
<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
 
11
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
<link rel="chapter" href="glib.html" title="GLib Overview">
14
14
<link rel="chapter" href="glib-fundamentals.html" title="GLib Fundamentals">
26
26
<link rel="index" href="ix08.html" title="Index of new symbols in 2.12">
27
27
<link rel="index" href="ix09.html" title="Index of new symbols in 2.14">
28
28
<link rel="index" href="ix10.html" title="Index of new symbols in 2.16">
 
29
<link rel="index" href="ix11.html" title="Index of new symbols in 2.18">
29
30
</head>
30
31
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
31
32
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
36
37
<th width="100%" align="center">GLib Reference Manual</th>
37
38
<td><a accesskey="n" href="glib-Miscellaneous-Macros.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
38
39
</tr>
39
 
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2899930" class="shortcut">Top</a>
40
 
                  &#160;|&#160;
41
 
                  <a href="#id2900046" class="shortcut">Description</a></nobr></td></tr>
 
40
<tr><td colspan="5" class="shortcuts">
 
41
<a href="#glib-Numerical-Definitions.synopsis" class="shortcut">Top</a>
 
42
                 | 
 
43
                <a href="#glib-Numerical-Definitions.description" class="shortcut">Description</a>
 
44
</td></tr>
42
45
</table>
43
46
<div class="refentry" lang="en">
44
47
<a name="glib-Numerical-Definitions"></a><div class="titlepage"></div>
45
48
<div class="refnamediv"><table width="100%"><tr>
46
49
<td valign="top">
47
 
<h2>
48
 
<a name="id2899930"></a><span class="refentrytitle">Numerical Definitions</span>
49
 
</h2>
50
 
<p>Numerical Definitions &#8212; mathematical constants, and floating point decomposition</p>
 
50
<h2><span class="refentrytitle"><a name="glib-Numerical-Definitions.top_of_page"></a>Numerical Definitions</span></h2>
 
51
<p>Numerical Definitions — mathematical constants, and floating point decomposition</p>
51
52
</td>
52
53
<td valign="top" align="right"></td>
53
54
</tr></table></div>
54
55
<div class="refsynopsisdiv">
55
 
<h2>Synopsis</h2>
 
56
<a name="glib-Numerical-Definitions.synopsis"></a><h2>Synopsis</h2>
56
57
<pre class="synopsis">
57
58
 
58
59
#include &lt;glib.h&gt;
59
60
 
60
 
 
61
 
#define             <a class="link" href="glib-Numerical-Definitions.html#G-IEEE754-FLOAT-BIAS:CAPS">G_IEEE754_FLOAT_BIAS</a>
62
 
#define             <a class="link" href="glib-Numerical-Definitions.html#G-IEEE754-DOUBLE-BIAS:CAPS">G_IEEE754_DOUBLE_BIAS</a>
63
 
union               <a class="link" href="glib-Numerical-Definitions.html#GFloatIEEE754">GFloatIEEE754</a>;
64
 
union               <a class="link" href="glib-Numerical-Definitions.html#GDoubleIEEE754">GDoubleIEEE754</a>;
65
 
 
66
 
 
67
 
#define             <a class="link" href="glib-Numerical-Definitions.html#G-E:CAPS">G_E</a>
68
 
#define             <a class="link" href="glib-Numerical-Definitions.html#G-LN2:CAPS">G_LN2</a>
69
 
#define             <a class="link" href="glib-Numerical-Definitions.html#G-LN10:CAPS">G_LN10</a>
70
 
#define             <a class="link" href="glib-Numerical-Definitions.html#G-PI:CAPS">G_PI</a>
71
 
#define             <a class="link" href="glib-Numerical-Definitions.html#G-PI-2:CAPS">G_PI_2</a>
72
 
#define             <a class="link" href="glib-Numerical-Definitions.html#G-PI-4:CAPS">G_PI_4</a>
73
 
#define             <a class="link" href="glib-Numerical-Definitions.html#G-SQRT2:CAPS">G_SQRT2</a>
74
 
#define             <a class="link" href="glib-Numerical-Definitions.html#G-LOG-2-BASE-10:CAPS">G_LOG_2_BASE_10</a>
 
61
#define             <a class="link" href="glib-Numerical-Definitions.html#G-IEEE754-FLOAT-BIAS--CAPS" title="G_IEEE754_FLOAT_BIAS">G_IEEE754_FLOAT_BIAS</a>
 
62
#define             <a class="link" href="glib-Numerical-Definitions.html#G-IEEE754-DOUBLE-BIAS--CAPS" title="G_IEEE754_DOUBLE_BIAS">G_IEEE754_DOUBLE_BIAS</a>
 
63
union               <a class="link" href="glib-Numerical-Definitions.html#GFloatIEEE754" title="union GFloatIEEE754">GFloatIEEE754</a>;
 
64
union               <a class="link" href="glib-Numerical-Definitions.html#GDoubleIEEE754" title="union GDoubleIEEE754">GDoubleIEEE754</a>;
 
65
 
 
66
 
 
67
#define             <a class="link" href="glib-Numerical-Definitions.html#G-E--CAPS" title="G_E">G_E</a>
 
68
#define             <a class="link" href="glib-Numerical-Definitions.html#G-LN2--CAPS" title="G_LN2">G_LN2</a>
 
69
#define             <a class="link" href="glib-Numerical-Definitions.html#G-LN10--CAPS" title="G_LN10">G_LN10</a>
 
70
#define             <a class="link" href="glib-Numerical-Definitions.html#G-PI--CAPS" title="G_PI">G_PI</a>
 
71
#define             <a class="link" href="glib-Numerical-Definitions.html#G-PI-2--CAPS" title="G_PI_2">G_PI_2</a>
 
72
#define             <a class="link" href="glib-Numerical-Definitions.html#G-PI-4--CAPS" title="G_PI_4">G_PI_4</a>
 
73
#define             <a class="link" href="glib-Numerical-Definitions.html#G-SQRT2--CAPS" title="G_SQRT2">G_SQRT2</a>
 
74
#define             <a class="link" href="glib-Numerical-Definitions.html#G-LOG-2-BASE-10--CAPS" title="G_LOG_2_BASE_10">G_LOG_2_BASE_10</a>
75
75
</pre>
76
76
</div>
77
77
<div class="refsect1" lang="en">
78
 
<a name="id2900046"></a><h2>Description</h2>
 
78
<a name="glib-Numerical-Definitions.description"></a><h2>Description</h2>
79
79
<p>
80
 
GLib offers mathematical constants such as <a class="link" href="glib-Numerical-Definitions.html#G-PI:CAPS"><span class="type">G_PI</span></a> for the value of pi;
 
80
GLib offers mathematical constants such as <a class="link" href="glib-Numerical-Definitions.html#G-PI--CAPS" title="G_PI"><span class="type">G_PI</span></a> for the value of pi;
81
81
many platforms have these in the C library, but some don't, the GLib
82
82
versions always exist.
83
83
</p>
84
84
<p>
85
 
The <a class="link" href="glib-Numerical-Definitions.html#GFloatIEEE754"><span class="type">GFloatIEEE754</span></a> and <a class="link" href="glib-Numerical-Definitions.html#GDoubleIEEE754"><span class="type">GDoubleIEEE754</span></a> unions are used to access the
 
85
The <a class="link" href="glib-Numerical-Definitions.html#GFloatIEEE754" title="union GFloatIEEE754"><span class="type">GFloatIEEE754</span></a> and <a class="link" href="glib-Numerical-Definitions.html#GDoubleIEEE754" title="union GDoubleIEEE754"><span class="type">GDoubleIEEE754</span></a> unions are used to access the
86
86
        sign, mantissa and exponent of IEEE floats and doubles. These
87
 
        unions are defined as appropriate for a given platform. 
 
87
        unions are defined as appropriate for a given platform.
88
88
 IEEE floats and doubles are supported (used for
89
89
        storage) by at least Intel, PPC and Sparc, for reference: <a class="ulink" href="http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html" target="_top">http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html</a>
90
90
</p>
91
91
</div>
92
92
<div class="refsect1" lang="en">
93
 
<a name="id2900104"></a><h2>Details</h2>
94
 
<div class="refsect2" lang="en">
95
 
<a name="id2900114"></a><h3>
96
 
<a name="G-IEEE754-FLOAT-BIAS:CAPS"></a>G_IEEE754_FLOAT_BIAS</h3>
97
 
<a class="indexterm" name="id2900127"></a><pre class="programlisting">#define G_IEEE754_FLOAT_BIAS      (127)
98
 
</pre>
99
 
<p>
100
 
See <a class="ulink" href="http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html" target="_top">http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html</a>
101
 
</p>
102
 
</div>
103
 
<hr>
104
 
<div class="refsect2" lang="en">
105
 
<a name="id2900151"></a><h3>
106
 
<a name="G-IEEE754-DOUBLE-BIAS:CAPS"></a>G_IEEE754_DOUBLE_BIAS</h3>
107
 
<a class="indexterm" name="id2900164"></a><pre class="programlisting">#define G_IEEE754_DOUBLE_BIAS     (1023)
108
 
</pre>
109
 
<p>
110
 
See <a class="ulink" href="http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html" target="_top">http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html</a>
111
 
</p>
112
 
</div>
113
 
<hr>
114
 
<div class="refsect2" lang="en">
115
 
<a name="id2900188"></a><h3>
116
 
<a name="GFloatIEEE754"></a>union GFloatIEEE754</h3>
117
 
<a class="indexterm" name="id2900200"></a><pre class="programlisting">union GFloatIEEE754
 
93
<a name="glib-Numerical-Definitions.details"></a><h2>Details</h2>
 
94
<div class="refsect2" lang="en">
 
95
<a name="G-IEEE754-FLOAT-BIAS--CAPS"></a><h3>G_IEEE754_FLOAT_BIAS</h3>
 
96
<pre class="programlisting">#define G_IEEE754_FLOAT_BIAS        (127)
 
97
</pre>
 
98
<p>
 
99
See <a class="ulink" href="http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html" target="_top">http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html</a>
 
100
</p>
 
101
</div>
 
102
<hr>
 
103
<div class="refsect2" lang="en">
 
104
<a name="G-IEEE754-DOUBLE-BIAS--CAPS"></a><h3>G_IEEE754_DOUBLE_BIAS</h3>
 
105
<pre class="programlisting">#define G_IEEE754_DOUBLE_BIAS       (1023)
 
106
</pre>
 
107
<p>
 
108
See <a class="ulink" href="http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html" target="_top">http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html</a>
 
109
</p>
 
110
</div>
 
111
<hr>
 
112
<div class="refsect2" lang="en">
 
113
<a name="GFloatIEEE754"></a><h3>union GFloatIEEE754</h3>
 
114
<pre class="programlisting">union GFloatIEEE754
118
115
{
119
116
  gfloat v_float;
120
117
  struct {
125
122
};
126
123
</pre>
127
124
<p>
128
 
The <a class="link" href="glib-Numerical-Definitions.html#GFloatIEEE754"><span class="type">GFloatIEEE754</span></a> and <a class="link" href="glib-Numerical-Definitions.html#GDoubleIEEE754"><span class="type">GDoubleIEEE754</span></a> unions are used to access the
 
125
The <a class="link" href="glib-Numerical-Definitions.html#GFloatIEEE754" title="union GFloatIEEE754"><span class="type">GFloatIEEE754</span></a> and <a class="link" href="glib-Numerical-Definitions.html#GDoubleIEEE754" title="union GDoubleIEEE754"><span class="type">GDoubleIEEE754</span></a> unions are used to access the
129
126
        sign, mantissa and exponent of IEEE floats and doubles. These
130
 
        unions are defined as appropriate for a given platform. 
 
127
        unions are defined as appropriate for a given platform.
131
128
 IEEE floats and doubles are supported (used for
132
 
        storage) by at least Intel, PPC and Sparc, for reference: 
 
129
        storage) by at least Intel, PPC and Sparc, for reference:
133
130
<a class="ulink" href="http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html" target="_top">http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html</a>
134
131
</p>
135
132
</div>
136
133
<hr>
137
134
<div class="refsect2" lang="en">
138
 
<a name="id2900247"></a><h3>
139
 
<a name="GDoubleIEEE754"></a>union GDoubleIEEE754</h3>
140
 
<a class="indexterm" name="id2900260"></a><pre class="programlisting">union GDoubleIEEE754
 
135
<a name="GDoubleIEEE754"></a><h3>union GDoubleIEEE754</h3>
 
136
<pre class="programlisting">union GDoubleIEEE754
141
137
{
142
138
  gdouble v_double;
143
139
  struct {
149
145
};
150
146
</pre>
151
147
<p>
152
 
The <a class="link" href="glib-Numerical-Definitions.html#GFloatIEEE754"><span class="type">GFloatIEEE754</span></a> and <a class="link" href="glib-Numerical-Definitions.html#GDoubleIEEE754"><span class="type">GDoubleIEEE754</span></a> unions are used to access the
 
148
The <a class="link" href="glib-Numerical-Definitions.html#GFloatIEEE754" title="union GFloatIEEE754"><span class="type">GFloatIEEE754</span></a> and <a class="link" href="glib-Numerical-Definitions.html#GDoubleIEEE754" title="union GDoubleIEEE754"><span class="type">GDoubleIEEE754</span></a> unions are used to access the
153
149
        sign, mantissa and exponent of IEEE floats and doubles. These
154
 
        unions are defined as appropriate for a given platform. 
 
150
        unions are defined as appropriate for a given platform.
155
151
 IEEE floats and doubles are supported (used for
156
 
        storage) by at least Intel, PPC and Sparc, for reference: 
 
152
        storage) by at least Intel, PPC and Sparc, for reference:
157
153
<a class="ulink" href="http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html" target="_top">http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html</a>
158
154
</p>
159
155
</div>
160
156
<hr>
161
157
<div class="refsect2" lang="en">
162
 
<a name="id2900307"></a><h3>
163
 
<a name="G-E:CAPS"></a>G_E</h3>
164
 
<a class="indexterm" name="id2900319"></a><pre class="programlisting">#define G_E     2.7182818284590452353602874713526624977572470937000
 
158
<a name="G-E--CAPS"></a><h3>G_E</h3>
 
159
<pre class="programlisting">#define G_E     2.7182818284590452353602874713526624977572470937000
165
160
</pre>
166
161
<p>
167
162
The base of natural logarithms.
169
164
</div>
170
165
<hr>
171
166
<div class="refsect2" lang="en">
172
 
<a name="id2900335"></a><h3>
173
 
<a name="G-LN2:CAPS"></a>G_LN2</h3>
174
 
<a class="indexterm" name="id2900347"></a><pre class="programlisting">#define G_LN2   0.69314718055994530941723212145817656807550013436026
 
167
<a name="G-LN2--CAPS"></a><h3>G_LN2</h3>
 
168
<pre class="programlisting">#define G_LN2   0.69314718055994530941723212145817656807550013436026
175
169
</pre>
176
170
<p>
177
171
The natural logarithm of 2.
179
173
</div>
180
174
<hr>
181
175
<div class="refsect2" lang="en">
182
 
<a name="id2900363"></a><h3>
183
 
<a name="G-LN10:CAPS"></a>G_LN10</h3>
184
 
<a class="indexterm" name="id2900376"></a><pre class="programlisting">#define G_LN10  2.3025850929940456840179914546843642076011014886288
 
176
<a name="G-LN10--CAPS"></a><h3>G_LN10</h3>
 
177
<pre class="programlisting">#define G_LN10  2.3025850929940456840179914546843642076011014886288
185
178
</pre>
186
179
<p>
187
180
The natural logarithm of 10.
189
182
</div>
190
183
<hr>
191
184
<div class="refsect2" lang="en">
192
 
<a name="id2900392"></a><h3>
193
 
<a name="G-PI:CAPS"></a>G_PI</h3>
194
 
<a class="indexterm" name="id2900405"></a><pre class="programlisting">#define G_PI    3.1415926535897932384626433832795028841971693993751
 
185
<a name="G-PI--CAPS"></a><h3>G_PI</h3>
 
186
<pre class="programlisting">#define G_PI    3.1415926535897932384626433832795028841971693993751
195
187
</pre>
196
188
<p>
197
189
The value of pi (ratio of circle's circumference to its diameter).
199
191
</div>
200
192
<hr>
201
193
<div class="refsect2" lang="en">
202
 
<a name="id2900422"></a><h3>
203
 
<a name="G-PI-2:CAPS"></a>G_PI_2</h3>
204
 
<a class="indexterm" name="id2900435"></a><pre class="programlisting">#define G_PI_2  1.5707963267948966192313216916397514420985846996876
 
194
<a name="G-PI-2--CAPS"></a><h3>G_PI_2</h3>
 
195
<pre class="programlisting">#define G_PI_2  1.5707963267948966192313216916397514420985846996876
205
196
</pre>
206
197
<p>
207
198
Pi divided by 2.
209
200
</div>
210
201
<hr>
211
202
<div class="refsect2" lang="en">
212
 
<a name="id2900451"></a><h3>
213
 
<a name="G-PI-4:CAPS"></a>G_PI_4</h3>
214
 
<a class="indexterm" name="id2900463"></a><pre class="programlisting">#define G_PI_4  0.78539816339744830961566084581987572104929234984378
 
203
<a name="G-PI-4--CAPS"></a><h3>G_PI_4</h3>
 
204
<pre class="programlisting">#define G_PI_4  0.78539816339744830961566084581987572104929234984378
215
205
</pre>
216
206
<p>
217
207
Pi divided by 4.
219
209
</div>
220
210
<hr>
221
211
<div class="refsect2" lang="en">
222
 
<a name="id2900479"></a><h3>
223
 
<a name="G-SQRT2:CAPS"></a>G_SQRT2</h3>
224
 
<a class="indexterm" name="id2900492"></a><pre class="programlisting">#define G_SQRT2 1.4142135623730950488016887242096980785696718753769
 
212
<a name="G-SQRT2--CAPS"></a><h3>G_SQRT2</h3>
 
213
<pre class="programlisting">#define G_SQRT2 1.4142135623730950488016887242096980785696718753769
225
214
</pre>
226
215
<p>
227
216
The square root of two.
229
218
</div>
230
219
<hr>
231
220
<div class="refsect2" lang="en">
232
 
<a name="id2900508"></a><h3>
233
 
<a name="G-LOG-2-BASE-10:CAPS"></a>G_LOG_2_BASE_10</h3>
234
 
<a class="indexterm" name="id2900522"></a><pre class="programlisting">#define G_LOG_2_BASE_10           (0.30102999566398119521)
 
221
<a name="G-LOG-2-BASE-10--CAPS"></a><h3>G_LOG_2_BASE_10</h3>
 
222
<pre class="programlisting">#define G_LOG_2_BASE_10             (0.30102999566398119521)
235
223
</pre>
236
224
<p>
237
 
Used for fooling around with float formats, see 
 
225
Used for fooling around with float formats, see
238
226
<a class="ulink" href="http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html" target="_top">http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html</a>
239
227
</p>
240
228
</div>
241
229
</div>
242
230
<div class="refsect1" lang="en">
243
 
<a name="id2900547"></a><h2>See Also</h2>
 
231
<a name="glib-Numerical-Definitions.see-also"></a><h2>See Also</h2>
244
232
<p>
245
233
<a class="ulink" href="http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html" target="_top">http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html</a>
246
234
</p>
247
235
</div>
248
 
<div class="refsect1" lang="en">
249
 
<a name="id2900565"></a><div class="refsect2" lang="en"><a name="id2900566"></a></div>
 
236
</div>
 
237
<div class="footer">
250
238
<hr>
251
 
<div class="refsect2" lang="en"><a name="id2900568"></a></div>
252
 
</div>
253
 
</div>
 
239
          Generated by GTK-Doc V1.11</div>
254
240
</body>
255
241
</html>