Previous: , Up: Format Instructions   [Contents][Index]


22.1.6.6 Instruction formatf64

Synopsys:

formatf64 STYLE

Given a ULONG (that should be interpreted as a 64-bit floating-point number), and a UINT (as the conversion precision), push the string representation of the floating-point number with specified precision. The formatting style is given by a literal parameters.

The formatting style is given by a literal parameters. Style 0 corresponds to %f-tag which converts the number in the style [-]ddd.ddd where the number of digits after the decimal-point character is the equal to the precision. Style 1 corresponds to %e-tag which converts the number in the style [-]d.ddde+-dd (so called scientific notation). Precision for this style also means the number of digits after the decimal-point character. Style 2 corresponds to %g-tag which choose either %f style or %e based on the length of the repsentation. For this style, precision specify the number of significant numbers.

Stack: ( ULONG UINT -- STR )