Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - sammyMaX

Pages: 1 ... 4 5 [6] 7 8 ... 14
76
TI-Nspire / Re: BigNumNum Cruncher
« on: February 20, 2012, 02:27:27 pm »
I haven't had much time to work on my project, but Winter Break = time to code :)
My checklist of things to do:
1. Allow large numbers to be viewed easily
2. Program:
   a. Sum of digits
   b. Trailing zero counter
   c. Factorial
   d. nCr
   e. Division
3. Make a menu system

By the way, did anyone take the AMC 10/12? How did you do?

77
TI-Nspire / Re: BigNumNum Cruncher
« on: January 28, 2012, 06:40:21 pm »
Version 0.16a: multiplication is around 20% faster, and a bug was fixed that allowed exponents to only be up to four digits in length.

More importantly, the exponentiation algorithm has been improved significantly - it now uses exponentiation by squaring instead of the naive method. The calculation times grow much slower now, and the difference in speed grows larger as the exponent grows. Here's a chart comparing speeds of 0.15a and 0.16a doing powers of two:

78
Oh, lol. I don't know what could be the problem then, if you have the PATH set correctly.

79
If this is in Linux, I had the exact same problem. I had gcc-4.5-arm-linux-gnueabi installed, but not gcc-arm-linx-gnueabi.

80
TI-Nspire / Re: BigNumNum Cruncher
« on: January 21, 2012, 09:13:40 am »
If I store x digits per int, I only want the last x digits of a product (or sum or difference) and send the rest as a carry. That means all the numbers I get as results will be in the range of an int, but during the intermediate steps, some numbers will come out that don't fit in the integer range. For example, if I store 10 digits per int, and multiply them, the carry will be within range, and the last 10 digits will also be in range, but the product of the two numbers itself won't be. Storing 4 digits per int is the max that keeps all multiplications within range of an int.

81
TI-Nspire / Re: BigNumNum Cruncher
« on: January 20, 2012, 05:05:13 pm »
Thanks! :)

I do a lot of math contests, and although the Nspire has helped a lot in them (at least the ones where calculators are allowed) I always dreamed of something more powerful, something that could answer a question like, "find the sum of the digits of 800!"

82
TI-Nspire / Re: TI-Nspire emulator
« on: January 20, 2012, 04:30:37 pm »
Please update the first page (which still gives version 0.53)

My advice for emulation is to download every single OS available, and keep it. (You never know when it might be useful.) I also have a shortcut to nspire_emu.exe for every single OS (each with different parameters), so I don't have to go into the console every single time I want to emulate the Nspire.

83
TI-Nspire / Re: [Ndless] BigNumNum Cruncher
« on: January 18, 2012, 08:49:23 pm »
YESSS!!!

It was what I thought - the array grew too large and the pointer ended up pointing to some random section of RAM.

Behold - the largest numbers ever computed on the Nspire!
Note: it took around 3-4 seconds to do 29001

84
TI-Nspire / Re: [Ndless] BigNumNum Cruncher
« on: January 18, 2012, 06:36:28 pm »
I actually programmed it to use the "..." when the entire output is too large to fit.
The first picture (showing 2155) is correct, while the second one, 2210, is not. I noticed that it always outputs a number with a lot of 2809's and 2810's when it's not correct.

There is a part of my program that might be screwing up. One of the parameters my power function takes in is an array of ints that will be the output.
Code: [Select]
int numPow(int in1[], int in2[], int output[], int in1len, int in2len)For that parameter (called output[]), I pass it the pointer to an array, and the array has only one int in it.
Code: [Select]
int *ans = malloc(4); // One int
int ansLen = numPow(in1, in2, ans, numInts1, numInts2);
The power function keeps calling my multiplication function, and resizes the array whenever it needs to. (Now that I think about it, this might not be so smart)

I'm thinking that if the array grows too large, and it has to move to a different address, my pointer (named ans) won't update to the new address, so it will point to the old one, which is now full of garbage.

Also, (Not really related) If you have:
Code: [Select]
int a;
int b = 2000000000; // Still within range
int c = 2000000000; // Still within range
a  = (b * c) % 10000000000; // Last 10 digits of the product
Does that work, or will it cause overflow? I am wondering because right now, I am storing numbers as arrays of ints with 4 digits in each int, which is quite inefficient.

85
Calculator C / Re: Help on My Program
« 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...

86
TI-Nspire / Re: [Ndless] BigNumNum Cruncher
« on: January 15, 2012, 07:28:50 pm »
Help?

87
Calculator C / 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?

88
Humour and Jokes / Re: If there was tech support in botswana...
« on: December 13, 2011, 07:08:37 pm »
Use an Ubuntu live CD to install an OS.

How do I obtain a CD when I am dead?

89
Humour and Jokes / Re: If there was tech support in botswana...
« on: December 13, 2011, 07:05:40 pm »
Program it.

Windows Update won't shut up

90
I have libssl-dev, zlib1g-dev, zlib1g, libssl1.0.0, and libssl0.9.8 installed. I don't know what else might be needed, but it seems to be some SSL library based on the errors.

Pages: 1 ... 4 5 [6] 7 8 ... 14