Author Topic: Help on My Program  (Read 2812 times)

0 Members and 1 Guest are viewing this topic.

Offline sammyMaX

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 204
  • Rating: +9/-0
    • View Profile
Help on My Program
« on: January 15, 2012, 07:25:31 pm »
Hi guys,
It's been a while since I've been on Omnimaga, but now that I have some time, I would like to get back to my program.

Basically, I gave up on it because after I wrote the code for displaying numbers that don't completely fit on the screen, I found that it stopped giving the correct answer at some random number. For example, it can tell me the first and last digits of 2155, but it gives an odd number for 2210, which is clearly not correct. I know that the Nspire isn't running out of RAM, because it's consistently able to make arrays of 18,000,000 chars. I don't know what the problem is, because I don't know why the program would just stop working after some arbitrary number.

Any ideas?
« Last Edit: January 15, 2012, 07:29:25 pm by sammyMaX »

Are you wondering who Sammy is? My avatar is Sammy.
   

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: Help on My Program
« Reply #1 on: January 16, 2012, 09:52:40 am »
hi

well, i calculated it and, i got this result:
1645504557321206042154969182557350504982735865633579863348609024

so it doesn't even start with 2809 xs

the 2^155 is correct, but the 2^210 is not..i checked it for a while to find some parts of it to be the same, but i didn't even seem to find some resemblance between your 2^210 and mine, it seems like a totally different number
« Last Edit: January 16, 2012, 09:53:31 am by Nick »

Offline sammyMaX

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 204
  • Rating: +9/-0
    • View Profile
Re: Help on My Program
« Reply #2 on: January 16, 2012, 10:02:22 am »
Yeah, I've noticed that my program always outputs numbers with a lot of 2809's and 2810's if it fails. I'll check my power function, it probably has some memory allocation bugs...

Are you wondering who Sammy is? My avatar is Sammy.