You copied the Doc URL to your clipboard.

Floating-point data definition directives

These directives allocate memory in the current section of the file, and define the initial contents of that memory using a floating-point value.

Syntax

.float value [, value]…
.double value [, value]…

Description

.float

The .float directive allocates 4 bytes of memory per argument, and stores the values in IEEE754 single-precision format.

.double

The .double directive allocates 8 bytes of memory per argument, and stores the values in IEEE754 double-precision format.

value

value is a floating-point literal.

Operation

If a floating-point value cannot be exactly represented by the storage format, it will be rounded to the nearest representable value using the round to nearest, ties to even rounding mode.

The following aliases for these directives are also accepted:

Table 9-13 Aliases for the floating-point data definition directives

Directive Alias
.float .single, .dc.s
.double .dc.d

Examples

  float_pi:
    .float 3.14159265359
  double_pi:
    .double 3.14159265359
Was this page helpful? Yes No