
|
Mathematical Constants
Definitions
|
Contents
Introduction
Definitions
Floating-point
Exponent
Mantissa
Significand
Radix
ULP (unit in last place)
nextafter function
Introduction
See D Goldberg, What
Every Computer Scientist Should Know About Floating Point Arithmetic.
Definitions
- Floating-point
: real number type stored as sign,
exponent and significand. Unlike integer types, most
floating-point values cannot be stored exactly.
- See D Goldberg.
- Exponent :
power of radix by which to multiply the
significand. (radix, or base, returned by std::numeric_limits<
floating_point_type>::radix, usually 2). Exponent is always signed,
using one bit, and often offset or biased for storage convenience.
- Mantissa: deprecated term - see significand.
- Radix : base for
exponent, usually 2, (decimal and hexadecimal radix systems exist, but
are not yet supported by this package).
- Significand:
binary fraction where most significant bit
represents 0.5, next 0.25, then 0.125 … The most significant bit (0.5)
is usually not stored and is implicitly assumed to be set, so the
significand always represents a fraction greater than 0.5, (but just
less than 1).
std::numeric_limits<floating_point_type>::digits returns the
number if significant bits, including any implicit bit.
- Least
Significant bit: of significand –
also called “unit in last place” ulp. (decimal or hexadecimal if radix
or base is 10 or 16).
- nextafter functions: (C99 float, double and long double versions) changes the
least significant bit by adding or subtracting 1 to the binary
significand.
- ULP “unit in
last place” can be a binary, decimal or hexadecimal digit.
http://hetp.u-net.com/public/math_constants.definitions.html,
Revised
5 May 2005
©
Copyright Paul
A. Bristow
and hetp 2002-2005.
All Rights Reserved.