Post Reply 
About calculator benchmark (8 queens) and fast devices. MS challenge #2
05-05-2017, 12:30 PM (This post was last modified: 05-09-2017 03:41 AM by HrastProgrammer.)
Post: #14
RE: About calculator benchmark (8 queens) and fast devices. MS challenge #2
(05-02-2017 05:18 PM)pier4r Wrote:  Anyone willing to do it with HRAST BASIC?

This is the appropriate HRAST BASIC program based on the direct conversion of the above pseudocode for K=1:

Code:

WATCH INTEGER K=1,N=100^K,Q=SQR N
FOR I=N/10 TO N-1 O=I FOR L=N R=MOD(^O/Q,N) IF O<>R@ O=R NEXT ELSE LEAVE
NEXT ? TICKS

I don't have a real calculator with me and I could only test it on Emu48 with "Authentic Calculator Speed" enabled. The execution time is around 4.6s.

I will check it on the real HP-50G when I'll be back home.

http://www.hrastprogrammer.com/hrastwerk/
http://hrastprogrammer.bandcamp.com/
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: About calculator benchmark (8 queens) and fast devices. MS challenge #2 - HrastProgrammer - 05-05-2017 12:30 PM



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