Post Reply 
HHC 2018 Programming Contests
10-07-2018, 01:46 PM
Post: #86
RE: HHC 2018 Programming Contests
Here's a cleaned up version of my previous post.
Code:
@ THIS IS NOT MY CONFERENCE ENTRY.
@ I came up with this one over the days since the conference.
@ It's similar to many others already posted.
@ P has maxima on days 6 and 17.
@ E has maxima on days 7 and 14. This is equivalent to
@ to a 14 day cycle with maxima on day 7.
@ I has maxima on days 8 and 25.

@ Using the Chinese remainder theorem and the ICHINREM command
@ on the 50g, the extrema days occur on these cycles:
@ { 91 371 } MOD 462
@ { 190 305 454 569 } MOD 759
@ { 63 259 } MOD 322


@ Enter birthdate
@ in the current calc format (MM.DDYYYY by default)
«
     DUP DATE DDAYS @ Get days since birthday
     DUP DUPDUP 3 \->LIST
     { 462 759 322 } MOD
     { [ 91 371 553 0 ]
       [ 190 305 454 569 949 0 ]
       [ 63 259 385 0 ] }
     SWAP
     2
     @ Level 2: an array in sorted order (except last value)
     @ Level 1: a number less than largest value in array
     @ This returns the smallest value in the L2 array
     @ that is larger than the L1 value.
     « \-> X
       « 1 DO GETI UNTIL X > END
         1 - GET X -
       »
     »
     DOLIST
     « MIN » STREAM
     +

   @ Stack is birthday days_to_extreme
   DUP UNROT DATE+ "EXTREMA" \->TAG
   SWAP
   { 23 28 33} /        @ Convert days to cycles
   2. * 3.14159265359 * @ Cycles to radians
   SIN 100. * 0. RND    @ Radians to biorhythm value
   { "PHYS" "EMOTION" "INTELLECT" } \->TAG
   OBJ\-> DROP
»
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HHC 2018 Programming Contests - Joe Horn - 09-13-2018, 02:17 PM
RE: HHC 2018 Programming Contests - pier4r - 09-13-2018, 06:29 PM
RE: HHC 2018 Programming Contests - Zaphod - 09-13-2018, 10:10 PM
RE: HHC 2018 Programming Contests - Gene - 09-13-2018, 10:56 PM
RE: HHC 2018 Programming Contests - Gene - 09-14-2018, 12:06 AM
RE: HHC 2018 Programming Contests - Jlouis - 09-19-2018, 07:00 PM
RE: HHC 2018 Programming Contests - sasa - 09-19-2018, 11:17 AM
RE: HHC 2018 Programming Contests - pier4r - 09-29-2018, 07:41 PM
RE: HHC 2018 Programming Contests - 3298 - 09-30-2018, 05:32 PM
RE: HHC 2018 Programming Contests - 3298 - 09-30-2018, 08:47 PM
RE: HHC 2018 Programming Contests - Gene - 09-29-2018, 07:22 PM
RE: HHC 2018 Programming Contests - Gene - 10-01-2018, 02:55 AM
RE: HHC 2018 Programming Contests - sasa - 10-01-2018, 05:31 AM
RE: HHC 2018 Programming Contests - sasa - 10-01-2018, 09:54 AM
RE: HHC 2018 Programming Contests - 3298 - 10-01-2018, 06:37 AM
RE: HHC 2018 Programming Contests - Werner - 10-01-2018, 01:42 PM
RE: HHC 2018 Programming Contests - Werner - 10-02-2018, 06:10 AM
RE: HHC 2018 Programming Contests - Namir - 10-04-2018, 06:09 PM
RE: HHC 2018 Programming Contests - Werner - 10-03-2018, 02:03 PM
RE: HHC 2018 Programming Contests - Werner - 10-04-2018, 05:55 AM
RE: HHC 2018 Programming Contests - 3298 - 10-04-2018, 02:48 PM
RE: HHC 2018 Programming Contests - 3298 - 10-05-2018, 08:26 PM
RE: HHC 2018 Programming Contests - 3298 - 10-06-2018, 12:07 PM
RE: HHC 2018 Programming Contests - 3298 - 10-06-2018, 04:21 PM
RE: HHC 2018 Programming Contests - David Hayden - 10-07-2018 01:46 PM



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