FBIN() Function - Convert Decimal to Binary Float
Syntax
FBIN(numeric{,ERR=lineref})
Description
For BBj-specific information, see the FBIN() Function - BBj.
The FBIN() function returns an 8-byte string containing the equivalent of the numeric argument in IEEE standard, 64-bit, floating point format. This function is for outputting numeric information that may be read by other software packages, such as spreadsheet software.
Parameter |
Description |
---|---|
numeric |
Numeric argument to be converted to IEEE standard, 64-bit, floating point format. |
ERR=lineref |
Branch to be taken if an error occurs during execution. |
The IEEE standard is commonly used by math coprocessors and software math libraries but has limited use in business applications because of the inadequate rounding of decimal fractions.
The FBIN() treats IEEE values in a natural left-to-right ordering. Therefore, use care when communicating with other applications, such as spreadsheets, because of possible byte/word ordering differences on different systems and different software packages (see also SWAP).
The FDEC() function is the complementary function to FBIN().
Examples
>PRINT HTA(FBIN(21.21*432.34))
40C1E8F7381D7CC0