Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><a href="http://search.cpan.org/perldoc/Math%3a%3aCounting">Math::Counting</a> looks a little silly (I mean <em>student</em> versus <em>engineering</em> modes?) The <em>real</em> factorial function provided by the module, <code>bfact</code> is a thin wrapper around <code>Math::BigInt::bfac</code>. So, just use <a href="http://search.cpan.org/perldoc/Math%3a%3aBigInt">Math::BigInt</a>.</p> <pre><code>#!/usr/bin/env perl use strict; use warnings; use Math::BigInt(); print Math::BigInt-&gt;bfac('300'), "\n"; </code></pre> <p>Output:</p> <pre>30605751221644063603537046129726862938858880417357699941677674125947653317671686 74655152914224775733499391478887017263688642639077590031542268429279069745598412 25476930271954604008012215776252176854255965356903506788725264321896264299365204 57644883038890975394348962543605322598077652127082243763944912012867867536830571 22936819436499564604981664502277165001851765464693401122260347297240663332585835 06870150169794168850353752137554910289126407157154830282284937952636580145235233 15693648223343679925459409527682060806223281238738388081704960000000000000000000 0000000000000000000000000000000000000000000000000000000</pre> <p><em>No</em>, <a href="http://www.wolframalpha.com/input/?i=300!">I did not verify the result</a>.</p> <p>As others have noted, <code>Math::Counting</code> has:</p> <pre><code>our @ISA = qw(Exporter); our @EXPORT = qw( factorial permutation combination bfact bperm bcomb ); </code></pre> <p>but there is no <code>require</code> <a href="http://perldoc.perl.org/Exporter.html">Exporter</a>.</p> <p>In fact, there is no need for this module to <em>inherit</em> from Exporter. A simple:</p> <pre><code>use Exporter 'import'; </code></pre> <p>would have been enough. Also, there really is no need to pollute the namespace of a user of this module by default, so it should have:</p> <pre><code>our @EXPORT = (); our @EXPORT_OK = qw( factorial permutation combination bfact bperm bcomb ); </code></pre> <p>Otherwise, what's the point of defining <code>%EXPORT_TAGS</code>?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload