![]() |
How to calculate Fibonacci with template?
to ensure the complexity is O(1).THX~
|
Re: How to calculate Fibonacci with template?
On Monday, 21 January 2013 10:11:58 UTC, Helong Feng wrote:
> to ensure the complexity is O(1).THX~ Work out your own recurrence relation which approximately doubles the index at each step. {F} = ... 3, 5, 8, ... 55, 89, ... and: 55 = 8^2 - 3^2, 89 = 8^2 + 5^2. -- |
Re: How to calculate Fibonacci with template?
Helong Feng wrote:
> How to calculate Fibonacci with template to ensure > the complexity is O(1) There are no templates in C. |
Re: How to calculate Fibonacci with template?
In article <kdjbrb$30k$1@dont-email.me>, Noob <root@127.0.0.1> wrote:
>Helong Feng wrote: > >> How to calculate Fibonacci with template to ensure >> the complexity is O(1) > >There are no templates in C. > But there is in C/C++/C# - which is what most people really mean nowadays when they refer to "C". -- Nov 4, 2008 - the day when everything went from being Clinton's fault to being Obama's fault. |
Re: How to calculate Fibonacci with template?
Kenny McCormack wrote:
> In article <kdjbrb$30k$1@dont-email.me>, Noob <root@127.0.0.1> wrote: >> Helong Feng wrote: >> >>> How to calculate Fibonacci with template to ensure >>> the complexity is O(1) >> >> There are no templates in C. >> > > But there is in C/C++/C# - which is what most people really mean nowadays > when they refer to "C". > I don't think anybody confuses C# with the other two. C# was specifically designed as a heresy on C++ - for "the language business" at you-know-where. -- Les Cargill |
Re: How to calculate Fibonacci with template?
In article <kdjfmu$q03$1@dont-email.me>,
Les Cargill <lcargill99@comcast.com> wrote: >Kenny McCormack wrote: >> In article <kdjbrb$30k$1@dont-email.me>, Noob <root@127.0.0.1> wrote: >>> Helong Feng wrote: >>> >>>> How to calculate Fibonacci with template to ensure >>>> the complexity is O(1) >>> >>> There are no templates in C. >>> >> >> But there is in C/C++/C# - which is what most people really mean nowadays >> when they refer to "C". >> > > >I don't think anybody confuses C# with the other two. C# was >specifically designed as a heresy on C++ - for "the language >business" at you-know-where. Heh heh. I hear ya. And I did just throw in the C# reference to further annoy the regs here - as if the sight of those 2 plus signs following the name of their beloved language wasn't enough. But, seriously folks, from what I hear, in the "business" world these days, C# *is* pretty much considered to be the current incarnation of C. Even C++ is considered to be a "legacy language". -- People who say they'll vote for someone else because Obama couldn't solve all of Bush's messes are like people complaining that he couldn't cure cancer, so they'll go and vote for cancer. |
Re: How to calculate Fibonacci with template?
On 1/21/2013 09:41, Kenny McCormack wrote:
> In article <kdjfmu$q03$1@dont-email.me>, > Les Cargill <lcargill99@comcast.com> wrote: >> Kenny McCormack wrote: >>> In article <kdjbrb$30k$1@dont-email.me>, Noob <root@127.0.0.1> wrote: >>>> Helong Feng wrote: >>>> >>>>> How to calculate Fibonacci with template to ensure >>>>> the complexity is O(1) >>>> >>>> There are no templates in C. >>>> >>> >>> But there is in C/C++/C# - which is what most people really mean nowadays >>> when they refer to "C". >>> >> >> >> I don't think anybody confuses C# with the other two. C# was >> specifically designed as a heresy on C++ - for "the language >> business" at you-know-where. > > Heh heh. I hear ya. And I did just throw in the C# reference to further > annoy the regs here - as if the sight of those 2 plus signs following the > name of their beloved language wasn't enough. > I don't understand why you'd want to do that. > But, seriously folks, from what I hear, in the "business" world these days, > C# *is* pretty much considered to be the current incarnation of C. Even C++ > is considered to be a "legacy language". > It's fun that the '#' can be decomposed into 4 tiny '+' signs, perhaps resulting an operation like: (c++)++ Unfortunately, that operation doesn't work, in C. -- - Shao Miller -- "Thank you for the kind words; those are the kind of words I like to hear. Cheerily," -- Richard Harter |
Re: How to calculate Fibonacci with template?
Shao Miller wrote:
> I don't understand why you'd want to do that. I don't understand what you don't understand. Trolls will be trolls. |
| All times are GMT. The time now is 09:19 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.