1 | initial version |
WorksForMe(TM) in 9.8.beta4 :
sage: (-1)^(1/3)
(-1)^(1/3)
sage: QQbar((-1)^(1/3))
0.500000000000000? + 0.866025403784439?*I
sage: log(QQbar((-1)^(1/3)))
log(0.500000000000000? + 0.866025403784439?*I)
sage: real_part(log(QQbar((-1)^(1/3))))
log(1.000000000000000?)
sage: real_part(log(QQbar((-1)^(1/3)))).is_zero()
True
But beware : x^3+1==0
has three roots, whereas (-1)^(1/3) denotes only one of them. You should check :
sage: [u[0].log().real_part().is_zero() for u in (x^3+1).roots()]
[True, True, True]
2 | No.2 Revision |
WorksForMe(TM) in 9.8.beta4 :
sage: (-1)^(1/3)
(-1)^(1/3)
sage: QQbar((-1)^(1/3))
0.500000000000000? + 0.866025403784439?*I
sage: log(QQbar((-1)^(1/3)))
log(0.500000000000000? + 0.866025403784439?*I)
sage: real_part(log(QQbar((-1)^(1/3))))
log(1.000000000000000?)
sage: real_part(log(QQbar((-1)^(1/3)))).is_zero()
True
But beware : x^3+1==0
has three roots, whereas (-1)^(1/3) denotes only one of them. You should check :
sage: [u[0].log().real_part().is_zero() for u in (x^3+1).roots()]
[True, True, True]
or, if you prefer,
sage: [real_part(log(u.rhs())).is_zero() for u in solve(x^3+1==0, x)]
[True, True, True]
HTH,