$Unfloat: Difference between revisions
(Automatically generated page update) |
mNo edit summary |
||
Line 1: | Line 1: | ||
<p>The $UNFLOAT function converts a floating-point number from the standard IBM floating point format to the corresponding character string representation. <var class="product">Model 204</var> maintains 15 significant decimal digits of precision for 8-byte floating-point numbers and 6 significant digits of precision for 4-byte floating-point numbers. For an expanded discussion of rounding numbers, please refer to [[Floating | <p>The $UNFLOAT function converts a floating-point number from the standard IBM floating point format to the corresponding character string representation. <var class="product">Model 204</var> maintains 15 significant decimal digits of precision for 8-byte floating-point numbers and 6 significant digits of precision for 4-byte floating-point numbers. For an expanded discussion of rounding numbers, please refer to [[Floating point conversion, rounding, and precision rules#Mapping and precision adjustment|Mapping and precision adjustment]].</p> | ||
<b>Syntax</b> | <b>Syntax</b> | ||
<p>The format of the $UNFLOAT function is: </p> | <p>The format of the $UNFLOAT function is: </p> |
Revision as of 20:27, 2 January 2014
The $UNFLOAT function converts a floating-point number from the standard IBM floating point format to the corresponding character string representation. Model 204 maintains 15 significant decimal digits of precision for 8-byte floating-point numbers and 6 significant digits of precision for 4-byte floating-point numbers. For an expanded discussion of rounding numbers, please refer to Mapping and precision adjustment.
Syntax
The format of the $UNFLOAT function is:
$UNFLOAT(number)
where number can be either four bytes for a single-precision floating-point number or eight bytes for a double-precision floating-point number.
$UNFLOAT converts floating-point numbers from the internal form used by Model 204 for storage efficiency to a printable string. $UNFLOAT also allows the manipulation of these numbers by User Language.
Example
For example, the result of the expression:
$UNFLOAT($FLOAT('1.234'))
is the string 1.234. If the string argument is omitted or invalid, a null string is returned.