From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: ** X-Spam-Status: No, score=2.1 required=5.0 tests=BAYES_20,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,1042f393323e22da X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,1042f393323e22da X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,1042f393323e22da X-Google-Attributes: gid1014db,public From: fred@genesis.demon.co.uk (Lawrence Kirby) Subject: Re: Any research putting c above ada? Date: 1997/05/08 Message-ID: <863114637snz@genesis.demon.co.uk>#1/1 X-Deja-AN: 240271806 References: <5ih6i9$oct$1@waldorf.csc.calpoly.edu> <336E51EB.6275@pti-us.com.nospam> X-Mail2News-User: fred@genesis.demon.co.uk X-Mail2News-Path: genesis.demon.co.uk Organization: none Reply-To: fred@genesis.demon.co.uk Newsgroups: comp.lang.c++,comp.lang.c,comp.lang.ada Date: 1997-05-08T00:00:00+00:00 List-Id: In article <336E51EB.6275@pti-us.com.nospam> sr.furlong@pti-us.com.nospam "Steve Furlong" writes: >Jon S Anthony wrote: >... >> Most of what passes as >> so called "computer science" is just watered down mathematics - >> discrete mathematics... > >And poorly done, at that. If I see one more O(n) algorithm for finding >a Fibonacci number... > >(For those of you who didn't take Discrete Math, you can find a Fib. >number in O(c) time.) I guess you are referring to the formula based on the golden ratio. Certainly that has its place but it certainly isn't always the best approach, and whether it can be calculatyed in O(1) time is questionable, depending on whether things like exp(X) can be calculated in O(1) time. Given the rate at which the series increases it is often only the first few terms that are of interest in which case an O(N) approach or perhaps a lookup table would be more appropriate. The best solution depends on the specification of the problem, e.g. if you want to generate a series of Fibonacci numbers. It is interesting but I doubt that there are very many practical uses for the Fibonacci formula. -- ----------------------------------------- Lawrence Kirby | fred@genesis.demon.co.uk Wilts, England | 70734.126@compuserve.com -----------------------------------------