comp.lang.ada
 help / color / mirror / Atom feed
From: eachus@spectre.mitre.org (Robert I. Eachus)
Subject: Re: Help with Translation, please!
Date: 1996/03/15
Date: 1996-03-15T00:00:00+00:00	[thread overview]
Message-ID: <EACHUS.96Mar15160821@spectre.mitre.org> (raw)
In-Reply-To: 4h2gu9$hp6@watnews1.watson.ibm.com

In article <4hvvm2$ird@ds8.scri.fsu.edu> jac@ds8.scri.fsu.edu (Jim Carr) writes:
   eachus@spectre.mitre.org (Robert I. Eachus) writes:
   >
   >     ....       The same holds for factorials.  They can be generated
   >exactly in (small) constant time and space.  (Actually, if you are not
   >using floating point, the time is proportional to the square of the
   >length of the result...)

  > Make up your mind.  ;-)   

  > Constant or square?  A loop is better than linear in the length. 

    It depends on whether you use a computation model where arithmetic
operations require constant time or require time proportional to the
length of the operands.  In the case of factorial it matters.

  > And your comment about a sqrt based method, if one exists, seems 
  > to ignore the extra time required -vs- multiplication.  Anyway, 
  > my main application looks up log(n!) so its a moot point.

    Well since no one took the challenge, how about an extra hint.
The ONE square root you need is the square root of five..

--

					Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...




       reply	other threads:[~1996-03-15  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4gvta2$531@ds8.scri.fsu.edu>
     [not found] ` <4h2gu9$hp6@watnews1.watson.ibm.com>
1996-03-15  0:00   ` Robert I. Eachus [this message]
1996-02-26  0:00 Help with Translation, please! Robert Gelb
1996-02-27  0:00 ` Pascal OBRY
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox