newRPL - build 1255 released! [updated to 1299]
07-27-2018, 04:36 PM (This post was last modified: 07-27-2018 10:21 PM by Claudio L..)
Post: #232
 Claudio L. Senior Member Posts: 1,885 Joined: Dec 2013
RE: newRPL - build 1001 released! [update:build 1087]
All 3 roms were updated to build 1088 (see first post this thread).

Auto-evaluating variables are ready for testing (use is as described few posts above, will probably write up something better soon in the wiki).
Also ready for testing is a simple numeric integration command NUMINT. It uses the new "user-function evaluator" core, which takes a user function in 2 forms:

* As a program

The evaluation (used internally, perhaps in the future I'll add a command for the user to be able to evaluate a function using a similar format), will simply put the arguments in the stack and run the program. It's the user's responsibility to make sure the number of arguments match (the numeric integrator only supports functions in one variable, so the user-supplied program must take one argument from the stack and produce one result.

* As a symbolic in the form of equation: 'Myfunc(X)=X^2+SIN(X)'

The evaluation will take N arguments from the stack (N is as many arguments are in the function definition to the left of the = sign), create local variables with the names given in the function definition, and finally evaluate the right part of the symbolic. The name of the function is ignored, so you can be creative there (f(X) is boring...)

For the NUMINT command, you provide the function in one of the forms above, start and end points, and finally a desired tolerance in the error. It uses an adaptive Simpson algorithm which is not the best algorithm available, but it has a few advantages:
a) Low memory footprint
b) No precomputed weights or other fixed constants (this is important in a variable-precision environment like newRPL)

The FACTORS command is close to the original RPL command: just provide an integer and it will return a list with the prime factors. Beware that it's not a state-of-the art implementation, merely brute-force up to a certain limit, then Pollard-Rho for big numbers. It also works for polynomials, just like the original command.

As usual, please report any problems.
 « Next Oldest | Next Newest »