This seems to be a follow-up to this 
<https://ask.sagemath.org/question/46819/numerical-integration-and-plot-failing/>
 ask.sahemath.org 
question.


   1. As already pointed out by Serge Lelièvre, this anomaly doesn't 
   happent in a Python3-based Sage. Possibly, the behaviour of floats raised 
   to a negative fractional power are different ?
   2. I took the liberty of pointing future  ask.sagemath readers to this 
   sage-devel thread for future reference.


HTH,

Le vendredi 5 juillet 2019 22:58:12 UTC+2, Piotr Sniady a écrit :
>
> Dear Developers,
>
> the code below produces a function which for any real u<3 gives as value 
> \pi/3.
> One can check that for any given number Sage has no problems to evaluate 
> this function
> and that it gives the right value.
>
> For strange reason I cannot integrate this function numerically.
> Also, I cannot plot this function.
>
> Magically, while for any given value Sage has no problems to give a 
> complex root of a negative number,
> for numerical integration the behavior of the root changes.
>
> Any help would be appreciated.
>
> Yours,
>
> Piotr
>
>
>
> def F(u):
>     return arg( (-3 + u )^(1/3) ).n()
>
> numerical_integral(F,1,2)
>
>
>
>
> Error message:
>
> negative number cannot be raised to a fractional power
>
>

-- 
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 post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/25731a37-ae73-470b-b943-6da6f1d9ef4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to