• • • 5.2
Number format controls options such the number of decimal digits, the currency sign, commas to separate thousands, and display of negative numbers. It also controls the format of dates. You can set a format for numbers and dates displayed in an edit table, result table, graph, or field of a user input, or output. The number format of an index applies wherever that index is used, including row or column headers of a table, or graph axis that uses that index. With Analytica 5.0, you can set a number format for each cell, row, column, or other slice of an array.
You can enter a number into an expression or table in any format, no matter what output format it uses.
Number format dialog
To set the number format for a variable:
- Select the variable to format by showing its edit table, result table, or graph, or by selecting its node in a diagram. You can apply the same format to multiple variables at once if you select their nodes together in a diagram.
- Select Number format from the Result menu, or press Control+b, to show this dialog:
- Select the format type you want from the list on the left.
- Select options you want, such as Decimal digits, Show trailing zeroes, Thousands separators, or Show currency symbol, from the menus and checkboxes. The options available depend on which format you selected.
- View the example at the top of the dialog to see if the format is what you want.
- If so, click the Apply button.
You can change the default number format by pressing Set Default. The default format applies to all variables in your model whose number format has not been explicitly set.
Types of number format
The default number format is suffix, which uses a letter after the number to denote order of magnitude -- for example, 10K means 10,000, where K means Kilo or thousands. Choose one of these number formats:
Format Description Example Suffix A letter after the number specifies power of ten 12.35K Exponential Scientific notation, where the number after 'e' gives
the powers of ten
1.2345e04 General (new to Analytica 5.0) Floating point number with a specified number of significant digits. Reverts to scientific notation only when a number is extreme, or the non-scientific notation depiction would contain more than the specified number of significant digits. 12345.678 Fixed Point Number with a fixed number of digits after the decimal point 12345.68 Integer A whole number with no decimals shown 12346 Date Show number (days since 1 Jan 1900) as a date and/or time
(see below for format options)
12 Jan 2007 Boolean Display 0 as
False, and any other number as
True, False Hexadecimal (new to Analytica 5.0) Display an integer in base-16 using the digits 0-9 and a-f. The number is prefixed with
0x. When a negative number is displayed, its two's complement is shown.
0x303a Binary (new to Analytica 5.0) Display an integer in base-2 using the digits 0 and 1. The number is prefixed with
0xb. When the number is negative, its 64-bit two's complement is shown.
Suffix number format
Suffix is Analytica’s default number format. It uses a conventional letter after each number to specify powers of 10: 12K means 12,000 (K for kilo or thousands), 2.5M means 2,500,000 (M for Mega or millions), 5n means 0.000,000,005 (n means nano or billionths). Here are the suffix characters:
Power of 10 Suffix Prefix Power of 10 Suffix Prefix 10-2 % percent 103 K Kilo 10-3 m milli 106 M Mega or Million 10-6 μ or u micro (mu) 109 G or B Giga or Billion 10-9 n nano 1012 T Tera or Trillion 10-12 p pico 1015 Q Quadrillion 10-15 f femto
Maximum precision: The maximum number of digits including decimal digits is 15 (14 for fixed point and percent). The maximum precision is 15 digits (9 for integers).
Number format options
Decimal digits: The number of digits to show after the decimal point.
Show trailing zeroes: Check to show trailing zeroes in decimals, e.g., 2.100 instead of 2.1, when decimal digits are set to 3.
Thousands separators: Check to show commas between every third digit of the integer part, e.g., 12,345.678, instead of 12345.678.
Show currency symbol: Check to show a currency symbol. Select the symbol and placement from these menus.
Placement controls the relative location of the currency symbol, e.g., $200 or 200DM, and whether to use a minus sign -$200 or parentheses ($200) to indicate a negative number.
Regional settings: If you select the last entry, regional, from the Symbol or Placement menu, it uses, respectively, the regional currency or placement settings set for your computer. You can modify these settings in the Regional and Language options available from the Windows Control Panel.