formatting fractions involving square roots
How can I tell sage that I want the result to be shown as 1√3 rather than 13√3 when I type show(1/sqrt(3))
?
How can I tell sage that I want the result to be shown as 1√3 rather than 13√3 when I type show(1/sqrt(3))
?
Asked: 9 years ago
Seen: 464 times
Last updated: Mar 20 '17
Not really convenient but it gives the expected answer:
show(sqrt(3).power(-1,hold=True))
.Thanks, that is at least something. While playing with this, I noticed that
power?
andpower??
documentation does not mention thehold
keyword at all.Searching for hold=True I just found https://ask.sagemath.org/question/757..., which makes this question a duplicate.
You have to look for
power
as a method of an expression, for example:x.power?
orpi.power??