NewRPL has found its first real-world application: it will be tasked to calculate the constants needed to implement transcendental functions. The fast method that will be used requires a table of constants depending on the maximum precision of the system. The constants are in the form:

ATAN(5*10^-k)

ATAN(2*10^-k)

ATAN(1*10^-k)

with k=1 .. prec
and prec= desired precision digits.
 
Through a series expansion for ATAN:
 
 
newRPL will iterate to determine all the constants needed.
 
In order to do that, the real numbers implementation in newRPL was modified to become "malloc" free. It now uses a small pool of statically allocated storage for temporary storage of digits.
It's fast and simple: there's 8 "buckets" with enough storage for the maximum amount of digits in the system. Since this is only used for intermediate calculations and never for final results, that's all it's needed. In the future, the number of buckets might be reduced once we prove they are not required (so far, a maximum of 2 are required for simple operations but as more complex routines are added, more might be needed.
Replacing the (slow) dynamic memory allocation model with all its problems of memory fragmentation, leaks and its associated slowdown over time was a requirement if we want newRPL to run smoothly over long periods of time.
 
Goodbye "malloc".