Many transcendental functions are already implemented with up to 2000 digits precision. Due to rounding errors, it works internally with 9 digits more than the requested precision. For most functions, only the last 2 or 3 digits are incorrect, and using 9 extra digits produces correctly rounded results for all the test cases.

Both normal and hyperbolic functions are implemented, though the final range reduction for some functions (ln, log, atanh) are still pending.

The total amount of space required for the lookup tables of precomputed constants is almost 1 MByte. This can be reduced by half if we are willing to sacrifice speed for some special cases. Specifically, the CORDIC method utilized requires additional tables in order to be able to handle very small numbers at the same speed as it does for large numbers. The additional 2 tables could only be compressed to about 250 kbytes each, almost doubling the space requirements.

The target hardware has 2 MBytes of flash, so at the moment ROM space is not considered critical, as the core code is relatively small.

Now regarding speed, on the PC the exponential function provided by the MPDecimal library takes about 1500 msec to compute exp(x) with 2007 digits precision. At the same precision, the new algorithm produces the same result in less than 500 msec, so we have achieved a speedup of about 3x. Also, the new algorithm does not require temporary memory storage, while the more generic function needs to allocate up to 32 kbytes of RAM just to compute exp() or ln(). Since RAM is very limited on our target, this is one of the main issues with the generic implementation.

The implementation that comes with the library only has exp() and ln(), but no trigonometric functions or hyperbolics. In order to implement a hyperbolic function by its exponential definition cosh(x)=1/2*(exp(x)+exp(-x)) for example, requires 2 exponentials at 1500 msec each, making it really slow at 3 seconds per operation (keep in mind these timings are measure on a PC, it will be orders of magnitude slower on the calculator). The new algorithm computes those functions directly, therefore it takes the same 500 msec to produce any of them.

The main advantage of the default implementation is that it can compute those transcendental functions without lookup tables and on unlimited arbitrary precision. The new algorithm requires tables, therefore even though the precision remains arbitrary, it is capped to a maximum being the precision used to compute the constants. Since our target will not be able to manage larger numbers due to both RAM limitations and processing speed, the 2000 digit limit seems reasonable.

It will take a couple more weeks to finalize all transcendental functions, but it's definitely on track. After that a small console demo will be developed and published that runs on the PC, it will be the initial source code release and we might release also binaries of the demo for easy testing.