[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs Calc - Npr and NCR functions
From: |
Tassilo Horn |
Subject: |
Re: Emacs Calc - Npr and NCR functions |
Date: |
Wed, 20 Jul 2011 16:49:36 +0200 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) |
Peter Dyballa <Peter_Dyballa@Web.DE> writes:
Hi Peter,
>>> Does anyone know how to access the Npr and Ncr functions with Emacs
>>> calc?
>>
>> What are those functions?
>
> Combinatorics, Binomial coefficients, permutations, combinations. Some
> desk or pocket calculators provide such functions.
>
> I think nPr is n!/(n-k)! and nCr is n!/k!(n-k)!...
Ok, so the functions and keys are:
,----[ (info "(calc)Combinatorial Functions") ]
| The `k c' (`calc-choose') [`choose'] command computes the binomial
| coefficient `N'-choose-`M', where `M' is the number on the top of the
| stack and `N' is second-to-top. If both arguments are integers, the
| result is an exact integer. Otherwise, the result is a floating-point
| approximation. The binomial coefficient is defined for all real
| numbers by `N! / M! (N-M)!'.
`----
,----[ (info "(calc)Combinatorial Functions") ]
| The `H k c' (`calc-perm') [`perm'] command computes the
| number-of-permutations function `N! / (N-M)!'.
`----
Bye,
Tassilo