Jaime Villate
villa****@fe*****
2013年 2月 24日 (日) 21:49:08 JST
On 02/24/2013 11:24 AM, 市川 雄二 wrote: > > Executing > solution: solve(x^3-x^2+1=0, x), rectform; > ... > > The second one in solution is a real root. > To know the concrete value, executing > solution, float; > results > [x=0.744861766619749*%i+.8774388331233485,x=-.7548776662466969,x=.8774388331233485-0.744861766619749*%i]. > > I want to get this result by single command. > But executing > solution: solve(x^3-x^2+1=0, x), rectform, float; > results > [x=.7448617666197254*%i+.8774388331233376,x=-8.480870326997723*10^-17*%i-.7548776662466756,x=.8774388331233378- > .7448617666197253*%i]. > > The second one includes a very small imaginary part. > > How can I avoid it? Hi, try solution: float( rectform( solve( x^3-x^2+1=0, x))); which allows you to make the three things in the order you want them to be made. In your original command solution: solve(x^3-x^2+1=0, x), rectform, float; you used function ev(), which is more unpredictable in the way the modifiers rectform and float will be applied. Regards, Jaime