HP Forums
Bug? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Bug? (/thread-646.html)



Bug? - Helge Gabert - 02-10-2014 12:55 AM

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.


RE: Bug? - Marcus von Cube - 02-10-2014 09:23 PM

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.


RE: Bug? - Helge Gabert - 02-10-2014 11:31 PM

I believe that the problem is with the IM function (in XCAS), rather than SQRT, but maybe it is both, who knows?


RE: Bug? - parisse - 02-11-2014 08:24 AM

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]


RE: Bug? - Helge Gabert - 02-11-2014 03:42 PM

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!