![]() The IEEE standard defines the formats, but it leaves to implementors the choice of storage formats.Īssembly language software sometimes relies on using the storage formats, but higher level languages usually deal only with the linguistic notions of floating-point data types. A floating-point storage format specifies how a floating-point format is stored in memory. Storage FormatsĪ floating-point format is a data structure specifying the fields that comprise a floating-point numeral, the layout of those fields, and their arithmetic interpretation. It summarizes the precisions and ranges of the different IEEE storage formats. This section describes how floating-point data is stored in memory. The IEEE standard simplifies the task of writing numerically sophisticated, portable programs not only by imposing rigorous requirements on conforming implementations, but also by allowing such implementations to provide refinements and enhancements to the standard itself. IEEE 754 floating-point arithmetic offers users greater control over computation than does any other kind of floating-point arithmetic. The features required by the IEEE standard make it possible to support interval arithmetic, the retrospective diagnosis of anomalies, efficient implementations of standard elementary functions like exp and cos, multiple precision arithmetic, and many other tools that are useful in numerical computation. The IEEE standard also recommends support for user handling of exceptions. Rounding precision for example, if a system delivers results in double extended format, the user should be able to specify that such results are to be rounded to the precision of either the single or double format.Four rounding directions: toward the nearest representable value, with "even" values preferred whenever there are two nearest representable values toward negative infinity (down) toward positive infinity (up) and toward 0 (chop).The five types of floating-point exceptions are invalid operation, division by zero, overflow, underflow, and inexact. Five types of IEEE floating-point exceptions, and the conditions for indicating to the user the occurrence of exceptions of these types.For operands not lying within the specified ranges, these conversions must produce results that differ from the exact result by no more than a specified tolerance that depends on the rounding mode. For operands lying within specified ranges, these conversions must produce exact results, if possible, or minimally modify such exact results in accordance with the rules of the prescribed rounding modes. Accuracy, monotonicity and identity requirements for conversions between decimal strings and binary floating-point numbers in either of the basic floating-point formats.In the latter case, the operation must minimally modify the exact result according to the rules of prescribed rounding modes, presented below, and deliver the result so modified to the operation's destination. Each of the other operations must deliver to its destination the exact result, unless there is no such result or that result does not fit in the destination's format. The remainder and compare operations must be exact. Accuracy requirements on floating-point operations: add, subtract, multiply, divide, square root, remainder, round numbers in floating-point format to integer values, convert between different floating-point formats, convert between floating-point and integer formats, and compare.For example, an IEEE double extended format must have a significand precision of at least 64 bits and occupy at least 79 bits overall. The standard does not prescribe the exact precision and size of these formats, but it does specify the minimum precision and size. Two classes of extended floating-point formats: single extended and double extended.The IEEE double format has a significand precision of 53 bits and occupies 64 bits overall. The IEEE single format has a significand precision of 24 bits and occupies 32 bits overall. Two basic floating-point formats: single and double.This section describes the IEEE 754 s pecification. All Sun compiler products support the features of IEEE arithmetic. All SPARC and x86 processors use IEEE arithmetic. This chapter discusses the arithmetic model specified by the ANSI/IEEE Standard 754-1985 for Binary Floating-Point Arithmetic ("the IEEE standard" or "IEEE 754" for short).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |