mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-02 05:43:07 +02:00
122 lines
2.5 KiB
Plaintext
122 lines
2.5 KiB
Plaintext
<!-- ##### SECTION Title ##### -->
|
|
Numerical Definitions
|
|
|
|
<!-- ##### SECTION Short_Description ##### -->
|
|
mathematical constants, and floating point decomposition
|
|
|
|
<!-- ##### SECTION Long_Description ##### -->
|
|
<para>
|
|
GLib offers mathematical constants such as #G_PI for the value of pi;
|
|
many platforms have these in the C library, but some don't, the GLib
|
|
versions always exist.
|
|
</para>
|
|
|
|
<para>
|
|
The #GFloatIEEE754 and #GDoubleIEEE754 unions are used to access the
|
|
sign, mantissa and exponent of IEEE floats and doubles. These unions are
|
|
defined as appropriate for a given platform. IEEE floats and doubles are
|
|
supported (used for storage) by at least Intel, PPC and Sparc. See
|
|
<ulink url="http://en.wikipedia.org/wiki/IEEE_float">IEEE 754-2008</ulink>
|
|
for more information about IEEE number formats.
|
|
</para>
|
|
|
|
<!-- ##### SECTION See_Also ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
<!-- ##### SECTION Stability_Level ##### -->
|
|
|
|
|
|
<!-- ##### SECTION Image ##### -->
|
|
|
|
|
|
<!-- ##### MACRO G_IEEE754_FLOAT_BIAS ##### -->
|
|
<para>
|
|
The bias by which exponents in single-precision floats are offset.
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### MACRO G_IEEE754_DOUBLE_BIAS ##### -->
|
|
<para>
|
|
The bias by which exponents in double-precision floats are offset.
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### UNION GFloatIEEE754 ##### -->
|
|
<para>
|
|
The #GFloatIEEE754 and #GDoubleIEEE754 unions are used to access the sign,
|
|
mantissa and exponent of IEEE floats and doubles. These unions are defined
|
|
as appropriate for a given platform. IEEE floats and doubles are supported
|
|
(used for storage) by at least Intel, PPC and Sparc.
|
|
</para>
|
|
|
|
|
|
<!-- ##### UNION GDoubleIEEE754 ##### -->
|
|
<para>
|
|
The #GFloatIEEE754 and #GDoubleIEEE754 unions are used to access the sign,
|
|
mantissa and exponent of IEEE floats and doubles. These unions are defined
|
|
as appropriate for a given platform. IEEE floats and doubles are supported
|
|
(used for storage) by at least Intel, PPC and Sparc.
|
|
</para>
|
|
|
|
|
|
<!-- ##### MACRO G_E ##### -->
|
|
<para>
|
|
The base of natural logarithms.
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### MACRO G_LN2 ##### -->
|
|
<para>
|
|
The natural logarithm of 2.
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### MACRO G_LN10 ##### -->
|
|
<para>
|
|
The natural logarithm of 10.
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### MACRO G_PI ##### -->
|
|
<para>
|
|
The value of pi (ratio of circle's circumference to its diameter).
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### MACRO G_PI_2 ##### -->
|
|
<para>
|
|
Pi divided by 2.
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### MACRO G_PI_4 ##### -->
|
|
<para>
|
|
Pi divided by 4.
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### MACRO G_SQRT2 ##### -->
|
|
<para>
|
|
The square root of two.
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### MACRO G_LOG_2_BASE_10 ##### -->
|
|
<para>
|
|
Multiplying the base 2 exponent by this number yields the base 10 exponent.
|
|
</para>
|
|
|
|
|
|
|