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