$Unfloat: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
 
m (Mlarocca moved page $UNFLOAT to $Unfloat: Lower case change)
 
(One intermediate revision by one other user not shown)
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&nbsp;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>
<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&nbsp;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>

Latest revision as of 15:27, 31 July 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.