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: 301 times
Last updated: Dec 24 '23
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.
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^2was 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...