21.1.6.5 Instruction formatf32

Synopsys:

formatf32 STYLE

Given a UINT (that should be interpreted as a 32-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. 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: ( UINT UINT -- STR )