ANP

Contents


anp calculates the number (N) of arrangements of OBJects used from P to P.

 

Syntax

   anp( n, p )

 

Parameters

Element

Description

Restrictions

n

Whole Number

0 <= n < 2^31

p

Whole Number

0 <= p <= n

 

Example

   NBARRA = anp(N*2,len(C))

 

Description and Comments

anp(N,P) returns fac(N) / fac(N-P).

So as not to lose any precision in the calculation, Adonix does not use the fac function, which allows for extended domains of use for (n, p).

anp truncates n and p if they are not whole.

The type of result is Integer or Decimal depending on whether the result is less or greater than 2^31-1.

 

Associated Errors

Error

Description

ERHUGE (13)

Capacity exceeded during the calculation

ERDOM (50)

Domain Error

ERMODE (10)

One of the parameters is not numeric

 

Associated Keywords

FAC - CNP


CONTENTS


Copyright © Sage 1999 - 2007