|
Twice as long as half an infinite loop?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Since infinity x 2 is still infinity, then by extension half of infinity is also still infinity.
|
|
|
|
|
And extending that:
½ × ∞ × 2 ≡ ∞
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Longer than it needs to be.
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
One less than ++(infiniteloop).
This space for rent
|
|
|
|
|
Well, that's a piece of p***.
In C, it's 10 characters.
while(1){}
As for the question I presume you seek the answer to, how long will it run? Meh, someone else can take that.
|
|
|
|
|
Message Closed
modified 21-Nov-20 21:01pm.
|
|
|
|
|
I call your for(;;); with a jmp main+1Eh
if (Object.DividedByZero == true) { Universe.Implode(); }
Meus ratio ex fortis machina. Simplicitatis de formae ac munus. -Foothill, 2016
|
|
|
|
|
Message Closed
modified 21-Nov-20 21:01pm.
|
|
|
|
|
But it's what for(;;); complies to in ASM with Visual C++. I know potato, potato.
if (Object.DividedByZero == true) { Universe.Implode(); }
Meus ratio ex fortis machina. Simplicitatis de formae ac munus. -Foothill, 2016
|
|
|
|
|
Oh, of course. Hmm, given the ASM answer, I think it's time to pull out the Donald card and go for machine language. (2 bytes - EB FE)
00401000 - EB FE - JMP SHORT 00401000
From the days I used 16bit TASM regularly, I think you could write this as jmp $-2 or perhaps it was jmp @-2 . I forget. I may be confusing TASM with MASM with NASM here.
Oh how the luxury of high-level languages spoils us.
Writing a huffman compressor/decompressor in asm to decompress the kernel is some er, 'fun'.
|
|
|
|
|
|
Yup! You read my mind!
... such stuff as dreams are made on
|
|
|
|
|
I'm still counting, will let you know when I get to the end.
|
|
|
|
|
Ask Chuck Norris: he runs one first thing every morning.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Bah, you beat me to the Chuck Norris joke.
if (Object.DividedByZero == true) { Universe.Implode(); }
Meus ratio ex fortis machina. Simplicitatis de formae ac munus. -Foothill, 2016
|
|
|
|
|
megaadam wrote: How long is an infinite loop?
Long.
|
|
|
|
|
42
Some men are born mediocre, some men achieve mediocrity, and some men have mediocrity thrust upon them.
|
|
|
|
|
Aha, the magic number.
|
|
|
|
|
|
If the loop is a circle, then its length is pi * diameter. QED.
Get me coffee and no one gets hurt!
|
|
|
|
|
Smaller than nested infinite loop
|
|
|
|
|
Blue
"Time flies like an arrow. Fruit flies like a banana."
|
|
|
|
|
Well, if your loop includes a recursive call, I'd say it's done as soon as you fill the call stack.
|
|
|
|
|