in reply to Calculations with formatted numbers

Do you really need to do the math with formatted numbers? Can't you do the calculations you need and then just format the numbers before outputting them?

And also, why are you reversing the accepted use (at least here in the US) of the dot as the decimal-seperator and the comma as the thousand block seperator?

Jack

Update Mea Culpa. Sorry if I offended anyone but I was asking questions - seeking information. I am aware that standards are different outside the US - not better, not worse, just different - eg paper sizes, metric vs English measurements, Centigrade vs Farenheit, etc. Quite frankly, that particular difference had never come up in water cooler discussions with my European co-workers.

  • Comment on Re: Calculations with formatted numbers

Replies are listed 'Best First'.
Re^2: Calculations with formatted numbers
by Corion (Patriarch) on Feb 15, 2005 at 15:52 UTC

    Because the German notation has the "," (comma) as the decimal separator, and the "." (dot) as the thousands separator. And decent software supports it, by respecting the Windows locale settings (for example Excel), while badly written software does badly, for example, when reading in data (like Excel does, too).

Re^2: Calculations with formatted numbers
by japhy (Canon) on Feb 15, 2005 at 15:52 UTC
    jcoxen, welcome to Europe.
    _____________________________________________________
    Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
    How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart
Re^2: Calculations with formatted numbers
by Animator (Hermit) on Feb 15, 2005 at 15:54 UTC

    In the EU the comma is used as decimal point and the dot as grouping opreator... (not really logic but I didn't invent the rules)

    Which is different from the US-usage...

    Update: I wasted too long time with posting this post... I checked if anyone posted, I clicked preview, create, and then all of a sudden two people had posted :(

      In the EU the comma is used as decimal point and the dot as grouping opreator..

      That is not exactly true. The EU is a political entity which has come about in the past few decades, and it does not have any impact on how people write numbers (at least, not yet; now you mention it, an EU number-harmonization directive is exactly their kind of thing).

      There are many countries in Europe which have not signed up to being part of the EU but which use a comma as a decimal mark and dot for thousands separator. And the UK and the Republic of Ireland are both members of the EU but use dot and comma the same way as in the USA.

      To help avoid confusion between the different cultural practices of using commas and dots in numbers, the SI and ISO standards say that neither should ever be used as a thousands separator, which should instead be a thin space. The trouble is that it's very hard to persuade a computer to produce such a thin space (especially in a fixed-width terminal window!). More details on this page, Attack of the Thousands Separator.

      Smylers

      With the exception of the UK (any others ?) which is EU but does numbers the US way (except billion which here is a million**2, or at least it used to be)

      Cheers,
      R.

      Pereant, qui ante nos nostra dixerunt!