Post Reply 
(12C) Body Surface Area
07-30-2021, 02:10 PM (This post was last modified: 07-30-2021 02:16 PM by C.Ret.)
Post: #5
RE: (12C) Body Surface Area
(07-29-2021 12:24 AM)Gamo Wrote:  In the pass, couple user here not recommend to use the [Y^X] if possible because of high risk of accuracy error.

That's really true, I remember being trapped by a lost of accuracy of the x^y function last year when trying to adapt a specific algorithm for the HP-65 in a friendly challenge to enumerate rationals as Calkin Wilf Suites at the french Silicium.org forum.

I have had a hard time understanding why a code that was running correctly on my HP-15C Voyager didn't run correctly on Danny's HP-65 calculator.


I like the dynamic of your program for the Voyager series (as well as any HP RPN calculator with user short label A through C :


Code
LBL A LOG .425 x RTN // Enter Weight in Kg
LBL B LOG .725 x RTN // Enter Height in cm
LBL C + 2.144 - 10^X RTN // Display BSA answer in m²

Usage:
Enter Weight and press [A], enter Height and press [B], then [C] display the corresponding BSA
OR
Enter Height and press [B], enter Weight and press [A], then [C] display the corresponding BSA


I like the way parameters are entered with labels A & B (or b & A) filling the stack with parameters and how the computation is achieved by label C. There no mix up with the order the user have to enter Weight or Height. Both order produce the correct answer.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(12C) Body Surface Area - Gamo - 07-28-2021, 04:34 AM
RE: (12C) Body Surface Area - C.Ret - 07-28-2021, 09:01 PM
RE: (12C) Body Surface Area - Gamo - 07-29-2021, 12:24 AM
RE: (12C) Body Surface Area - Albert Chan - 07-29-2021, 10:38 AM
RE: (12C) Body Surface Area - C.Ret - 07-30-2021 02:10 PM



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