News for hackers. Stuff that matters.
Re:Use of decimal point is 1.5 centuries older than historia... by throw0101b on Thursday February 22, 2024 @06:45AM (#39465767)
More important question: comma or period?

:)

Re:Use of decimal point is 1.5 centuries older than historia... by weebull on Thursday February 22, 2024 @07:47AM (#39466305)
I'd like to understand where this difference originates from. It can be very confusing working with Germans (for example).
Re:Use of decimal point is 1.5 centuries older than historia... by throwawayben on Thursday February 22, 2024 @08:57AM (#39467119)
Wikipedia has a quite detailed history section: https://en.m.wikipedia.org/wiki/Decimal_separator
Re:Use of decimal point is 1.5 centuries older than historia... by ysofunny on Thursday February 22, 2024 @07:49AM (#39466330)
the answer is the same as tabs or spaces
Re:Use of decimal point is 1.5 centuries older than historia... by GrumpySloth on Thursday February 22, 2024 @09:08AM (#39467257)
It’s not so arbitrary. I’ve grown up in a country which uses commas, but it’s still really confusing even to me, when writing e.g. f(1,2). Is that function applied to 2 arguments or 1? For this reason I always use period as decimal point.
Re:Use of decimal point is 1.5 centuries older than historia... by winety on Thursday February 22, 2024 @09:15AM (#39467340)
I'd say: Spacing matters, f(1,2) is different from f(1, 2). Just use a semicolon to separate the numbers, e.g. f(1,2; 2).
Re:Use of decimal point is 1.5 centuries older than historia... by GrumpySloth on Thursday February 22, 2024 @09:19AM (#39467405)
Maths is typically written fast, so subtle spacing is too weak a signal to distinguish meanings. Where I studied maths, we even crossed our zeds horizontally to make it easier to distinguish from carelessly written 2s. Similarly, even though the country uses commas, the uni uses periods, for the benefit of clarity. Almost noone uses semicolons in function application in writing.
Re:Use of decimal point is 1.5 centuries older than historia... by klyrs on Thursday February 22, 2024 @12:05PM (#39469929)
If everybody did that, we'd wouldn't have Zoozve...
Re:Use of decimal point is 1.5 centuries older than historia... by throw0101c on Thursday February 22, 2024 @09:50AM (#39467902)
> the answer is the same as tabs or spaces

Not when—as a sibling comment notes—you're dealing with CSVs.

Re:Use of decimal point is 1.5 centuries older than historia... by ysofunny on Thursday February 22, 2024 @12:10PM (#39469987)
don't forget about TSVs
Re:Use of decimal point is 1.5 centuries older than historia... by samatman on Thursday February 22, 2024 @09:32AM (#39467609)
In general I support countries maintaining their language-specific quirks, but I would encourage the decimal-comma countries to lose that habit.

A few reasons: programming languages have universally settled on '.', numbers frequently end up in CSV files, and languages can't really support both standards, because of the usual function notation `f(a, 100.5, "c")`, a comma would be ambiguous here as it would be in a CSV. It's difficult and error-prone to interoperate between decimal period and decimal comma, and the former has only advantages over the latter.

Basically, it creates problems which no one needs. I don't consider this to be a case of cultural chauvanism, it's just that it so happens that the English-speaking countries chose the more useful representation when it became time to program computers. Separating arguments and expressions using a comma is much more natural than using a full stop would be, and this can't be parsed in tandem with a decimal comma.

You can't really count this as a win for the English way of doing things, which predates computer programming, the only context in which the difference actually matters. Before that, it was an arbitrary distinction, now it's not.

Re:Use of decimal point is 1.5 centuries older than historia... by timc3 on Thursday February 22, 2024 @10:10AM (#39468214)
I completely agree.

Having moved to Sweden and from the '.' to the ',' what is even more confusing is then the thousand separator is switched around. Add to the confusion where a banking interface sometimes itself switches between the two and is not consistent what am I transferring.

But the thing that really got me was in Sweden my 9 year old wasn't even using the comma separator in his maths book it was the dot operator `·`. How confused was I that a 9 year old was working with dot products.

Re:Use of decimal point is 1.5 centuries older than historia... by garaetjjte on Thursday February 22, 2024 @12:12PM (#39470028)
As opposed to being surprised that he was working with cross products? :)
Re:Use of decimal point is 1.5 centuries older than historia... by ReleaseCandidat on Thursday February 22, 2024 @10:23AM (#39468414)
CSV with floats that use commas as decimal separator uses semicolons (well, it should be called SSV) or sometimes tabs (TSV, which actually is an official name).

Practically, all 3 versions need to be supported. But the actual problém (well, one of many problems of CSV) are non-quoted strings with commas or semicolons.

Re:Use of decimal point is 1.5 centuries older than historia... by heavenlyblue on Friday February 23, 2024 @05:04AM (#39478868)
Also suggest US switches from crazy Month/Day/Year date formatting.

> it's just that it so happens that the English-speaking countries chose the more useful representation when it became time to program computers

English-speaking countries basically invented CSV so chose the symbols used in CSV files such that they work well with their way of writing numbers saved in these CSV

Re:Use of decimal point is 1.5 centuries older than historia... by beefield on Thursday February 22, 2024 @10:14AM (#39468284)
I'd propose a compromise. Euros switch to decimal point and Americans to metric system. Win-Win.
Re:Use of decimal point is 1.5 centuries older than historia... by jonathanlydall on Thursday February 22, 2024 @03:22PM (#39472599)
Windows South African regional settings used to use a period before changing it in Windows 8 to use a comma.

Total mess while we had a mix of Windows 7 and Windows 8+ developer machines.

I don’t even know why Microsoft changed it, my theory is that some idiot academic or government worker reported to Microsoft that “officially” we use a comma, with zero regard for the fact that practically everyone used a period. Total idiot.