Pages: « 1 2 3 4
  Print  
Author Topic: Recursion  (Read 32201 times)
Offline (Male) Rusky
Reply #45 Posted on: June 04, 2010, 06:24:09 pm

Resident Troll
Joined: Feb 2008
Posts: 954
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
If you can end a loop by turning off the computer, then it's not infinite according to your definition. Apparently.

Anyway, you assume wrong. The computer doesn't just shut down when it runs past the kernel's code. If that ever happens, it starts executing whatever garbage happens to be there. Shutting down the computer is pretty forceful, even if it's the OS doing it.
Logged
Offline (Male) RetroX
Reply #46 Posted on: June 05, 2010, 11:22:36 am

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
If you can end a loop by turning off the computer, then it's not infinite according to your definition. Apparently.

Anyway, you assume wrong. The computer doesn't just shut down when it runs past the kernel's code. If that ever happens, it starts executing whatever garbage happens to be there. Shutting down the computer is pretty forceful, even if it's the OS doing it.
Well, not having much hardware knowledge, I'll have to trust that you're telling the truth on that one.

However, beyond the kernel, infinite loops are hardly ever "intentional."

Also:
Code: [Select]
double sine(double x) { return sine(x+8*atan(1)); }
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Male) Rusky
Reply #47 Posted on: June 05, 2010, 02:55:43 pm

Resident Troll
Joined: Feb 2008
Posts: 954
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
Code: (Haskell) [Select]
isurd n = sqrt (n + isurd n)
Logged
Offline (Unknown gender) score_under
Reply #48 Posted on: June 05, 2010, 05:12:06 pm

Member
Joined: Aug 2008
Posts: 308

View Profile
Code: (Haskell) [Select]
isurd n = sqrt (n + isurd n)
isurd = (1+sqrt(4n+1))/2 ?
Logged
Offline (Male) MahFreenAmeh
Reply #49 Posted on: June 16, 2010, 09:53:40 pm

sysadmin
"Web Team"
Location: Austin, TX
Joined: Apr 2008
Posts: 13
AOL Instant Messenger - sirmxe
View Profile WWW Email
http://enigma-dev.org/docs/pages/Recursion
Logged
sys(tem)admin(istrator)
[java,c++,c,javascript,html,css,php,perl,ruby,python,sql]
if you've got ideas, let me hear them.
Offline (Unknown gender) The 11th plague of Egypt
Reply #50 Posted on: August 07, 2010, 11:48:08 am
Member
Joined: Dec 2009
Posts: 274

View Profile
To understand recursion, you must first understand recursion.
Logged
Pages: « 1 2 3 4
  Print