HP 15C:  Stair Calculations
Variables:
Input:  
R0 = Riser Height (RH)
R1 = Run
R2 = Rise
Store values in R0, R1, and R2 before running the
program.
Output:
R3 = number of stairs (S)
R4 = Treadwidth (TW)
R5 = Stringer Length (ST)
Formulas Used:
S = int(rise/RH) – 1
TW = run/S
ST = S * √(RH^2 + TW^2)
| 
Step | 
Key | 
Key Code | 
| 
001 | 
LBL C | 
42, 21, 13 | 
| 
002 | 
RCL 2 | 
45, 2 | 
| 
003 | 
RCL÷ 0 | 
45, 10, 0 | 
| 
004 | 
INT | 
43, 44 | 
| 
005 | 
1 | 
1 | 
| 
006 | 
- | 
30 | 
| 
007 | 
STO 3 | 
44, 3 | 
| 
008 | 
R/S (S) | 
31 | 
| 
009 | 
1/X | 
37 | 
| 
010 | 
RCL* 1 | 
45, 20 ,1 | 
| 
011 | 
STO 4 | 
44, 4 | 
| 
012 | 
R/S  (TW) | 
31 | 
| 
013 | 
X^2 | 
43, 11 | 
| 
014 | 
RCL 0 | 
45, 0 | 
| 
015 | 
X^2 | 
43, 11 | 
| 
016 | 
+ | 
40 | 
| 
017 | 
√  | 
11 | 
| 
018 | 
RCL* 3 | 
45, 20, 3 | 
| 
019 | 
STO 5 | 
44, 5 | 
| 
020 | 
RTN | 
43, 32 | 
Example:
R0 = 7 inches (riser height)
R1 = 56 inches (run)
R2 = 80 inches (rise)
Results:
R3 = 10 (number of stairs)
R4 = 5.6 inches (treadwidth)
R5 ≈ 89.6437 inches (stringer)
This blog is property of Edward Shore.  2016 
