[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: facrtorial functions in kspread
From:       "Tomas Mecir" <mecirt () gmail ! com>
Date:       2008-11-18 15:03:04
Message-ID: 492258b10811180703o34910097o6922f2baa79131fa () mail ! gmail ! com
[Download RAW message or body]

2008/11/18 Benoît Jacob <jacob@math.jussieu.fr>:
> Not that it is going to help much making a great KOffice 2.0 release, but just
> FWIW, i'd like to mention that none of the approaches above touch the point
> that, for any given degree of precision, computing n! has O(1) complexity and
> not O(n) as all the approaches in your link have (they all do basically the
> same naive approach of multiplying integers togethers).

That's true, but the O-notation is asymptotic, and Stirling's
approximation, while being O(1), also has a much larger constant
associated with it than the naive O(n) algorithm, meaning it would
only be faster for large enough n - the exact value is
implementation-specific, of course.

/ Tomas
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic