2r^2 interpreted as 2^2 [closed]
var('r')
2r^2
outputs 4
Why is that?
var('r')
2r^2
outputs 4
Why is that?
Try the following code, notice the "*" I added:
var('r')
2*r^2
I hope its what you want GPN
Asked: 2023-12-24 04:20:51 +0100
Seen: 219 times
Last updated: Dec 24 '23
Please check the types in the following code:
to multiply, you need
*
Duplicate of https://ask.sagemath.org/question/75093/
I found the fact that
2r^2
was accepted extremely intriguing, and queried for it. John Palmieri's insightful answer pointed me to a feature of the preparser that I ignored after years of using Sage...