Keil Logo Arm Logo

Technical Support

On-Line Manuals

Libraries and Floating Point Support Guide

Conventions and feedback The ARM C and C++ libraries The ARM C micro-library Floating-point support About floating-point support The software floating-point library, fplib Calling fplib routines fplib arithmetic on numbers in a particular format fplib conversions between floats, doubles, and int fplib conversion between long longs, floats, and d fplib comparisons between floats and doubles fplib C99 functions Controlling the ARM floating-point environment Floating-point functions for compatibility with Mi C99-compatible functions for controlling the ARM f C99 rounding mode and floating-point exception mac Exception flag handling Functions for handling rounding modes Functions for saving and restoring the whole float Functions for temporarily disabling exceptions ARM floating-point compiler extensions to the C99 Writing a custom exception trap handler Example of a custom exception handler Exception trap handling by signals Using C99 signalling NaNs provided by mathlib (_WA mathlib double and single-precision floating-point Nonstandard functions in mathlib IEEE 754 arithmetic Basic data types for IEEE 754 arithmetic Single precision data type for IEEE 754 arithmetic Double precision data type for IEEE 754 arithmetic Sample single precision floating-point values for Sample double precision floating-point values for IEEE 754 arithmetic and rounding Exceptions arising from IEEE 754 floating-point ar Ignoring exceptions from IEEE 754 floating-point a Trapping exceptions from IEEE 754 floating-point a Exception types recognized by the ARM floating-poi Using the Vector Floating-Point (VFP) support libr

Libraries and Floating Point Support Guide

Sample double precision floating-point values for IEEE 754 arithmetic

Sample double precision floating-point values for IEEE 754 arithmetic

Some sample double bit patterns, together with their mathematical values, are given in Table 25.

Table 25. Sample double-precision floating-point values

Double valueSExpFracMathematical valueNotes[a]
0x3FF00000 0000000000x3FF000...0001.0-
0xBFF00000 0000000010x3FF000...000-1.0-
0x3FF00000 0000000100x3FF000...0011.000 000 000 000 000 222a
0x3FE80000 0000000000x3FE100...0000.75-
0x00100000 0000000000x001000...0002.23*10-308b
0x00000000 0000000100x000000...0014.94*10-324c
0x7FEFFFFF FFFFFFFF00x7FE111...1111.80*10308d
0x7FF00000 0000000000x7FF000...000Plus infinity-
0xFFF00000 0000000010x7FF000...000Minus infinity-
0x00000000 0000000000x000000...0000.0e
0x7FF00000 0000000100x7FF000...001Signaling NaNf
0x7FF80000 0000000000x7FF100...000Quiet NaNf

Show/hideNotes on sample double precision floating-point values

a

The smallest representable number that can be seen to be greater than 1.0. The amount that it differs from 1.0 is known as the machine epsilon. This is 0.000 000 119 in float, and 0.000 000 000 000 000 222 in double. The machine epsilon gives a rough idea of the number of significant figures the format can keep track of. float can do six or seven places. double can do fifteen or sixteen.

b

The smallest value that can be represented as a normalized number in each format. Numbers smaller than this can be stored as denormals, but are not held with as much precision.

c

The smallest positive number that can be distinguished from zero. This is the absolute lower limit of the format.

d

The largest finite number that can be stored. Attempting to increase this number by addition or multiplication causes overflow and generates infinity (in general).

e

Zero. Strictly speaking, they show plus zero. Zero with a sign bit of 1, minus zero, is treated differently by some operations, although the comparison operations (for example == and !=) report that the two types of zero are equal.

f

There are two types of NaNs, signaling NaNs and quiet NaNs. Quiet NaNs have a 1 in the first bit of Frac, and signaling NaNs have a zero there. The difference is that signaling NaNs cause an exception when used, whereas quiet NaNs do not.

Copyright © 2007-2008, 2011-2012 ARM. All rights reserved.ARM DUI 0378D
Non-ConfidentialID062912

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.