Polybench® Reference
Codes to inform Polybench how to display numbers and other values.

Number format codes


A number of components in Polybench can display values or time. You can specify how these values are displayed, by entering a Number Format in the property NumberFormat of that component.


The number format is determined using a few characters and length specifiers.
The various possibilities are summed up below:

Floating point values: comma or dot? How many decimals?

.3 means floating point value with decimal point and rounded to max. 3 decimals.

;2 means floating point value with standard decimal separator of the current culture and rounded to 2 decimals.

>,2 means floating point value with decimal comma and rounded to 2 decimals, but no trailing zeros. For example: 2.100 will be displayed as '2,1'. Without the >, the value would be displayed as '2,10'.

, means floating point as is, but with decimal comma.

Time values: how to display

h:m:s means hours, minutes and seconds (also allowed is hms).

ms.3 means minutes, seconds and fraction of seconds rounded to max. 3 digits and a decimal point.

s means seconds only.

>hms means hours, minutes, seconds, but only if they are greater than zero (in other words: no leading zeros)

hmsc or h:m:s c means hours, minutes and seconds, but displayed as clock time. For example 33:10:00 will be displayed as '09:10:00' or '09:10:00 AM'.

No rounding of floating point values

.2* means that a value is not rounded to 2 decimals, but that it is displayed truncated. For example: 1.226 will be displayed as '1.22..'. If no asterisk (*) is specified, the value would be displayed as '1.23'.

Note that the truncate specifier cannot be used together with the no-trailing zeros specifier; the truncation wins over trailing zeros. So >;4* will be handled like ;4*.

Hexadecimal values

X means convert the value to a hexadesimal value, which is displayed using the '0x' symbol. For example: 105.9 is rounded to 106 and displayed as '0x6A'.

X4 means convert to hexadecimal, and display with 4 hexadecimal digits. For example 105.9 is displayed as '0x006A'.

X6* means convert to hexadecimal by truncating the input value to a natural number, and display with 6 digits. For example: 105.9 is truncated to 105 and displayed as '0x000069'.

Note that the minimal number of hexadecimal digits is automatically set to 2.