HP Forums

Full Version: Re: Mini Challenge
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

First I was looking for LBL B in your program for the HP 15C but then I realized that this is not the only problem. I tried to fix it leaving as much as possible unchanged with the hope it's what you had in mind:

001 - 42,21,11   LBL A
002 - 44 0 STO 0
003 - 1 1
004 - 26 EEX
005 - 6 6
006 - 16 CHS
007 - 44 1 STO 1
008 - 42,21,12 LBL B
009 - 45 0 RCL 0
010 - 43 11 x2
011 - 1 1
012 - 40 +
013 - 2 2
014 - 10 ÷
015 - 44 2 STO 2
016 - 11 SQRT x
017 - 45 1 RCL 1
018 - 40 +
019 - 43 44 INT
020 - 43 11 x2
021 - 45 2 RCL 2
022 - 43,30, 6 TEST 6
023 - 22 13 GTO C
024 - 1 1
025 - 30 -
026 - 2 2
027 - 20 ×
028 - 31 R/S
029 - 42,21,13 LBL C
030 - 2 2
031 - 44,40, 0 STO + 0
032 - 22 12 GTO B

It has to be started with:

1 GSB A

Since internally a digit by digit method is used to calculate the square root I'm confident that taking the root of a square-number won't show any rounding errors. That's different from using an iterative algorithm and might be even worse when a binary representation for the numbers is used.

Therefore you can confidently omit lines 003-007 and 017-018 from the program above.

Thanks for pointing out the typos.