There are many different ways of writing a number, depending on culture and context.
Numbas can interpret and display numbers in several styles.
Styles of notation¶
||Powers of 1000 not separated, and a dot is used for the decimal mark.||1234567.890123|
||Positive powers of 1000 are separated with commas, and a dot is used for the decimal mark.||1,234,567.890123|
||Powers of 1000 are separated with spaces, and a dot is used for the decimal mark.||1 234 567.890 123|
||Powers of 1000 are separated with spaces, and a comma is used for the decimal mark.||1 234 567,890 123|
||Positive powers of 1000 are separated with dots, and a comma is used for the decimal mark.||1.234.567,890123|
||Powers of 1000 are not separated, and a comma is used for the decimal mark.||1234567,890123|
||Positive powers of 1000 are separated with apostrophes, and a dot is used for the decimal mark.||1‘234‘567.890123|
||Groups of digits in the integer part are separated with commas. The rightmost group is three digits, and other digits are grouped in pairs. A dot is used for the decimal mark.||12,34,567.890123|
Note that some styles conflict with each other: for example,
1.234 is a number between 1 and 2 in English, while it’s the integer 1234 in French.
Numbers in JME¶
You can parse a string representing a number written in a different style using the
parsenumber() function, and display it using a particular style using the
formatnumber() function, or by giving a style code to