Re: [WP34S] SLV returns "Failed" when it finds a root just fine. Message #3 Posted by Dieter on 27 Nov 2011, 9:20 a.m., in response to message #1 by Les Wright
There is or was a problem with the solver in that it checks whether the function result of the final approximation is close to zero, as far as I know using the x~~0 test. In SCI, ENG or ALL mode this is equivalent to a test whether x is exactly zero. However, in many cases even the best possible 16-digit result does not return a plain zero. And the solver will throw an error.
This is also true in this case. The correct solution is the cuberoot of 36, i.e. 3,301 9272 4889 4627 for which the function result is 1E-14. Rounded in ALL mode, this still remains 1E-14 and not zero, making the solver think it has failed. However, the root SLV has found so far is 3,301 9272 4889 4673 in X and Y, which is not the exact 16-digit value.
Now try the same in FIX 11 mode and the solver returns a result that is correct in all 11 displayed decimals: 3,301 9272 4889. The final function result in Z is 1,51E-12 which in FIX 11 nicely rounds to zero, thus confiming that the solver has found a valid result.
As long as this has not been corrected, the well-known workaround from the olden days may be used: round small function results to zero. In this case, changing x by 1 ULP (1E-15) will change f(x) by more than 3E-14, so anything below 1E-13 may be considered zero. So simply add "EEX 4 + RCL—L" to the function routine and the solver will find a result even in ALL mode.
By the way, there is no need for "3 y^x" since there is a dedicated CUBE function, as well as CUBERT and another one for the xth root of y. These functions also provide better precision.
Dieter
Edited: 27 Nov 2011, 9:51 a.m.
|