Page 1 of 1
The Javascript Googolplex Equation
Posted: Sun Oct 01, 2006 12:12 am
by JellyFish
As the title hints, I'm looking for the Javascript Googolplex Equation!!!
If anyone has figured it out yet, post. Anyone has any Idea's on somewhere to start is good to.
Now I don't know much of what I'm doing

e.g. I'm not serious about this, but I'm sure there's a way to give a variable the value of The GOOGOLPLEX. Bahha!
Edit: I know this is kinda stupid but, why doesn't "^" in Javascript mean what it means in Math?
Posted: Sun Oct 01, 2006 12:24 am
by nickvd
Posted: Sun Oct 01, 2006 1:01 am
by JellyFish
Sweeaat! I found the Math method: pow(). I tried it out to get the value of googolplex and it returned "infinite"!!! I mean???
I tried just the googol i.e. 10^100. and it returns something like 1e+100 or something. Like how hard is it to write 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000??? How could I get this value from the pow method?
Posted: Sun Oct 01, 2006 6:34 am
by Chris Corbyn
^ is a bitwise operator XOR. It's the same in PHP and other languages

Posted: Sun Oct 01, 2006 8:41 am
by alex.barylski
You might also want to look into either:
a. Porting an existing Big/Large Integer library over to Javascript
-
http://www.koders.com/cpp/fid6BFB93B68C ... biginteger
b. Using an existing third party BI library
-
http://www-cs-students.stanford.edu/~tjw/jsbn/
Here are some more links on the subject, search google and I'm sure you'll find more
http://www.math.umbc.edu/~campbell/Numb ... ogramming/
HTH
Cheers

Posted: Sun Oct 01, 2006 12:57 pm
by JellyFish
I don't understand. "Porting an existing Big/Large Integer library over to Javascript." what does that mean?
Posted: Sun Oct 01, 2006 2:57 pm
by Chris Corbyn
JellyFish wrote:I don't understand. "Porting an existing Big/Large Integer library over to Javascript." what does that mean?
Computers are usually 32 bit. These days there are lots of 64 bit computers but either way; the Googol exceeds 32 bits so computers cannot physically compute it by themselves. This is the same cause as the unix epoch problem. Large bit size libraries do some magical things with stacks to run calculations rather than performing actual binary operations.
Posted: Sun Oct 01, 2006 3:06 pm
by JellyFish
I see. What does it mean 32bit? What part of the computer is this usually talking about? A link to an artical on this that explains everything about this would be appropiete.
Posted: Sun Oct 01, 2006 3:32 pm
by Chris Corbyn
JellyFish wrote:I see. What does it mean 32bit? What part of the computer is this usually talking about? A link to an artical on this that explains everything about this would be appropiete.
The bit that does all the processing is the CPU. CPUs come (mostly) in 32 bit or 64 bit.
http://en.wikipedia.org/wiki/Integer_(computer_science)