Use FLOAT to display a number or hex string in both its hex representation and as a floating-point number. This command is useful when looking for a specific floating-point number and you need the hex representation of that number. This command does not require a trail file to be opened.
The output of this command is hex_value float_string.
FLOAT assumes the floating point representation is the default for the current platform. It will not make a conversion between a Tandem floating point number (which is not IEEE-754) and a IEEE-754 floating point number, which is supported on UNIX and Windows systems.
Default
None
Syntax
FLOAT input_string [format]
input_stringCan be one of the following:
A valid floating point number as a string in the format of the following: an optional sign character (+ or -), followed by a sequence of decimal digits, which can contain a decimal-point followed by an exponent (an e or E character, followed by an optional sign and a sequence of digits.
A valid hexadecimal number as a string formed by the following: 0x, %H, %h, X, x, H or h, followed by a sequence of hexadecimal digits (1-9, a-f).
formatCan be one of the following:
One of the following to specify the output format sizing: IEEE, TDM, TANDEM, NSK, 64bit, 64-bit, F64, 32bit, 32-bit or F32.
A format specifier formed by the string FMT followed by any valid C99 Print Format specifier (for example, %lx, %e, %g).
Example
The following examples are different results that can be obtained for the same values 2.1 and 2.2.
Logdump 58 >float 2.1 4000cccccccccccd 2.100000 Logdump 59 >float 2.2 400199999999999a 2.200000 Logdump 60 >float 0x4000cccccccccccd 4000cccccccccccd 2.100000 Logdump 61 >float 0x400199999999999a 400199999999999a 2.200000 Logdump 62 >float %H400199999999999a 400199999999999a 2.200000 Logdump 63 >float 2.2 FMT %e 400199999999999a 2.200000e+00 Logdump 64 > float 2.2 FMT %g 400199999999999a 2.2 Logdump 65 >float 0x4000cccccccccccd FMT %g 4000cccccccccccd 2.1 Logdump 66 >float 2.2e+01 4036000000000000 22.000000 Logdump 67 >float 2.2e-05 3ef711947cfa26a2 0.000022