You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just opened a Mathics REPL and typed commands in. I observed the same behavior when I wrote the same commands in a script.
Expected behavior
Choosing relatively prime x and y, I wrote expressions of the form a Sqrt[x] + b Sqrt[y] + c Sqrt[x], varying the coefficients. Depending on some relationship between the radicands, a sufficiently large b (see 5 and 50 in the example) seemed to produce this behavior for lots of values of x and y.
Your Environment
Mathics 6.0.4
on CPython 3.9.6 (default, Jul 26 2021, 11:40:16)
using SymPy 1.12, mpmath 1.3.0, numpy 1.24.3, cython Not installed
The text was updated successfully, but these errors were encountered:
I just had a chance to look at this. (I will be pretty busy until the beginning of May).
First of all, the result is not wrong. The result just isn't simplified as you expect. I am not seeing anywhere in WMA docs that say that results have to be automatically simplified.
If you surround the result in an explicit Symplify[] call, you do get the results you expect. So that is a workaround.
Description
Simple simplifications sometimes fail. Here are some examples:
Correct:
Should be
50 Sqrt[5] + 218 Sqrt[3]
:How to Reproduce
I just opened a Mathics REPL and typed commands in. I observed the same behavior when I wrote the same commands in a script.
Expected behavior
Choosing relatively prime
x
andy
, I wrote expressions of the forma Sqrt[x] + b Sqrt[y] + c Sqrt[x]
, varying the coefficients. Depending on some relationship between the radicands, a sufficiently largeb
(see 5 and 50 in the example) seemed to produce this behavior for lots of values ofx
andy
.Your Environment
The text was updated successfully, but these errors were encountered: