Jump to content

My number is bigger than yours! 3


Guest alemagno12

Recommended Posts

Oooh, I looked at the rules again!

"8.Functions (inc. computer programs) without inputs are allowed will be judged by their location on the fast-growing hierarchy."

and

"3c. Functions are certainly allowed, as long as the total number of digits in all of the inputs is not greater than 10.

3d. You can recursively define functions to beat this limit, as long as the function itself has no more than 10 digits of input and none of the functions used in defining the main function have more than 10 digits of input as well."

Fun times ahead....

How about this?


x = 9999999999 ##Ten digit maximum heeded.
y = 0 ##Secondary number
numList = [] ##Declare empty list

def NewListEntry(X,LIST): ##Creates a new index X in LIST. Thus, the number of digits stays at 10, but there are more than one number
LIST.append(X)

while True:
NewListEntry(x,numList)
for i in numList:
y += i

or this one?

##KSPFORUMFUNCTION

x = 999 ##Ten digit maximum heeded.
y = 2 ##Secondary number
numCounter = 0
numList = [] ##Declare empty list

def NewListEntry(X,LIST): ##Creates a new index X in LIST. Thus, the number of digits stays at 10, but there are more than one number
LIST.append(X)

while True:
NewListEntry(x,numList)
for i in numList:
y = y ** i
print(y)

The first number it ever returned:

>>>

5357543035931336604742125245300009052807024058527668037218751941851755255624680612465991894078479290637973364587765734125935726428461570217992288787349287401967283887412115492710537302531185570938977091076523237491790970633699383779582771973038531457285598238843271083830214915826312193418602834034688

The next would be that to the 999 power. But I don't want to break my computer, so I killed the program.

It actually may have reached the limit for a 64 bit OS.

Edited by Starwhip
Link to comment
Share on other sites

To be exact, Java is more familiar to me. It's fine, though.


[COLOR=#008000]// For the purpose of this, any number over maximum in double in Java appears very weirdly.[/COLOR]

[COLOR=#800080]public[/COLOR] class ImpossibleToMultiply {

[COLOR=#800080]public static void[/COLOR] main (String[] [COLOR=#ff8c00]args[/COLOR]) {
[COLOR=#800080]double[/COLOR] x = 1.8 * Math.[I]pow[/I](10, 308);
[COLOR=#800080]for[/COLOR] ([COLOR=#800080]int[/COLOR] [COLOR=#ff8c00]i[/COLOR] = 0; [COLOR=#ff8c00]i[/COLOR] < [COLOR=#ff8c00]x[/COLOR]; [COLOR=#ff8c00]i[/COLOR]++);
[COLOR=#ff8c00]x[/COLOR] = Math.[I]pow[/I]([COLOR=#ff8c00]x[/COLOR], [COLOR=#ff8c00]x[/COLOR]);
System.[B][I][COLOR=#0000ff]out[/COLOR][/I][/B].println([COLOR=#ff8c00]x[/COLOR]);
}

}

This returns almost the highest number in Java... to the highest number in Java... power. And the answer will multiply by itself until i has reached x (at least in theory) or until Eclipse (IDE for Java) or even the computer crashes (at least in reality), or Java will return weird numbers (also in reality).

Edited by Designer225
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...