I finished my first PalmOS project, a 16-digit scientific
calculator:
http://www.geocities.com/pablo_manalastas/acalc.html
It is not as fancy as EasyCalc, but I believe it is better
than the built-in Calc program on the Palm.
Now for some problems:
1. Where can I get polynomial approximations to the
scientific functions (exp, sin, tan, etc), that are 16-digits
accurate? MathLib gives at most 13-14 digits of accuracy.
Abramowitz & Stegun "Handbook of Math Functions" (National
Bureau of Standards) gives only 10-digits of accuracy. I do not
want to use infinite series expansion, since this gives
variable execution times.
2. I have given up the idea of recursive-descent predictive parsing
in favor of operator-precedence parsing using programmer-implemented
operand and operator stacks. The native 4K stack on the Palm
simply can not support recursive parsing. (I would have prefered
recursive parsing, since it is grammar-driven and I can
programmatically detect syntax errors as soon as they are
encountered on input). My question is, using operator-precedence
parsing (see my "evaluate.c" file), and using user-defined
functions whose definitions are "strings" (i.e., sec(x) is defined
as the string "1.0/cos(x)"), how does one compute a user-defined
function as a subexpression within the context of an existing
computation using the above stack-pair. I am thinking of using
a second stack-pair for computing user-defined functions, but you
might have a better idea.
Pablo Manalastas
_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]
To subscribe to the Linux Newbies' List: send "subscribe" in the body to
[EMAIL PROTECTED]