- 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) (counter-example: MGA)
- All currencies are subdivided. (counter-examples: KRW, COP, JPY... Or subdivisions can be deprecated.)
- 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. (EUR is the best example, but also Franc CFA, etc.)
- No country uses another's country official currency as its official currency. (many countries use USD: Ecuador, Micronesia...)
- Countries have only one currency.
- Countries have only one currency currently in circulation. (Panama officially uses both PAB and USD)
- I'll only deal with currencies currently in circulation anyway.
- All currencies have an ISO 4217 3-letter code. (The Transnistrian ruble has none, for example)
- All currencies have a different name. (French franc, "nouveau franc")
- 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.
- There's only one currency symbol for any currency. (元, 角, 分 are increasing units of the Chinese renminbi.)
- 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. (Hint: it depends on the language.)
- Before the price means on the left. (ILS)
- 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). (One writes ¥1 0000)
- 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 only one exchange rate between them at any given point in time.
- Given two currencies, there is at least one exchange rate between them at any given point in time. (restriction on export of MAD, ARS, CNY, for example)
- And the final one: a standalone $character is always pronounced dollar. (It's also the peso sign.)
          Last active
          September 23, 2025 16:14 
        
      - 
            
      
        
      
    Star
      
          
          (306)
      
  
You must be signed in to star a gist 
- 
              
      
        
      
    Fork
      
          
          (18)
      
  
You must be signed in to fork a gist 
- 
      
- 
        Save rgs/6509585 to your computer and use it in GitHub Desktop. 
Item 15+16: Wikipedia has a nice list of which countries that put the Euro symbol (€) before or after the amount: https://en.wikipedia.org/wiki/Language_and_the_euro#Summary
- 1 unit of a currency equals 1 unit of the same currency. 1 Turkish Lira since 2009 equals 1.000.000 Turkish Lira before 2005. Luckily ISO codes TRL & TRY help, but for some documents & records you may need to check the time/era. Also, there was YTL (New Turkish Lira) in circulation together with TRL & TRY during the transition. All are practically the same currency.
Very interesting! I might add:
- Prices contain no significant characters other than digits and decimals (A home in Korea would be listed for "5억 2000만", never "₩520,000,000")
- Prices use their currency symbol (again in Korea, you will almost never see "₩5,000", but almost always "5,000원", which is simply "won" written in Hangul)
Shopping websites that use automated currency exchange really stand out when they list prices like "₩ 43,298.17"!
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
@stephenwilcoxon Found on Wikipedia: the Cape Verdean escudo and the defunct Portuguese escudo. Also, the defunct French franc, as reported in this Stack Exchange answer.