RCL-57
06-04-2022, 03:02 AM (This post was last modified: 06-04-2022 05:54 AM by pauln.)
Post: #35
 pauln Member Posts: 84 Joined: May 2022
RE: RCL-57
(05-12-2022 04:37 PM)pauln Wrote:  [...] But a full biorhythm program seems beyond its capabilities. [...]

Actually it's possible! By the way, I forgot how much fun it can be to write programs within 50 steps.

The difficulty in this case is to find out the exact number of days between 2 dates in such limited space. The program works between 1901 and 2099 which should cover most of us...

Note though the following: this program expects the user to write dates for January and February using some special convention. In general dates are written as MM.DDYYYY but, for January, MM should be 13 and, for February, MM should be 14. Also for these 2 months, the year should be 1 less than the actual year.

Instructions:
1. Key in the program
2. 0.0001 STO 4
3. 3652500 STO 5
4. 30.6 STO 6
5. Enter birthdate: MM.DDYYYY STO 1
6. Enter today's date: MM.DDYYYY STO 2
7. RST R/S
8. 23 SBR 1 returns the physical score (scores are between -1 and 1)
9. 28 SBR 1 returns the emotional score
10. 33 SBR 1 returns the intellectual score

Code:
 # Computes the number of days between Day 1 and Day 2. # Result will be in register 3. RCL 2 SBR 0                       # Numbers of days until Day 2 STO 3 RCL 1 STO 2 SBR 0.                # Numbers of days until Day 1 INV SUM 3 R/S # Computes the biorhythm for a given period. # Number of days since birth should be in register 3. Lbl 1 / RCL 3 / 360 = 1/x sin R/S # Computes the number of days until some date. # Input should be in Register 2 with format MM.DDYYYY. Lbl 0 INT STO 7                    # R7 = MM INV SUM 2 2 INV log Prd 2 RCL 2 Int STO 0                        # R0 = DD INV SUM 2                    # R2 = 0.YYYY RCL 4 INV SUM 2 RCL 5 Prd 2 RCL 2 Int SUM 0                        # Add the number of days in YYYY years 3 INV SUM 7 RCL 6 Prd 7 RCL 7 + .5 = INT SUM 0                        # Add the number of days in MM months RCL 0 INV SBR
 « Next Oldest | Next Newest »

 Messages In This Thread RCL-57 - pauln - 05-11-2022, 03:35 AM RE: RCL-57 - Jlouis - 05-11-2022, 07:54 PM RE: RCL-57 - pauln - 05-11-2022, 09:22 PM RE: RCL-57 - rkf - 05-13-2022, 06:41 AM RE: RCL-57 - pauln - 05-13-2022, 12:58 PM RE: RCL-57 - pauln - 05-11-2022, 09:49 PM RE: RCL-57 - Matt Agajanian - 05-12-2022, 04:28 AM RE: RCL-57 - pauln - 05-12-2022, 04:37 PM RE: RCL-57 - Matt Agajanian - 05-12-2022, 06:31 PM RE: RCL-57 - Didier Lachieze - 05-13-2022, 11:11 AM RE: RCL-57 - pauln - 05-13-2022, 12:49 PM RE: RCL-57 - Matt Agajanian - 05-13-2022, 05:52 PM RE: RCL-57 - pauln - 05-15-2022, 08:52 PM RE: RCL-57 - Nigel (UK) - 05-16-2022, 08:45 AM RE: RCL-57 - pauln - 05-16-2022, 03:58 PM RE: RCL-57 - Werner - 05-20-2022, 07:36 AM RE: RCL-57 - pauln - 05-20-2022, 01:06 PM RE: RCL-57 - Werner - 05-23-2022, 07:39 AM RE: RCL-57 - pauln - 05-24-2022, 03:06 AM RE: RCL-57 - pauln - 05-21-2022, 02:13 PM RE: RCL-57 - Didier Lachieze - 05-21-2022, 03:37 PM RE: RCL-57 - pauln - 05-24-2022, 02:29 AM RE: RCL-57 - Matt Agajanian - 05-20-2022, 09:58 PM RE: RCL-57 - Dave Britten - 05-16-2022, 05:14 PM RE: RCL-57 - DrewNicholson - 05-18-2022, 04:45 AM RE: RCL-57 - Ren - 05-20-2022, 12:00 AM RE: RCL-57 - pauln - 05-20-2022, 12:12 AM RE: RCL-57 - Ren - 05-20-2022, 05:16 PM RE: RCL-57 - Gene - 05-21-2022, 03:46 PM RE: RCL-57 - pauln - 05-21-2022, 03:58 PM RE: RCL-57 - Gene - 05-21-2022, 04:25 PM RE: RCL-57 - Gene - 05-24-2022, 11:31 AM RE: RCL-57 - pauln - 05-24-2022, 03:27 PM RE: RCL-57 - Matt Agajanian - 05-25-2022, 05:42 PM RE: RCL-57 - pauln - 06-04-2022 03:02 AM RE: RCL-57 - Matt Agajanian - 06-04-2022, 05:48 AM RE: RCL-57 - pauln - 06-04-2022, 05:56 AM RE: RCL-57 - Matt Agajanian - 06-04-2022, 10:54 PM RE: RCL-57 - pauln - 06-12-2022, 06:48 AM RE: RCL-57 - Thomas Klemm - 06-12-2022, 10:05 AM RE: RCL-57 - pauln - 06-12-2022, 02:35 PM RE: RCL-57 - pauln - 07-30-2022, 03:54 PM RE: RCL-57 - pauln - 07-30-2022, 04:48 PM

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