thanks.
Disqualified? I thought PT_ explicitly stated on SAX that nested parentheses didn't need to be handled.

jonbush wrote:
Please submit and update your program statistics using this form to have your program added to the leaderboard


For the record, there will be no nested parentheses for challenge 2:

Code:
<jonbush> Will there be nested parentheses? like (sqrt(6/2)^(11))*(39.1)
<saxjax> [lirtosiast] as subroutines (for example, literal parsing and a stack)
<saxjax> [PT_] Nope
<jonbush> That's good
<saxjax> [lirtosiast] No nested parens makes this much easier.
<saxjax> [PT_] I shouldn't make it harder as it is


EDIT: I commend your program 5 for covering all the ways primes could have been generated much more efficiently than mine did. However, I think it can be slightly faster as:


Code:
{some primes}->L1
remainder(N,Ans
If min(Ans
Then
{other primes}->L1
remainder(N,Ans
If min(Ans
Then
{more primes}->L1
remainder(N,Ans
If min(Ans
Then
{more primes}->L1
remainder(N,Ans
End
End
End
1+sum(not(cumSum(not(Ans
{L1(Ans),N/L1(Ans)->L1


Which decreases the number of times not( and cumSum( are called. min( takes only about a ms per list element, whereas not( takes about 0.7, cumSum( takes 1, and sum( takes 1.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement