- You can store a price in a floating point variable.
- All currencies are subdivided in 1/100th units (like US dollar/cents, euro/eurocents etc.).
- All currencies are subdivided in decimal units (like dinar/fils)
- All currencies currently in circulation are subdivided in decimal units. (to exclude shillings, pennies)
- All currencies are subdivided.
- Prices can't have more precision than the smaller sub-unit of the currency. (e.g. gas prices)
- For any currency you can have a price of 1. (ZWL)
- Every country has its own currency.
- Countries have only one currency.
- Countries have only one currency currently in circulation.
- I'll only deal with currencies currently in circulation.
- All currencies have an ISO 4217 3-letter code.
- You always put the currency symbol after the price.
- You always put the currency symbol before the price.
- You always put the currency symbol either after, or before the price, never in the middle.
- For a given currency, you always, but always, put the symbol in the same place.
- OK. But if you only use the ISO 4217 currency codes, you always put it before the price.
- You can always use a dot (or a comma, etc.) as a decimal separator.
- You can always use a space (or a dot, or a comma, etc.) as a thousands separator.
- You separate big prices by grouping numbers in triplets (thousands).
- Prices at a single company will never range from five digits before the decimal to five digits after.
- Prices contains only digits and punctuation. (Germans can write
12,- €
) - A price can be at most 10^N for some value of N.
- Given two currencies, there is one and only one exchange rate between them at any given point in time.
-
-
Save baruica/6510329 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment