Re: New Trigonometric Functions Program for the HP-12C Message #3 Posted by GWB on 27 Feb 2005, 3:38 p.m., in response to message #2 by hugh steers
Thank you for having pointed me out the mistakes. I have corrected the expressions and double-checked them.
Hugh Steers wrote:
Quote: pity about the ln(x).
I didn't like the ln(x) either, but this is the only way I found to recover x from the stack at that point. LN is a time consuming function I wanted to avoid. This causes the result to come out 500 to 600 ms later than it could, and this is a lot of time. That is, this instruction alone is responsible for about 10% of the total running time.
Hugh Steer wrote:
Quote:
i think there are a couple of silly mistakes tho’ in your article. some of the expressions are missing a bracket and the arcos expression is missing the arctan. and should the 90- be a 90+ ?
Actually there were more than a couple of silly mistakes (Having finished writing the article at 3:00 am last Friday might be an excuse).
You are right: the 90- should be a 90+. Thanks again.
All expressions may be copied and pasted to an equation plotter to graphically check the accuracy. Examples:
a)
Eq. 1: y=cos(pi*x/180)
Eq. 2: y=(4-(exp(x/68.3393)+1/(exp(x/68.3393))))/(2exp(x^2/21813))
x range: -550, 550
y range: -2, 2
b)
Eq. 1: y=(180/pi)atan(x);
Eq. 2: y=1844.6((exp(x)-1/exp(x))/(exp(x)+1/exp(x)))/(32.2-(abs(x))^3)
Eq. 3: y=90+1844.6((exp(-1/x)-1/exp(-1/x))/(exp(-1/x)+1/exp(-1/x)))/(32.2-(abs(-1/x))^3)
x range: -1, 10
y range: -10, 100
Regards,
Gerson
Edited: 27 Feb 2005, 5:01 p.m.
|