Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   Dev Hardware ForumsSOFTWAREProgramming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Hardware Forums Sponsor:
  Trader Rating: 0 · #1  
Old December 18th, 2006, 03:49 PM
spotdart spotdart is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Dec 2006
Posts: 3 spotdart User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 58 m 27 sec
Reputation Power: 0
Ti84: prime number program

I've been working on this program to find prime numbers for awhile, at the moment it hits a memory error at #743 and I am at a loss to improve it further. any suggestions would be much appreciated...


3->L1(1
1->A
3->X
Lbl D
x+2->X
for(B,1,A)
X/L1(B)->E
if E=int(E):GoTo D
end
A+1->A
X->L1(A
Disp X
GoTo D

Reply With Quote
  Trader Rating: 2 · #2  
Old December 18th, 2006, 04:33 PM
Nilpo's Avatar
Nilpo Nilpo is offline
Click here for more information.
 
Join Date: May 2004
Location: Salem, OH
Posts: 5,326 Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)  Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 1 Month 1 Week 2 Days 18 h 58 m 33 sec
Reputation Power: 5341
Send a message via ICQ to Nilpo Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo Send a message via XFire to Nilpo
MySpace Orkut
This seems a lot like homework to me. Check our forum rules.
__________________
Click the image if at any point you don't like my decision.

10011100011000101111100011100000011000000100000011 10010011011110110001101101011011110100011000001110 0100111101000100001

Visit Nilpo.com and Ask the Windows Guru!

Open me for some very useful links!    

Reply With Quote
  Trader Rating: 0 · #3  
Old December 18th, 2006, 04:49 PM
spotdart spotdart is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Dec 2006
Posts: 3 spotdart User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 58 m 27 sec
Reputation Power: 0
it isn't homework. I wish I was in a class where this sort of thing would be assigned. I really do.
also, there is no rule that I could find about homewrok. (this is still not homework)

Reply With Quote
  Trader Rating: 0 · #4  
Old December 18th, 2006, 08:20 PM
drumz0rz's Avatar
drumz0rz drumz0rz is online now
Call of Duty 4
Click here for more information
 
Join Date: Jun 2004
Location: NY
Posts: 5,047 drumz0rz User rank is General 41st Grade (Above 100000 Reputation Level)drumz0rz User rank is General 41st Grade (Above 100000 Reputation Level)drumz0rz User rank is General 41st Grade (Above 100000 Reputation Level)drumz0rz User rank is General 41st Grade (Above 100000 Reputation Level)drumz0rz User rank is General 41st Grade (Above 100000 Reputation Level)drumz0rz User rank is General 41st Grade (Above 100000 Reputation Level)drumz0rz User rank is General 41st Grade (Above 100000 Reputation Level)drumz0rz User rank is General 41st Grade (Above 100000 Reputation Level)drumz0rz User rank is General 41st Grade (Above 100000 Reputation Level)drumz0rz User rank is General 41st Grade (Above 100000 Reputation Level)drumz0rz User rank is General 41st Grade (Above 100000 Reputation Level)drumz0rz User rank is General 41st Grade (Above 100000 Reputation Level)drumz0rz User rank is General 41st Grade (Above 100000 Reputation Level)drumz0rz User rank is General 41st Grade (Above 100000 Reputation Level)drumz0rz User rank is General 41st Grade (Above 100000 Reputation Level)drumz0rz User rank is General 41st Grade (Above 100000 Reputation Level)  Folding Points: 384884 Folding Title: Super Ultimate Folder - Level 1Folding Points: 384884 Folding Title: Super Ultimate Folder - Level 1Folding Points: 384884 Folding Title: Super Ultimate Folder - Level 1Folding Points: 384884 Folding Title: Super Ultimate Folder - Level 1Folding Points: 384884 Folding Title: Super Ultimate Folder - Level 1Folding Points: 384884 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Weeks 4 Days 23 h 21 m 19 sec
Reputation Power: 3682
Send a message via AIM to drumz0rz Send a message via Google Talk to drumz0rz Send a message via XFire to drumz0rz
like it stops at the 734th prime number? maybe it just can't handle numbers that big.
__________________



Reply With Quote
  Trader Rating: 0 · #5  
Old December 18th, 2006, 08:41 PM
archnaid's Avatar
archnaid archnaid is offline
Moderator
Dev Hardware Expert (3500 - 3999 posts)
 
Join Date: Feb 2004
Posts: 3,908 archnaid User rank is General 23rd Grade (Above 100000 Reputation Level)archnaid User rank is General 23rd Grade (Above 100000 Reputation Level)archnaid User rank is General 23rd Grade (Above 100000 Reputation Level)archnaid User rank is General 23rd Grade (Above 100000 Reputation Level)archnaid User rank is General 23rd Grade (Above 100000 Reputation Level)archnaid User rank is General 23rd Grade (Above 100000 Reputation Level)archnaid User rank is General 23rd Grade (Above 100000 Reputation Level)archnaid User rank is General 23rd Grade (Above 100000 Reputation Level)archnaid User rank is General 23rd Grade (Above 100000 Reputation Level)archnaid User rank is General 23rd Grade (Above 100000 Reputation Level)archnaid User rank is General 23rd Grade (Above 100000 Reputation Level)archnaid User rank is General 23rd Grade (Above 100000 Reputation Level)archnaid User rank is General 23rd Grade (Above 100000 Reputation Level)archnaid User rank is General 23rd Grade (Above 100000 Reputation Level)archnaid User rank is General 23rd Grade (Above 100000 Reputation Level)archnaid User rank is General 23rd Grade (Above 100000 Reputation Level)  Folding Points: 525830 Folding Title: Super Ultimate Folder - Level 2Folding Points: 525830 Folding Title: Super Ultimate Folder - Level 2Folding Points: 525830 Folding Title: Super Ultimate Folder - Level 2Folding Points: 525830 Folding Title: Super Ultimate Folder - Level 2Folding Points: 525830 Folding Title: Super Ultimate Folder - Level 2Folding Points: 525830 Folding Title: Super Ultimate Folder - Level 2Folding Points: 525830 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 1 Month 4 Days 6 h 40 m 33 sec
Reputation Power: 2492
Quote:
Originally Posted by spotdart
it isn't homework. I wish I was in a class where this sort of thing would be assigned. I really do.
also, there is no rule that I could find about homewrok. (this is still not homework)


There is indeed a homework rule.

Quote:
like it stops at the 734th prime number? maybe it just can't handle numbers that big.


How large is the 734th prime, and how large is the 735th?

I don't know how much memory TI-84's have, that's a valid concern. You might get farther on an 89, and then you could even program in something other than TI-Basic and be much faster too.

Reply With Quote
  Trader Rating: 2 · #6  
Old December 18th, 2006, 08:41 PM
Nilpo's Avatar
Nilpo Nilpo is offline
Click here for more information.
 
Join Date: May 2004
Location: Salem, OH
Posts: 5,326 Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)  Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 1 Month 1 Week 2 Days 18 h 58 m 33 sec
Reputation Power: 5341
Send a message via ICQ to Nilpo Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo Send a message via XFire to Nilpo
MySpace Orkut
Quote:
Originally Posted by spotdart
it isn't homework.
We recently edited the forum rules. It could have been edited out by mistake. In any case, I gave you the benefit of the doubt, that's why this thread wasn't closed.

Reply With Quote
  Trader Rating: 2 · #7  
Old December 18th, 2006, 08:48 PM
Nilpo's Avatar
Nilpo Nilpo is offline
Click here for more information.
 
Join Date: May 2004
Location: Salem, OH
Posts: 5,326 Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)Nilpo User rank is General 65th Grade (Above 100000 Reputation Level)  Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1Folding Points: 186632 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 1 Month 1 Week 2 Days 18 h 58 m 33 sec
Reputation Power: 5341
Send a message via ICQ to Nilpo Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo Send a message via XFire to Nilpo
MySpace Orkut
The forum rules have been fixed. Thank you for taking the time to look.

Reply With Quote
  Trader Rating: 0 · #8  
Old December 18th, 2006, 08:56 PM
spotdart spotdart is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Dec 2006
Posts: 3 spotdart User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 58 m 27 sec
Reputation Power: 0
Quote:
originaly posted by drumz0rz
like it stops at the 734th prime number? maybe it just can't handle numbers that big.


that was really badly phrased on my part, it stops on the number 734

Reply With Quote
  Trader Rating: 0 · #9  
Old December 19th, 2006, 04:56 AM
mphill's Avatar
mphill mphill is offline
untitled
Click here for more information
 
Join Date: Oct 2005
Location: Zagreb
Posts: 3,679 mphill User rank is General 48th Grade (Above 100000 Reputation Level)mphill User rank is General 48th Grade (Above 100000 Reputation Level)mphill User rank is General 48th Grade (Above 100000 Reputation Level)mphill User rank is General 48th Grade (Above 100000 Reputation Level)mphill User rank is General 48th Grade (Above 100000 Reputation Level)mphill User rank is General 48th Grade (Above 100000 Reputation Level)mphill User rank is General 48th Grade (Above 100000 Reputation Level)mphill User rank is General 48th Grade (Above 100000 Reputation Level)mphill User rank is General 48th Grade (Above 100000 Reputation Level)mphill User rank is General 48th Grade (Above 100000 Reputation Level)mphill User rank is General 48th Grade (Above 100000 Reputation Level)mphill User rank is General 48th Grade (Above 100000 Reputation Level)mphill User rank is General 48th Grade (Above 100000 Reputation Level)mphill User rank is General 48th Grade (Above 100000 Reputation Level)mphill User rank is General 48th Grade (Above 100000 Reputation Level)mphill User rank is General 48th Grade (Above 100000 Reputation Level)  Folding Points: 14729 Folding Title: Novice Folder
Time spent in forums: 3 Months 2 Weeks 4 Days 11 m 52 sec
Reputation Power: 4203
Send a message via ICQ to mphill
Quote:
Originally Posted by Drumzorz
like it stops at the 734th prime number? maybe it just can't handle numbers that big.

734th prime number is 5563.
Quote:
Originally Posted by archnaid
How large is the 734th prime, and how large is the 735th?

734th prime number is 5563.
735th prime number is 5569.


It doesn't sounds big to me.
__________________
Click Here ->    

Reply With Quote
  Trader Rating: 0 · #10  
Old January 12th, 2007, 05:19 PM
taron taron is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Jan 2007
Posts: 8 taron User rank is Corporal (100 - 500 Reputation Level)taron User rank is Corporal (100 - 500 Reputation Level)taron User rank is Corporal (100 - 500 Reputation Level)taron User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 h 9 m 4 sec
Reputation Power: 0
Quote:
Originally Posted by spotdart
I've been working on this program to find prime numbers for awhile, at the moment it hits a memory error at #743 and I am at a loss to improve it further. any suggestions would be much appreciated...


3->L1(1
1->A
3->X
Lbl D
x+2->X
for(B,1,A)
X/L1(B)->E
if E=int(E):GoTo D
end
A+1->A
X->L1(A
Disp X
GoTo D

you made a mistake in the program itself
it's dumb to use if var then goto because it will keep using more ram unless you put an end statement at the beginning of the new label.
try out this:
3->L1(1
1->A
3->X
Goto D
Lbl A
End
Lbl D
x+2->X
for(B,1,A)
X/L1(B)->E
if E=int(E)
Then
GoTo A
end
A+1->A
X->L1(A
end
Disp X
GoTo D

edited it again, this should work even longer. i didn't try it, but i found a 'unclosed' for statement in my previous edit, try this.

Reply With Quote
  Trader Rating: 0 · #11  
Old April 1st, 2008, 03:31 PM
Jagraffamel's Avatar
Jagraffamel Jagraffamel is offline
Contributing User
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Location: Small Town America.
Posts: 86 Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Jagraffamel User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)