Post Reply 
Summation bug? (HP-49G, 50g)
01-13-2015, 07:06 PM
Post: #1
Summation bug? (HP-49G, 50g)
The HP-49G and HP-50g give wrong answers or error messages depending on the setting of flag -22 (infinite result) when the argument is zero. The HP-48g returns 1 as expected ( cos(0) = 1 ). When x = 0 the summation evaluates to 1.13518518518E498 on the HP-49G/50g, instead of zero. Am I missing something here? Thanks!

HP-50g:

Code:

%%HP: T(3)A(R)F(.);
\<< RCLF -17. SF SWAP \-> x 'COS(\v/3./3.*(x+x^9./(32.*9.!)-\GS(k=2.,4.,x^(2.*k-1.)/(5.*(2.^k-1.)*(2.*k-1.)!))))' EVAL SWAP STOF
\>>

HP-48:

Code:

%%HP: T(3)A(D)F(.);
\<< RCLF -17 SF SWAP
\-> x 'COS(\v/3/3*(x+x^
9/(32*9!)-\GS(k=2,4,x
^(2*k-1)/(5*(2^k-1)
*(2*k-1)!))))' EVAL
SWAP STOF
\>>
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Summation bug? (HP-49G, 50g) - Gerson W. Barbosa - 01-13-2015 07:06 PM



User(s) browsing this thread: 1 Guest(s)