10C Gamma and other holiday surprises. - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: 10C Gamma and other holiday surprises. (/thread-145337.html) |
10C Gamma and other holiday surprises. - Egan Ford - 01-03-2009 At home I keep my math and calculator hobbies mostly to myself. My wife and kid are aware of my hobbies, but do not share in them. You can then imagine my surprise when I received a very nice 10C in box with manual, registration card, etc... for Xmas this year. My lovely wife independently determined after secretly inventorying my collection that I needed a 10C. Wow! Programmatically the 10C is very limited compared to other Voyagers--even the 12C. There is a 79 step limit that will never be reached with most programs because it exhausts all of the registers.
As my first self-challenge I ported my 12C Gamma function (http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv016.cgi?read=100275, Message #6): 01 X^2 13 * 25 RCL 0 37 8 49 PIIt needs a bit of work, but for now just enter any positive or negative decimal number, then press R/S. The results will be stored in registers 0 and 1: RCL 0 = Gamma(|x|)IOW, if you entered a negative number use RCL 1 for your result. NOTE: Read the 12C link above on the implementation details. Also note that this Gamma is really Gamma(x)=(x-1)! just like the 15C.
But wait, there's more... For Xmas my 17-year-old daughter-artist painted on 24" canvas her interpretation of a calculator: Calculators by Dhemerae Ford Wow-Wee! Edited: 3 Jan 2009, 4:21 p.m.
Re: 10C Gamma and other holiday surprises. - Allen - 01-03-2009 Very impressive, Egan. I am always impressed by your programming skills. I do not know of a more versatile programmer than you, and with your thoughtful wife and artful daughter, you have now three things to be very proud of. (FWIW I think Dhemerae's picture is extremely impressive for any age.. excellent mix of old and new,and fitting color scheme since it matches the box designs of the HP-10C .)
Happy new year to you!
Re: 10C Gamma and other holiday surprises. - Gerson W. Barbosa - 01-03-2009 Congratulations for your new 10C, the nice painting and the 12C Gamma porting! Now, since you appear to be in the mood, try porting the related 12C program below to the 10C:
01 . 17 5 I guess you'll need only 20 steps on the 10C. You might want to change the third step:
03 -
Gerson.
Re: 10C Gamma and other holiday surprises. - V-PN - 01-03-2009
Why so negative... Quote: Re: 10C Gamma and other holiday surprises. - Gerson W. Barbosa - 01-03-2009 Quote: Ok, "let's have a positive attitude" and keep it unchanged. I just had overlooked Egan Ford's statement "Also note that this Gamma is really Gamma(x)=(x-1)! just like the 15C." Gerson.
Re: 10C Gamma and other holiday surprises. - Egan Ford - 01-04-2009 Thanks and my daughter thanks you as well.
Re: 10C Gamma and other holiday surprises. - Egan Ford - 01-04-2009 Here you go, 10C Gamma(x + 1/2), x is an integer: 0 <= x < 34: 01 . 10 2Like your version above the input is limited to integers (0 <= x < 34) + 1/2, i.e. 0.5, 1.5, 2.5, ... 33.5. This makes sense because (34.5 + .5) * 2 = 70, and n! is limited to 69! on all Voyagers. My original 10C version is approximately limited to real numbers -48 < x <= 48 where x != integers <= 0. If I had more instructions I could check for negative integers and return 9.9999999E99 like the 15C does (sans the blinking) and just use n! for integers >= 0. The built-in 15C version is approximately limited to real numbers -69 < x <= 69.
Edited: 4 Jan 2009, 1:14 p.m.
Re: 10C Gamma and other holiday surprises. - Egan Ford - 01-04-2009 Quote:If you change "03 +" to "03 -" then you get the proper Gamma results. :-) Re: 10C Gamma and other holiday surprises. - Gerson W. Barbosa - 01-05-2009 Very nice and one step shorter! But of course I prefer your original 12C and 10C programs. Thanks for making them available!
Gerson.
|