Page MenuHomePhabricator

Thousand separator misplaced for large real numbers
Closed, InvalidPublic

Description

The thousand separator is misplaced for large real numbers, that is numbers with a decimal point. It is injected on thousand positions counting from the right end of the fraction. It should be counting from the left end.

See for example w:no:Pi. This number should be 3,141 592 653 589 7… in Norwegian and not 3,1 415 926 535 897. Note, there are several other issues with the layout, and in particular T232894: Decimal point is lost in formatnum for large numbers.

Event Timeline

Nikerabbit changed the task status from Open to Stalled.Sep 14 2019, 7:17 AM
Nikerabbit subscribed.

Your bug report is missing a test case.

{{FORMATNUM:3.1415926535897}} in English Wikipedia gives: 3.1415926535897
{{FORMATNUM:3.1415926535897}} in Norwegian (no) Wikipedia gives: 3,1415926535897
{{FORMATNUM:3,1415926535897}} (invalid input) in Norwegian (no) Wikipedia gives: 3 1 415 926 535 897

I don't know how to reproduce the behavior. It seems likely to me, though, that you are giving invalid input to FORMATNUM, and bugs about the output with invalid input has been declined in the past. It only accepts unformatted number with decimal period.

My bad. I assumed the number to be unformatted, and did not notice the comma.

Assuming that this task is invalid as per last two comments. If I misunderstand, please reopen and clarify. Thanks!