Sympy doesn't simplify expression

79 views
Skip to first unread message

Anton Makarov

unread,
Mar 12, 2023, 7:55:50 AM3/12/23
to sympy
Hi, i have an expression:
expr = sympify("asinh(2)+sqrt(5)-oo")
When i try to simplify this expression:
expr_simplified = simplify(expr)
I get:
print(expr_simplified)
// -oo+asinh(2)
However, if i use the expression:
"asinh(2)+sqrt(5)+oo"
after simplification, i get:
"oo" - as it should be.
I think there is an error in sympy code, simplify function doesn't simplify expression to the end.
What you think about it?

Chris Smith

unread,
Mar 16, 2023, 11:43:30 AM3/16/23
to sympy
I get a worse result:

>>> simplify(asinh(2)+sqrt(5)-oo)
0
>>> simplify(asinh(2)+sqrt(5)+oo)
oo

Антон Макаров

unread,
Mar 16, 2023, 4:39:51 PM3/16/23
to sympy
What version of sympy did you use? I use sympy 1.11.



Отправлено из мобильной Почты Mail.ru


четверг, 16 марта 2023 г., 18:43 +0300 от smi...@gmail.com <smi...@gmail.com>:
I get a worse result:

>>> simplify(asinh(2)+sqrt(5)-oo)
0
>>> simplify(asinh(2)+sqrt(5)+oo)
oo

On Sunday, March 12, 2023 at 6:55:50AM UTC-5 antonv...@gmail.com wrote:
Hi, i have an expression:
expr = sympify("asinh(2)+sqrt(5)-oo")
When i try to simplify this expression:
expr_simplified = simplify(expr)
I get:
print(expr_simplified)
// -oo+asinh(2)
However, if i use the expression:
"asinh(2)+sqrt(5)+oo"
after simplification, i get:
"oo" - as it should be.
I think there is an error in sympy code, simplify function doesn't simplify expression to the end.
What you think about it?

--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/6d36a024-e28f-4233-8555-e4eb561dfc5fn%40googlegroups.com.

SOUVIK CHAKRABORTY

unread,
Mar 16, 2023, 10:24:23 PM3/16/23
to sy...@googlegroups.com
 𝚒𝚗𝚜𝚝𝚊𝚕𝚕 𝚜𝚢𝚖𝚙𝚢==1.6


𝙸𝚗𝚜𝚝𝚊𝚕𝚕 𝚝𝚑𝚊𝚝 𝚊𝚗𝚍 𝚝𝚑𝚎𝚗 𝚜𝚒𝚖𝚙𝚕𝚒𝚏𝚢! 

Anton Makarov

unread,
Mar 17, 2023, 2:16:01 PM3/17/23
to sympy
Sympy 1.6 is an old version.
How to fix these errors? What is the mechanism? I need to open an issue on github?

пятница, 17 марта 2023 г. в 05:24:23 UTC+3, souvikchak...@gmail.com:

Chris Smith

unread,
Mar 17, 2023, 3:24:46 PM3/17/23
to sympy
I opened issue #24928 for this.

/c

Reply all
Reply to author
Forward
0 new messages