Re: Another repeating decimal notation

While the notion of a canonical way of representing a number simplifies
things, I'm not sure it makes sense for presentation MathML because
presentation MathML is all displaying content regardless of meaning
(although the two are linked in people's minds). However the description of
the contents of an "mn" element isn't great and I can see how it leads one
to think there is a canonical way of handling non-integer numbers:

> An mn element represents a numeric literal or other data that should be
> rendered as a numeric literal. Generally speaking, a numeric literal is a
> sequence of digits, perhaps including a decimal point, representing an
> unsigned integer or real number. A typical graphical renderer would render
> an mn element as its content (see 3.2.1 Token Element Content Characters,
> <mglyph/> <https://w3c.github.io/mathml/#presm_tokenchars>), with no
> extra spacing around them (except spacing from neighboring elements such as
> mo). mn elements are typically rendered in an unslanted font.


On the one hand, the description says "perhaps including a decimal point".
That leads one to think non-integer numbers should be represented with a
"." On the other hand, it also says "A typical graphical renderer would
render an mn element as its content". This means one needs to use "," for a
decimal separator if that is what is intended to be displayed. At least
that is my interpretation. It definitely needs clarification!

The later point of view is slightly backed up by the mstyle "decimalpoint"
attr (not in core). That says:

> Specifies the character used to determine the alignment point within
> mstack <https://w3c.github.io/mathml/#presm_mstack> and mtable
> <https://w3c.github.io/mathml/#presm_mtable> columns when the
> "decimalpoint" value is used to specify the alignment. The default, ".", is
> the decimal separator used to separate the integral and decimal fractional
> parts of floating point numbers in many countries.


The examples for "mn" only include "," block separators and "." decimal
separators. However, there is no mention of the alternative style (as far
as I can see), so it is easy for me to believe the committee (which does
and did have European members) simply didn't consider that option.

The "cn" documentation is just slightly clearer:

> A real number is presented in radix notation. Radix notation consists of
> an optional sign (+ or -) followed by a string of digits possibly
> separated into an integer and a fractional part by a decimal point. Some
> examples are 0.3, 1, and -31.56.


There is no mention of display here (which makes sense since this is
content MathML), but there is also no mention or examples for the
alternative style of representing numbers.
@OpenMath experts: does "OMF" (the mapping for "strict") clarify the
notation that should be used?

I'm definitely interested to know what point of view others on this list
have about "mn" and block/decimal separators.

    Neil


On Thu, May 23, 2024 at 5:55 PM Arno Gourdol <arno@arno.org> wrote:

> One thing that might be worth considering…
>
> Just like the decimal separator can be either a comma or a dot, but is
> always represented as a “.” in a <mn> element, perhaps the repeating
> digits could also be represented by a single convention when inside a <mn>
>  element, but displayed according to the user’s preference.
>
> If you were to pick one convention, the parentheses have the convenience
> of being simple to represent, using only ASCII characters.
>
> So,<mn>0.(1)</mn> could be displayed as "0,(1)” in Poland and “1.1" in
> the US.
>
>
>
>
>
> On May 23, 2024 at 5:42:05 PM, Neil Soiffer <soiffer@alum.mit.edu> wrote:
>
>> @Arno: thanks for the link.
>>
>> In the Spanish and Portuguese braille spec, I had seen the arc notation
>> and was surprised by it. I hadn't seen parens, but apparently they are
>> common outside the English speaking world.
>>
>> Some notations for repeating are mentioned in the full spec:  Section
>> 3.6.8.4 Repeating Decimal <https://w3c.github.io/mathml/#presm_repeatdec>.
>> Just as the "..." doesn't fit into what is described there, I don't think
>> the parens do. However, maybe the arc notation does, although we don't have
>> a way to represent an arc that spans several digits (the overline works
>> because "msline" can span digits).
>>
>>     Neil
>>
>>
>> On Thu, May 23, 2024 at 5:23 PM Arno Gourdol <arno@arno.org> wrote:
>>
>>> Yes, that’s a pretty common notation. It’s used in France, Austria,
>>> Denmark, Finland, the Netherlands, Norway, Russia, Ukraine, Vietnam and
>>> Israel. Some of those countries use a decimal comma others use a decimal
>>> point.
>>>
>>> See https://en.wikipedia.org/wiki/Repeating_decimal
>>>
>>> On May 23, 2024 at 5:08:23 PM, Neil Soiffer <soiffer@alum.mit.edu>
>>> wrote:
>>>
>>>> Somewhere else, someone said that in Poland, the notation for a
>>>> repeating decimal is
>>>>   a,(b)
>>>>
>>>> Does anyone know of other languages that use this notation for
>>>> repeating decimals?
>>>>
>>>>     Neil
>>>>
>>>>

Received on Friday, 24 May 2024 04:52:58 UTC