On Tue, Sep 3, 2024 at 5:08 PM Kwankyu Lee <ekwan...@gmail.com> wrote: > > > That in Python one has non-real value for (-1)**(1/3) is > two things: 1/3 is actually a float, and absence of typing. > These are artifacts of the programming language, and make little sense > mathematically. > > > Do you mean that the value of (-1)**(1/3) is arbitrarily chosen, regardless > of the mathematical value of (-1)^(1/3)?
no, I mean that 1) 1/3 gets converted to a float, and then you cannot escape dealing with (-1)**(0.333333...3), which is not equal to ((-1)**(0.333333...3))**3, unlike exact (-1)**(1/3). >>> a=(-1)**(1/3); a (0.5000000000000001+0.8660254037844386j) >>> a**3 (-1+3.885780586188048e-16j) 2) Python used to be untyped, and still is, to an extent, so returning a complex number instead of real wasn't such a big deal. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq0dW0%3DRQE_3ocSpC7-YE88wkBQ%3DAoVKMYKG2uiKnT%3D%2Baw%40mail.gmail.com.