File: numerical.md

package info (click to toggle)
glib2.0 2.84.4-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 66,112 kB
  • sloc: ansic: 538,924; python: 9,661; sh: 1,612; xml: 1,482; perl: 1,222; cpp: 535; makefile: 321; javascript: 11
file content (35 lines) | stat: -rw-r--r-- 1,114 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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]