mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-22 00:48:53 +02:00
docs: Move the numerical SECTION
Move it to a separate Markdown file. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #3037
This commit is contained in:
@@ -73,6 +73,7 @@ content_files = [
|
|||||||
"spawn.md",
|
"spawn.md",
|
||||||
"unix.md",
|
"unix.md",
|
||||||
"random.md",
|
"random.md",
|
||||||
|
"numerical.md",
|
||||||
"markup.md",
|
"markup.md",
|
||||||
"base64.md",
|
"base64.md",
|
||||||
"goption.md",
|
"goption.md",
|
||||||
|
@@ -162,6 +162,7 @@ expand_content_files = [
|
|||||||
'main-loop.md',
|
'main-loop.md',
|
||||||
'memory.md',
|
'memory.md',
|
||||||
'memory-slices.md',
|
'memory-slices.md',
|
||||||
|
'numerical.md',
|
||||||
'random.md',
|
'random.md',
|
||||||
'reference-counting.md',
|
'reference-counting.md',
|
||||||
'running.md',
|
'running.md',
|
||||||
|
35
docs/reference/glib/numerical.md
Normal file
35
docs/reference/glib/numerical.md
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
Title: Numerical Definitions
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
SPDX-FileCopyrightText: 2001 Havoc Pennington
|
||||||
|
SPDX-FileCopyrightText: 2010 Red Hat, Inc.
|
||||||
|
|
||||||
|
# Numerical Definitions
|
||||||
|
|
||||||
|
GLib offers mathematical constants such as [const@GLib.PI] for the value of pi;
|
||||||
|
many platforms have these in the C library, but some don’t. The GLib
|
||||||
|
versions always exist.
|
||||||
|
|
||||||
|
The [type@GLib.FloatIEEE754] and [type@GLib.DoubleIEEE754] 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
|
||||||
|
[IEEE 754-2008](http://en.wikipedia.org/wiki/IEEE_float)
|
||||||
|
for more information about IEEE number formats.
|
||||||
|
|
||||||
|
## Floating Point
|
||||||
|
|
||||||
|
* [const@GLib.IEEE754_FLOAT_BIAS]
|
||||||
|
* [const@GLib.IEEE754_DOUBLE_BIAS]
|
||||||
|
* [type@GLib.FloatIEEE754]
|
||||||
|
* [type@GLib.DoubleIEEE754]
|
||||||
|
|
||||||
|
## Numerical Constants
|
||||||
|
|
||||||
|
* [const@GLib.E]
|
||||||
|
* [const@GLib.LN2]
|
||||||
|
* [const@GLib.LN10]
|
||||||
|
* [const@GLib.PI]
|
||||||
|
* [const@GLib.PI_2]
|
||||||
|
* [const@GLib.PI_4]
|
||||||
|
* [const@GLib.SQRT2]
|
||||||
|
* [const@GLib.LOG_2_BASE_10]
|
17
glib/docs.c
17
glib/docs.c
@@ -1806,23 +1806,6 @@
|
|||||||
*/
|
*/
|
||||||
/* Numerical Definitions {{{1 */
|
/* Numerical Definitions {{{1 */
|
||||||
|
|
||||||
/**
|
|
||||||
* SECTION:numerical
|
|
||||||
* @title: Numerical Definitions
|
|
||||||
* @short_description: mathematical constants, and floating point decomposition
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*
|
|
||||||
* 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
|
|
||||||
* [IEEE 754-2008](http://en.wikipedia.org/wiki/IEEE_float)
|
|
||||||
* for more information about IEEE number formats.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* G_IEEE754_FLOAT_BIAS:
|
* G_IEEE754_FLOAT_BIAS:
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user