Hacker News new | ask | show | jobs
by OJFord 1700 days ago
The words for the orders of magnitude don't group by thousand like in English (*thousand, million, billion, and so on) but by thousand (hazaar), hundred thousand (lakh), ten million (crore), and I don't know what next.

So the comma separation reflects the words, as in English.

> 38,625

38 hazaar ... Vs. 38 thousand ...

> 13,38,625 vs. 1,338,625

13 lakh ... Vs. 1.3 million ...

> 1,00,13,38,625 vs. 1,001,338,625

100 crore Vs. 1.0 billion

This would no doubt be an entry in a hypothetical 'falsehoods programmers believe about numbers'! I.e. use things like Intl.NumberFormat in the browser, rather than home-grown 'group 3 digits and insert a comma then join again'.

(* yes, I'm going to conveniently ignore 'hundred' and its occasional/domain use like 'twelve hundred'.)

3 comments

> The words for the orders of magnitude don't group by thousand like in English

It's not only in English, as far as I know it's almost everywhere else, the entire Western world plus its former colonies and I think even places like China.

The Indian subcontinent is the exception.

Chinese uses powers of ten thousand, I believe, but I don't know if that's reflected in the way numerals are written.
> use things like Intl.NumberFormat in the browser, rather than home-grown 'group 3 digits and insert a comma then join again'.

That home grown solution wouldn’t work in many western countries either, where comma is a decimal separator and dot/period is the thousands separator.

Yep, true. But don't be tempted just to iterate on it to take account of that and whatever you discover next!
We have Arab after Crore, but it's not commonly used. We just say 1000 crore or 1 lakh crore, etc.