SLAU131Y October 2004 – June 2021
Initialize Single- or Double-Precision Floating-Point Value
.doublevalue1 [, ... , valuen]
.float value [, ... ,valuen ]
The .double directive places the IEEE double-precision floating-point representation of one or more floating-point values into the current section.
Each value must be an absolute constant expression with an arithmetic type or a symbol equated to an absolute constant expression with an arithmetic type. Each constant is converted to a floating-point value in IEEE single-precision 32-bit format for .float and 64-bit format for .double. Floating point constants are aligned on word boundaries.
The 32-bit value is stored exponent byte first, most significant byte of fraction second, and least significant byte of fraction third, in the format shown in Figure 6-5.
The 64-bit value is stored in the format shown in Figure 6-6.
When you use .double or .float in a .struct/.endstruct sequence, they define a member's size; they do not initialize memory. For more information, see the .struct/.endstruct/.tag topic.
Following are examples of the .float and .double directives:
1 0000 5951 .double -2.0e25
0002 E984
2 0004 5951 .float -1.0e25
0006 E904
3 0008 0000 .double 6
000a 40C0
4 000c 0000 .float 3
000e 4040