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/why lim((x^2-x+1)^(1/2)+x,x=-oo,dir='below') is red errorhttps://ask.sagemath.org/question/24567/why-limx2-x112xx-oodirbelow-is-red-error/x=-oo, negative infinity,the answei is appear,but red error,1/2 is right?
lim((x^2-x+1)^(1/2)+x,x=-oo,dir='below')
Error in lines 0-2
Traceback (most recent call last):
File "/projects/9e8c4ed8-0b57-4535-b8f1-a0d0ef1b015b/.sagemathcloud/sage_server.py", line 841, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "<string>", line 1
)
^
SyntaxError: invalid syntaxcjshWed, 22 Oct 2014 13:45:41 +0200https://ask.sagemath.org/question/24567/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/