ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 18 Apr 2022 12:03:07 +0200negative number cannot be raised to a fractional power in RDFhttps://ask.sagemath.org/question/62030/negative-number-cannot-be-raised-to-a-fractional-power-in-rdf/Hi, can anyone tell me why this evaluation is correct:
var('y')
h(x,y) = sqrt(1-(cos(2*y)*sin(2*x)))
G(x,y) = sum([comp^2 for comp in diff(h)])
diff(G)(*vector(RR,(0.1,0.75)))
> (0.788319732748083,
> -0.281637345440034)
But this evaluation, using RDF, is not correct:
diff(G)(*vector(RDF,(0.1,0.75)))
> ValueError: negative number cannot be
> raised to a fractional power
I am aware that the error is related with the question [https://ask.sagemath.org/question/7820/fractional-power-to-negative-number/](https://ask.sagemath.org/question/7820/fractional-power-to-negative-number/), but I would expect the same behavior in both cases, with and without RDF.franpenaMon, 18 Apr 2022 12:03:07 +0200https://ask.sagemath.org/question/62030/Why does plot choke on x to the 1/3 power, when it will calculate it just fine?https://ask.sagemath.org/question/53976/why-does-plot-choke-on-x-to-the-13-power-when-it-will-calculate-it-just-fine/plot(x^(1/3),-10,10) fails for negative numbers:
'can't convert complex to float'
OTOH, sage will calculate a negative to the 1/3 just fine.
-10^(1/3).n()
-2.15443469003188
cybervigilanteTue, 20 Oct 2020 00:04:35 +0200https://ask.sagemath.org/question/53976/fractional power to negative numberhttps://ask.sagemath.org/question/7820/fractional-power-to-negative-number/bool( (-2)^(1/3) == - 2^(1/3) ) returns False
Is there any way in sage that will say they are same?
ShuThu, 16 Dec 2010 13:14:52 +0100https://ask.sagemath.org/question/7820/