I want to tell maxima (-1)^0.33333333333333=-1, what should i do?



I think this is a bug related to the numer flag and exponentials:

(%i26) f(x) := (sqrt(-16*x^4-16*x^3+20*x^2+12*x+23)/(6*sqrt(3))+(16*x^3-12*x^2-6*x-25)/54)^(1/3)$
(%i27) float(f(-0.4));
(%o27) -0.27829699505019
(%i28) float(f(-0.4)), numer=true;
(%o28) .2782969950501902*(-1)^.3333333333333333

For the first part use:

(%i31) float((-5)^(1/3));
(%o31) -1.709975946676697

The plot2d function will set numer flat to true which causes the plot
to fail. You can bind numer to false in the function f:

f(x) := block([numer:false],
 float((sqrt(-16*x^4-16*x^3+20*x^2+12*x+23)/(6*sqrt(3))+(16*x^3-12*x^2-6*x-25)/54)^(1/3))
)$

plot2d(f, [x,-1,0])$

HTH,

Andrej



On Wed, Feb 18, 2009 at 4:53 AM, Xiang Liu <hsiang.liu at gmail.com> wrote:
> I am totally new to maxima.
>
> 1. How can I get the numerical value of (-5)^(1/3)?
>
> (%i70) (-5)^(1/3),numer;
> (%o70) 1.709975946676697*(-1)^0.33333333333333
>
> OR
>
> I want to plot2d for f(x) between (-1,0)
> (%i98) f(x);
> (%o98)
> (sqrt(-16*x^4-16*x^3+20*x^2+12*x+23)/(6*sqrt(3))+(16*x^3-12*x^2-6*x-25)/54)^(1/3)
>
> note: we can draw
> sqrt(-16*x^4-16*x^3+20*x^2+12*x+23)/(6*sqrt(3))+(16*x^3-12*x^2-6*x-25)/54
> easily.
>
> Thanks in advance
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>