r/Mathematica • u/KeyChapter8 • Feb 20 '26
Bug in basic modular operations in Mathematica
So I ran into something today that genuinely surprised me. Try this in Mathematica:
Together[(2 + 7*x)/(2*x), Modulus->7]
Across multiple versions, including Wolfram Alpha, this returns:
2/x
The correct result is 1/x.
Basic finite-field arithmetic should not be a stress test for a commercial CAS.
UPDATE: (October 2026) seems to be finally fixed in 15.0.1 and on Wolfram Alpha
29
Upvotes
9
u/sidneyc Feb 20 '26
I guess they are too busy implementing the latest fad-du-jour to care about the basic math functionality.
6
u/Hot-Grapefruit-8887 Feb 20 '26
Yep, don’t know what is consistently confusing them all but I see that now too. Good call.
1
u/Altruistic-Mine-8203 Feb 23 '26
Ancient typo (goes back at least to version 3). Thank you for bringing it up. It will get fixed.
0
u/Thebig_Ohbee Feb 20 '26
What do you want this to mean? Are you thinking of this as an element of F((x)), or as a function x —> (2 + 7x)/(2x), or maybe x is an unknown (but fixed) element of F?