CoWeb

find:
goto:
home

history
links from
printable

login
















Discrete Math Script
Webb - all rights reserved - ©2004
spacer
Author - Noe Ramos
Email: nramos@geocities.com
Webpage:

Summary: Some interesting Discrete Mathematics functions.

Instructions: x! - Factorial of x.
sumx - Sum of first x integers starting in 1.
Hx - Harmonic xth number.
C(y, x) - Combinations (y - 2nd. place in stack).
P(y, x) - Permutations (y - 2nd. place in stack).

Code:

RPN.1.b \ Discrete Math
[f]wbVvc(1:1:1{v(v*)_v});
[h]wbVvc(1:1:0{v(vt+)_v});
[s]
#'2600'#'108'
#'2000'#'108'
#'1600'#'108'SSS;
"Discrete Math"
"Discrete Math"D'\Discret Math Functions\by (c)DiviProv'V;
~
"_x!: Standard factorial\(x*(x-1)*(x-2)...1)"CfCs;
"_sumx: Sum of first x integers\(1+2+...+x)"Xaxaxa1+*2/Cs;
"_Hx: Harmonic number\(1+1/2+...+1/x)" ChCs;
~
"C(y,x): Combinations\from x of y" XbXaxaCfxbCf/xaxb-Cf/Cs;
"P(y,x): Permutations\from x of y" XbXaxaCfxaxb-Cf/Cs;



0.0185 secs

top of page

Webb - all rights reserved - ©2004
powered by Spinneret 0.10