Page 1 of 1

Ground breaking application!

Posted: Sat Apr 21, 2012 8:31 am
by tappatekie
I have just successfully calculated the maximum value for a 4096bit integer, that result is (it was just 2^4096)

Code: Select all

1044388881413152506691752710716624382579964249047383780384233483283953907971557456848826811934997558340890106714439262837987573438185793607263236087851365277945956976543709998340361590134383718314428070011855946226376318839397712745672334684344586617496807908705803704071284048740118609114467977783598029006686938976881787785946905630190260940599579453432823469303026696443059025015972399867714215541693835559885291486318237914434496734087811872639496475100189041349008417061675093668333850551032972088269550769983616369411933015213796825837188091833656751221318492846368125550225998300412344784862595674492194617023806505913245610825731835380087608622102834270197698202313169017678006675195485079921636419370285375124784014907159135459982790513399611551794271106831134090584272884279791554849782954323534517065223269061394905987693002122963395687782878948440616007412945674919823050571642377154816321380631045902916136926708342856440730447899971901781465763473223850267253059899795996090799469201774624817718449867455659250178329070473119433165550807568221846571746373296884912819520317457002440926616910874148385078411929804522981857338977648103126085903001302413467189726673216491511131602920781738033436090243804708340403154190336
I am pretty sure it's right, but if Im wrong, please say because I need to make sure my code works...

Re: Ground breaking application!

Posted: Sat Apr 21, 2012 9:44 am
by k1net1k
It looks right

Re: Ground breaking application!

Posted: Sat Apr 21, 2012 10:31 am
by dandymcgee
k1net1k wrote:It looks right
:lol:

Re: Ground breaking application!

Posted: Sat Apr 21, 2012 2:28 pm
by tappatekie
dandymcgee wrote:
k1net1k wrote:It looks right
:lol:
I've gone higher ;)
http://elysianshadows.com/phpBB3/viewto ... 735#p79735 one of the posts on there contains a 32768bit integer :D, and the best thing is, I can go even higher!.

Oh and lil question which is doing me head in, how would you calculate if a number is greater than another number? (without using any integer classes).
Well the first phase would be to check the string length...

Re: Ground breaking application!

Posted: Sat Apr 21, 2012 4:39 pm
by thejahooli
tappatekie wrote:Oh and lil question which is doing me head in, how would you calculate if a number is greater than another number? (without using any integer classes).
Well the first phase would be to check the string length...
What do you mean 'without using any integer classes'?

I assume you don't mean:

Code: Select all

if(x > y) // x is bigger
else // y is bigger
but that wouldn't require an integer class.

Re: Ground breaking application!

Posted: Sat Apr 21, 2012 4:42 pm
by tappatekie
thejahooli wrote: What do you mean 'without using any integer classes'?

I assume you don't mean:

Code: Select all

if(x > y) // x is bigger
else // y is bigger
but that wouldn't require an integer class.
I mean to actually detect if "1" is more than "2" without the use of default language syntax.
And btw, you are wrong with requiring an integer class, look at double's meta data, you would see implicit operators of > >= < and <=

Re: Ground breaking application!

Posted: Sat Apr 21, 2012 4:45 pm
by k1net1k
tappatekie wrote:
thejahooli wrote: What do you mean 'without using any integer classes'?

I assume you don't mean:

Code: Select all

if(x > y) // x is bigger
else // y is bigger
but that wouldn't require an integer class.
I mean to actually detect if "1" is more than "2" without the use of default language syntax.
And btw, you are wrong with requiring an integer class, look at double or any other integer meta data, you would see implicit operators of > >= < and <=
or x = y :)

Re: Ground breaking application!

Posted: Sat Apr 21, 2012 4:46 pm
by tappatekie
k1net1k wrote:
tappatekie wrote:
thejahooli wrote: or x = y :)
Lol yh, that's in as well as == and != (thats the EASIEST one to do...).
Oh god, I still need to do division :L

Re: Ground breaking application!

Posted: Sat Apr 21, 2012 4:47 pm
by k1net1k
I'm a bit confused as to why you are doing this. Is it just a fun exercise ?

Re: Ground breaking application!

Posted: Sat Apr 21, 2012 4:49 pm
by tappatekie
k1net1k wrote:I'm a bit confused as to why you are doing this. Is it just a fun exercise ?
Yep, fun excercise, but also plan to impliment these into my programming language "Plywood" so you basically don't have to worry about uint64 limits :D.

I was interested to see if it actually would work, and obviously it did, so now I have a class sitting on me project, thats capable of infinite integer values that acts like default integer types.
e.g

Code: Select all

LargeInt i = ulong.MaxValue;
i *= 5500;
i.Power(100);
Console.WriteLine(i);
The possibilities though are endless, e.g you can get an image or file, and convert its raw bytes into 1 number etc,etc...