Ground breaking application!

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
tappatekie
Chaos Rift Junior
Chaos Rift Junior
Posts: 204
Joined: Mon Nov 21, 2011 3:01 pm
Current Project: Web browser from scratch
Favorite Gaming Platforms: SNES, PSP, PS1 and 3
Programming Language of Choice: C#
Location: A house near me
Contact:

Ground breaking application!

Post 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...
User avatar
k1net1k
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 563
Joined: Sun Nov 07, 2010 2:58 pm
Contact:

Re: Ground breaking application!

Post by k1net1k »

It looks right
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: Ground breaking application!

Post by dandymcgee »

k1net1k wrote:It looks right
:lol:
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
tappatekie
Chaos Rift Junior
Chaos Rift Junior
Posts: 204
Joined: Mon Nov 21, 2011 3:01 pm
Current Project: Web browser from scratch
Favorite Gaming Platforms: SNES, PSP, PS1 and 3
Programming Language of Choice: C#
Location: A house near me
Contact:

Re: Ground breaking application!

Post 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...
User avatar
thejahooli
Chaos Rift Junior
Chaos Rift Junior
Posts: 265
Joined: Fri Feb 20, 2009 7:45 pm
Location: London, England

Re: Ground breaking application!

Post 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.
I'll make your software hardware.
tappatekie
Chaos Rift Junior
Chaos Rift Junior
Posts: 204
Joined: Mon Nov 21, 2011 3:01 pm
Current Project: Web browser from scratch
Favorite Gaming Platforms: SNES, PSP, PS1 and 3
Programming Language of Choice: C#
Location: A house near me
Contact:

Re: Ground breaking application!

Post 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 <=
Last edited by tappatekie on Sat Apr 21, 2012 4:45 pm, edited 1 time in total.
User avatar
k1net1k
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 563
Joined: Sun Nov 07, 2010 2:58 pm
Contact:

Re: Ground breaking application!

Post 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 :)
tappatekie
Chaos Rift Junior
Chaos Rift Junior
Posts: 204
Joined: Mon Nov 21, 2011 3:01 pm
Current Project: Web browser from scratch
Favorite Gaming Platforms: SNES, PSP, PS1 and 3
Programming Language of Choice: C#
Location: A house near me
Contact:

Re: Ground breaking application!

Post 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
User avatar
k1net1k
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 563
Joined: Sun Nov 07, 2010 2:58 pm
Contact:

Re: Ground breaking application!

Post by k1net1k »

I'm a bit confused as to why you are doing this. Is it just a fun exercise ?
tappatekie
Chaos Rift Junior
Chaos Rift Junior
Posts: 204
Joined: Mon Nov 21, 2011 3:01 pm
Current Project: Web browser from scratch
Favorite Gaming Platforms: SNES, PSP, PS1 and 3
Programming Language of Choice: C#
Location: A house near me
Contact:

Re: Ground breaking application!

Post 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...
Post Reply