Bug?
02-10-2014, 12:55 AM
Post: #1
 Helge Gabert Senior Member Posts: 458 Joined: Dec 2013
Bug?
F6(X):=X^2-IM(sqrt(X))-3

The roots are sqrt(3), and -2.11... (verify on the graph screen with plot)

Try (in CAS) fsolve(F6(x),x) returns [-1.732... 1.732] ???

or nSolve(F6(x)=0,x=-2) returns -1.732... ???

Same problem with solve, zeros, etc. . . The IM() function seems to be ignored, and the negative root is not found.
02-10-2014, 09:23 PM
Post: #2
 Marcus von Cube Senior Member Posts: 754 Joined: Dec 2013
RE: Bug?
Are you sure that the function is ever executed with complex intermediate results? I assume that the solver only uses real valued functions and thus excludes negative values for the sqrt function.

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
02-10-2014, 11:31 PM
Post: #3
 Helge Gabert Senior Member Posts: 458 Joined: Dec 2013
RE: Bug?
I believe that the problem is with the IM function (in XCAS), rather than SQRT, but maybe it is both, who knows?
02-11-2014, 08:24 AM
Post: #4
 parisse Senior Member Posts: 1,004 Joined: Dec 2013
RE: Bug?
im(sqrt(x)) should indeed stay as is, currently returns 0. Will be fixed in Xcas and sent to HP source codebase. With the fixed version
fsolve(x^2-im(sqrt(x))-3,x=-4..4)
returns
[-2.11012484911,1.73205080757]
02-11-2014, 03:42 PM
Post: #5
 Helge Gabert Senior Member Posts: 458 Joined: Dec 2013
RE: Bug?
Thank you - - as I posted elsewhere, I start liking the HP Prime more and more. And the responses from you and the development team are very pro-active!
 « Next Oldest | Next Newest »

User(s) browsing this thread: 1 Guest(s)