addaptic

Reference Combinatorics

lz_permutations

The number of ordered arrangements of the right number of things from the left, n!/(n − k)!.

long lz_permutations( CLZNumber* leftOperand, CLZNumber* rightOperand, CLZNumber* targetNumber = nullptr );

n! ÷ (n − k)!, exact. Arranging more than there are is nought.

Examples

CallAnswer
lz_permutations( 52, 5 )311875200
lz_permutations( 10, 10 )3628800
lz_permutations( 5, 7 )0

Each answer is what Addaptic printed for the call, at 36 places unless a setting is shown.

Returns

kNoError (0) when the answer is written. Otherwise an error code, with the answer flagged infinite or not-a-number; see Errors and flags.

See also

  • lz_combinations The number of ways to choose the right number of things from the left, n choose k.
  • lz_factorial The product of the whole numbers from one to the operand, n!.