This repository was archived by the owner on Feb 1, 2023. It is now read-only.
Commit 67d812a
Release Manager
Trac #30783: Sage thinks that I^(2/3) = -1
Revert #25218.
Rationale: #25218 makes `a^(p/q)` where a is a number field element
attempt to return a solution to `a^p = x^q` in the number field. This
makes powering inconsistent with coercions, since number fields often
(and, in the case of quadratic fields, automatically) come with a
complex embedding and complex numbers of various kinds use the principal
branch of the power function.
Among other confusing behaviors, we have
{{{
sage: I^(2/3)
I^(2/3)
sage: QQbar(I^(2/3))
0.500000000000000? + 0.866025403784439?*I
sage: QQbar(I)^(2/3)
0.500000000000000? + 0.866025403784439?*I
}}}
but
{{{
sage: I.pyobject()^(2/3)
-1
}}}
and
{{{
sage: QQi.<i> = QuadraticField(-1)
sage: i^(2/3)
-1
}}}
but
{{{
sage: QQbar(i)^(2/3)
0.500000000000000? + 0.866025403784439?*I
}}}
as well as
{{{
sage: CC((i^(1/6))^2)
0.866025403784439 + 0.500000000000000*I
sage: CC((i^(1/3)))
-1.00000000000000*I
sage: i^(1/3)*CC(i)^(1/3)
0.500000000000000 - 0.866025403784439*I
}}}
URL: https://trac.sagemath.org/30783
Reported by: mmezzarobba
Ticket author(s): Marc Mezzarobba
Reviewer(s): Sébastien Labbé1 file changed
+23
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2295 | 2295 | | |
2296 | 2296 | | |
2297 | 2297 | | |
2298 | | - | |
2299 | | - | |
2300 | | - | |
2301 | | - | |
2302 | | - | |
2303 | | - | |
| 2298 | + | |
| 2299 | + | |
2304 | 2300 | | |
2305 | 2301 | | |
2306 | 2302 | | |
| |||
2333 | 2329 | | |
2334 | 2330 | | |
2335 | 2331 | | |
2336 | | - | |
2337 | | - | |
2338 | | - | |
2339 | | - | |
2340 | | - | |
| 2332 | + | |
| 2333 | + | |
| 2334 | + | |
| 2335 | + | |
| 2336 | + | |
| 2337 | + | |
| 2338 | + | |
| 2339 | + | |
| 2340 | + | |
2341 | 2341 | | |
2342 | | - | |
2343 | | - | |
| 2342 | + | |
| 2343 | + | |
2344 | 2344 | | |
2345 | | - | |
2346 | | - | |
2347 | | - | |
2348 | | - | |
2349 | | - | |
2350 | | - | |
2351 | | - | |
2352 | | - | |
2353 | | - | |
2354 | | - | |
2355 | | - | |
2356 | | - | |
2357 | | - | |
2358 | | - | |
2359 | | - | |
2360 | | - | |
2361 | | - | |
2362 | | - | |
2363 | | - | |
2364 | | - | |
2365 | | - | |
2366 | | - | |
2367 | | - | |
| 2345 | + | |
| 2346 | + | |
| 2347 | + | |
| 2348 | + | |
| 2349 | + | |
| 2350 | + | |
| 2351 | + | |
| 2352 | + | |
| 2353 | + | |
| 2354 | + | |
2368 | 2355 | | |
2369 | 2356 | | |
2370 | 2357 | | |
| |||
0 commit comments