in case, numpy types don't allow taking fractional powers of negative -1, it returns `nan`. E.g. In [9]: import numpy as np In [10]: m1=np.float64(-1) In [11]: m1**(1/3) <ipython-input-11-e14da7a49142>:1: RuntimeWarning: invalid value encountered in scalar power m1**(1/3) Out[11]: np.float64(nan)
(same with np.int*(), too) On Fri, Aug 30, 2024 at 12:54 PM Kwankyu Lee <ekwan...@gmail.com> wrote: > > On Friday, August 30, 2024 at 6:10:58 PM UTC+9 vdelecroix wrote: > > Secondly, I am very unhappy as a user with the following > > sage: AA((-1)**(1/3)) > -1 > > sage: QQbar((-1)**(1/3)) > 0.500000000000000? + 0.866025403784439?*I > > > This inconsistency is fixed by the proposal. > > Another parent consistent with the proposal > > sage: RBF(-1)^(1/3) > nan > sage: RBF((-1)^(1/3)) > ... > TypeError: unable to convert (-1)^(1/3) to a RealBall > > -- > 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/0085d8e3-4558-4e1f-bedd-435d47e934dfn%40googlegroups.com. -- 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/CAAWYfq2UrLouhQ5F8YGqmcTQsE8Mt2%3DVUjDQ%2B4AwPC9Q%2Bi%2Bm7w%40mail.gmail.com.