Group Abstract Group Abstract

Message Boards Message Boards

0
|
550 Views
|
4 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Incorrect parsing of simple arithmetic and implicit multiplication expressions in Wolfram Alpha

Posted 14 days ago

Hi WolframAlpha team,

Sorry, I am not sure where the correct place to report this bug is. I hope this is the right place.

I would like to report several parsing issues in WolframAlpha involving simple arithmetic expressions and implicit multiplication. These are surprising because they affect very basic mathematical inputs.

Incorrect precedence/parsing for : and *

Input: 5:3*3

Expected: 5

Result: 5:9

Notes: I expected this to be interpreted as (5 / 3) * 3, following standard left-to-right evaluation for division and multiplication. However, it appears to be interpreted as 5 / (3 * 3), which gives 5/9.

Incorrect parsing of adjacent number and fraction with no space before the fraction

Input: 2_fraction(2, 3)

There is no space between 2 and fraction(2, 3). The underscore here is only used to show adjacency.

Possible expected behavior: - Interpret it as a mixed number: 2 + 2/3 = 8/3 - Interpret it as multiplication: 2 * (2/3) = 4/3 - Or report an ambiguous/invalid input

Result: 22/3

Notes: The issue is not that WolframAlpha chooses mixed number vs multiplication. The issue is that it appears to parse the expression incorrectly by concatenating the leading 2 into the numerator, producing 22/3.

Incorrect parsing of adjacent fraction and number with no space after the fraction

Input: fraction(2, 3)_2

There is no space between fraction(2, 3) and 2. The underscore here is only used to show adjacency.

Possible expected behavior: - Interpret it as multiplication: (2/3) * 2 = 4/3 - Or report an ambiguous/invalid input

Result: 2/32

Notes: The trailing 2 seems to be concatenated into the denominator instead of being treated as multiplication or rejected as ambiguous/invalid input.

Incorrect behavior when choosing "Use as product"

Input: 2 2/3

There is a space between 2 and 2/3.

WolframAlpha shows:

Assuming 2 2/3 is a mixed fraction | Use 2 2/3 as a product instead

Expected when choosing "Use as product": 2 * (2/3) = 4/3

Result after clicking the product interpretation: {2, 2/3}

Notes: The clarification option is useful, but when I choose to use the expression as a product, it appears to become a list instead of a multiplication expression.

Expected behavior

For expressions involving adjacent numbers and fractions, WolframAlpha should distinguish between valid interpretations, such as:

2 2/3 as a mixed number: 2 + 2/3 = 8/3

and:

2 * 2/3 as a product: 4/3

If the input is ambiguous or invalid, reporting ambiguity or an input error would be better than silently concatenating digits into the numerator or denominator.

If the user explicitly chooses "Use as product", the expression should not be converted into a list.

Why this matters

These are very simple arithmetic cases, so incorrect parsing here can easily mislead users. The issue is especially concerning because WolframAlpha is widely trusted for mathematical computation.

Could you please check the parser behavior for these cases?

Thank you.

POSTED BY: Giang Do
4 Replies

I don't think that it's interpreting : as standard division but as a general ratio like the ones you sometimes see in recipes "Add milk and flour in a 3:2 ratio". And in that case it doesn't really make sense to multiply the whole ratio, which is why it's not parsing 5:3*3 as (5:3)*3 or as 5/3*3. It's just treating it as a completely different kind of thing.

POSTED BY: Sjoerd Smit

For that first example, it appears that W|A is not regarding the colon as a division operator?

POSTED BY: Daniel Lichtblau

I suggest contacting Wolfram Alpha's team directly: http://www.wolframalpha.com/contact.html

POSTED BY: Ahmed Elbanna

Wolfram|Alpha uses an unstated convention for the order of operation that baffles me too. I remember it was discussed in this forum before.

POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard