|
From: David S. <tom...@us...> - 2026-10-24 16:12:09
|
- **status**: open --> closed - **Comment**: Fixed by commit [d96bc5]. --- **[bugs:#5705] \(\(-1\)^\(1/6\)\)^2 simplifies to -1** **Status:** closed **Group:** None **Labels:** simplification simpexpt **Created:** Fri Oct 23, 2026 08:19 AM UTC by David Scherfgen **Last Updated:** Fri Oct 23, 2026 08:19 AM UTC **Owner:** nobody By Claude: With the default `domain : real`, Maxima reads `(-1)^(p/q)` with odd `q` as the real root, so `(-1)^(1/3)` simplifies to `-1`. `(-1)^(1/6)` has no real value and is the principal root `exp(%i*%pi/6)`, which is also how `rectform` and `float` evaluate it. But a power or a product of such roots is folded into `(-1)^(1/3)`, which is then read as the real root: ``` (%i1) ((-1)^(1/6))^2; (%o1) -1 (%i2) (-1)^(1/6)*(-1)^(1/6); (%o2) -1 (%i3) ((-8)^(1/6))^2; (%o3) -2 ``` The correct value of the first two is `exp(%i*%pi/3)`, that is `1/2+sqrt(3)*%i/2`: ``` (%i4) expand(float(rectform((-1)^(1/6)))^2); (%o4) 0.8660254037844386*%i+0.4999999999999999 ``` As `ratsimp` multiplies such powers out, it often returns wrong values for expressions with `(-1)^(1/6)` or `(-1)^(1/10)`. Here the difference should be `0`: ``` (%i5) r : ratsimp(1/(1+(-1)^(1/6))), algebraic : true; (%o5) -((%i+(-1)^(5/6)+(-1)^(1/6)-1)/2) (%i6) float(rectform(r - 1/(1+(-1)^(1/6)))); (%o6) 5.551115123125783e-17-0.8660254037844386*%i ``` With `domain : complex`, all of these are correct. --- Sent from sourceforge.net because max...@li... is subscribed to https://sourceforge.net/p/maxima/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/maxima/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |