1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
6 Mathematical constants, and floating point decomposition.
8 <!-- ##### SECTION Long_Description ##### -->
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.
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: <ulink url="http://twister.ou.edu/workshop.docs/common-tools/numerical_comp_guide/ncg_math.doc.html">http://twister.ou.edu/workshop.docs/common-tools/numerical_comp_guide/ncg_math.doc.html</ulink>
23 <!-- ##### SECTION See_Also ##### -->
25 <ulink url="http://twister.ou.edu/workshop.docs/common-tools/numerical_comp_guide/ncg_math.doc.html">http://twister.ou.edu/workshop.docs/common-tools/numerical_comp_guide/ncg_math.doc.html</ulink>
28 <!-- ##### MACRO G_IEEE754_FLOAT_BIAS ##### -->
30 See <ulink url="http://twister.ou.edu/workshop.docs/common-tools/numerical_comp_guide/ncg_math.doc.html">http://twister.ou.edu/workshop.docs/common-tools/numerical_comp_guide/ncg_math.doc.html</ulink>
35 <!-- ##### MACRO G_IEEE754_DOUBLE_BIAS ##### -->
37 See <ulink url="http://twister.ou.edu/workshop.docs/common-tools/numerical_comp_guide/ncg_math.doc.html">http://twister.ou.edu/workshop.docs/common-tools/numerical_comp_guide/ncg_math.doc.html</ulink>
42 <!-- ##### UNION GFloatIEEE754 ##### -->
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:
49 <ulink url="http://twister.ou.edu/workshop.docs/common-tools/numerical_comp_guide/ncg_math.doc.html">http://twister.ou.edu/workshop.docs/common-tools/numerical_comp_guide/ncg_math.doc.html</ulink>
53 <!-- ##### UNION GDoubleIEEE754 ##### -->
55 The #GFloatIEEE754 and #GDoubleIEEE754 unions are used to access the
56 sign, mantissa and exponent of IEEE floats and doubles. These
57 unions are defined as appropriate for a given platform.
58 IEEE floats and doubles are supported (used for
59 storage) by at least intel, ppc and sparc, for reference:
60 <ulink url="http://twister.ou.edu/workshop.docs/common-tools/numerical_comp_guide/ncg_math.doc.html">http://twister.ou.edu/workshop.docs/common-tools/numerical_comp_guide/ncg_math.doc.html</ulink>
64 <!-- ##### MACRO G_E ##### -->
66 The base of natural logarithms.
71 <!-- ##### MACRO G_LN2 ##### -->
73 The natural logarithm of 2.
78 <!-- ##### MACRO G_LN10 ##### -->
80 The natural logarithm of 10.
85 <!-- ##### MACRO G_PI ##### -->
87 The value of pi (ratio of circle's circumference to its diameter).
92 <!-- ##### MACRO G_PI_2 ##### -->
99 <!-- ##### MACRO G_PI_4 ##### -->
106 <!-- ##### MACRO G_SQRT2 ##### -->
108 The square root of two.
113 <!-- ##### MACRO G_LOG_2_BASE_10 ##### -->
115 Used for fooling around with float formats, see
116 <ulink url="http://twister.ou.edu/workshop.docs/common-tools/numerical_comp_guide/ncg_math.doc.html">http://twister.ou.edu/workshop.docs/common-tools/numerical_comp_guide/ncg_math.doc.html</ulink>