sip wrote on Nov 27th, 2009, 3:24am:Here in Romania we write numbers in a completely opposite way from the rest of the world, meaning that we write a comma for a dot and a dot for a comma. [...] Don't ask me why, I think it's silly.
In France we used to use this notation, which is also used in a number of European countries, I believe (Spain, I think).
Now we use unbreakable space for break thousands, which is nice.
Strangely, I always found the US notation silly, instead... That, and putting month before day in dates, using Imperial measures, etc. :-P
Now, if I do:
println(nfc(10000000.01, 3));on my French system, I get: 10 000 000,000
That's because Java is locale aware, and format numbers (when asked) using the local rules (which can be even different in some Asian countries).
So nfc() is nice to display user friendly values, but not for reuse later the values. The nfc() page should mention we can get something else than commas in output...
So the inconsistencies you get might come from inconsistencies in locale settings on your test computers.
A simpler way to get what you want is to put at the start of the sketch:
Locale.setDefault(Locale.US);