Post Reply 
HHC 2018 Programming Contests
10-06-2018, 06:38 PM
Post: #85
RE: HHC 2018 Programming Contests
(10-06-2018 03:57 PM)Gerson W. Barbosa Wrote:  I was getting wrong biorhythm results until I noticed my angle mode was set to RAD.

Please excuse my sloppiness.

(10-06-2018 04:21 PM)3298 Wrote:  Next discovery: exploding a sublist inside DOLIST (e.g. with an EVAL at the end of the program passed to DOLIST) causes all elements of the sublist to be added to the result list, no more flattening needed.

That's something I didn't consider. Here's a program that uses it:
Code:
«
  DATE DDAYS
  {
    { 63 259 385 }
    { 190 305 454 569 949 }
    { 91 371 553 }
  }
  OVER
  { 322 759 462 } MOD 2
  « - EVAL
  » DOLIST 1
  «
    IF DUP 0 ≤
    THEN DROP
    END
  » DOLIST
  SORT HEAD
  DATE OVER DATE+ ROT ROT +
  360 * { 23 28 33 } / SIN 100 * 0 RND
»

Both your 1 + trick and Gerson's masking trick are nice but distract from the problem.
Maybe that's only me but it took me a while to figure out why you had to do that.
I tried to avoid this.

Quote:There are dedicated units for angles, and when SIN gets an input tagged with one of these, the unit overrides the current angle mode.

That's a nice solution I wasn't aware of. Of course we could also use Didier's 0 ACOS trick.

Quote:And then there's a rare and kind of amusing bug.

Though I was aware of the issue I didn't consider it a problem.
It's also present in my HP-41CX program.
Otherwise I would have needed to use a register to save the date.

Kind regards
Thomas
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 - Thomas Klemm - 10-06-2018 06:38 PM



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