|
|
|||||
Topic, Scratch Projects | ||||||
| ||||||
You must register or log in to post a message.[edit] screw it, ill make a prime finder in it, just to see the speed :P if VarVar squared is greater than Var, its prime...also, before looping, check if its divisible by 2, and increase VarVar by 2 after each loop also, you might want to square your percentage value too, due to new code :P [edit] wait, change Var by VarVar? wtf code fail, says 49=prime I may need access to the whole thing, ive never used scratch code but by the look of that you go from 2 to whatever half the prime is... btw that 1000000th prime number check is at 93% now Without info; [repeat until ((Y/N=0) or (Var = ans/2)] write it here...(just the line declaring the loop) [edit] its not even trying, its only using half the available power from one of my processor cores (your version) :_ [edit] my C++ code can work out 2 038 074 743 is prime in about 20 seconds :3 [re-edit] OMFG! I optimised using the code using the sqrt limit, and its so fast I dont belive it(its near-instant) but after a few checks using other non-primes and primes it must be true o.O & btw mines currently churning out an 8 digit prime just to see what it can do,its been going for 7 minutes & its at 40%, did you stop after the square root of the value you were checking? because if you didnt, youre going over yourself... [edit] good prime to test: 1299709 its prime, I know it is because its the 100000th prime generated by MY prime finder made in C++ which happens to also work out a list of primes, and a special function for my friend which shows what 2 primes were multiplied together to make a certain value Also, I have a new Matching cards Game, How many moves does it take you? most(all for now) of my projects only work offline (downloaded). | GeneralFirst post of the topicAccounts: My account Geckojsc's account gameinsky'saccount Superdog ActionScript Projects: My Character Code Finder (Actionscript) Bonuslevel Matching Game AS Calculator |