[Issue 13371] std.math.factorial
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Wed Aug 27 06:35:33 PDT 2014
    
    
  
https://issues.dlang.org/show_bug.cgi?id=13371
safety0ff.bugz <safety0ff.bugz at gmail.com> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |safety0ff.bugz at gmail.com
--- Comment #5 from safety0ff.bugz <safety0ff.bugz at gmail.com> ---
(In reply to bearophile_hugs from comment #4)
> (In reply to Don from comment #2)
> 
> > And for BigInt, iterated multiplication isn't a good way of caclulating
> > factorials.
> 
> Right, for BigInt you can add a different specialization later for bigints.
> 
Generic functions for computing BigInt results often end up hitting one
limitation or another.
I think that any BigInt functions worth providing in phobos should be
implemented within BigInt.
With factorial for example, there will be garbage creation for intermediate
results that could be eliminated if implemented in BigInt.
--
    
    
More information about the Digitalmars-d-bugs
mailing list