64d9800f1f1c417ea0488c2e27ed794e37649c44
[platform/upstream/glib.git] / docs / reference / glib / tmpl / numerical.sgml
1 <!-- ##### SECTION Title ##### -->
2 Numerical Definitions
3
4 <!-- ##### SECTION Short_Description ##### -->
5 mathematical constants, and floating point decomposition
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 GLib offers mathematical constants such as #G_PI for the value of pi;
10 many platforms have these in the C library, but some don't, the GLib
11 versions always exist.
12 </para>
13
14 <para>
15 The #GFloatIEEE754 and #GDoubleIEEE754 unions are used to access the
16         sign, mantissa and exponent of IEEE floats and doubles. These
17         unions are defined as appropriate for a given platform. 
18  IEEE floats and doubles are supported (used for
19         storage) by at least Intel, PPC and Sparc, for reference: <ulink url="http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html">http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html</ulink>
20 </para>
21
22 <!-- ##### SECTION See_Also ##### -->
23 <para>
24 <ulink url="http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html">http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html</ulink>
25 </para>
26
27 <!-- ##### SECTION Stability_Level ##### -->
28
29
30 <!-- ##### SECTION Image ##### -->
31
32
33 <!-- ##### MACRO G_IEEE754_FLOAT_BIAS ##### -->
34 <para>
35 See <ulink url="http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html">http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html</ulink>
36 </para>
37
38
39
40 <!-- ##### MACRO G_IEEE754_DOUBLE_BIAS ##### -->
41 <para>
42 See <ulink url="http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html">http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html</ulink>
43 </para>
44
45
46
47 <!-- ##### UNION GFloatIEEE754 ##### -->
48 <para>
49 The #GFloatIEEE754 and #GDoubleIEEE754 unions are used to access the
50         sign, mantissa and exponent of IEEE floats and doubles. These
51         unions are defined as appropriate for a given platform. 
52  IEEE floats and doubles are supported (used for
53         storage) by at least Intel, PPC and Sparc, for reference: 
54 <ulink url="http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html">http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html</ulink>
55 </para>
56
57
58 <!-- ##### UNION GDoubleIEEE754 ##### -->
59 <para>
60 The #GFloatIEEE754 and #GDoubleIEEE754 unions are used to access the
61         sign, mantissa and exponent of IEEE floats and doubles. These
62         unions are defined as appropriate for a given platform. 
63  IEEE floats and doubles are supported (used for
64         storage) by at least Intel, PPC and Sparc, for reference: 
65 <ulink url="http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html">http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html</ulink>
66 </para>
67
68
69 <!-- ##### MACRO G_E ##### -->
70 <para>
71 The base of natural logarithms.
72 </para>
73
74
75
76 <!-- ##### MACRO G_LN2 ##### -->
77 <para>
78 The natural logarithm of 2.
79 </para>
80
81
82
83 <!-- ##### MACRO G_LN10 ##### -->
84 <para>
85 The natural logarithm of 10.
86 </para>
87
88
89
90 <!-- ##### MACRO G_PI ##### -->
91 <para>
92 The value of pi (ratio of circle's circumference to its diameter).
93 </para>
94
95
96
97 <!-- ##### MACRO G_PI_2 ##### -->
98 <para>
99 Pi divided by 2.
100 </para>
101
102
103
104 <!-- ##### MACRO G_PI_4 ##### -->
105 <para>
106 Pi divided by 4.
107 </para>
108
109
110
111 <!-- ##### MACRO G_SQRT2 ##### -->
112 <para>
113 The square root of two.
114 </para>
115
116
117
118 <!-- ##### MACRO G_LOG_2_BASE_10 ##### -->
119 <para>
120 Used for fooling around with float formats, see 
121 <ulink url="http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html">http://cch.loria.fr/documentation/IEEE754/numerical_comp_guide/ncg_math.doc.html</ulink>
122 </para>
123
124
125