all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tassilo@member.fsf.org>
To: Peter Dyballa <Peter_Dyballa@Web.DE>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Emacs Calc - Npr and NCR functions
Date: Wed, 20 Jul 2011 16:49:36 +0200	[thread overview]
Message-ID: <87ei1lknwf.fsf@tsdh.uni-koblenz.de> (raw)
In-Reply-To: <8A6A663F-52C9-4D8D-AE7A-24294B3D5847@Web.DE> (Peter Dyballa's message of "Wed, 20 Jul 2011 15:00:54 +0200")

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



  reply	other threads:[~2011-07-20 14:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-20  8:47 Emacs Calc - Npr and NCR functions Daniel Dalton
2011-07-20 10:54 ` Tassilo Horn
2011-07-20 13:00   ` Peter Dyballa
2011-07-20 14:49     ` Tassilo Horn [this message]
2011-07-20 15:55     ` Alberto Luaces
2011-07-21 11:45       ` Daniel Dalton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ei1lknwf.fsf@tsdh.uni-koblenz.de \
    --to=tassilo@member.fsf.org \
    --cc=Peter_Dyballa@Web.DE \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.