Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

n! -- factor

Name: Anonymous 2007-09-14 9:02 ID:w+iUxD20


: n! ( n -- n! ) dup zero? [ drop 1 ] [ dup 1- n! * ] if ;
: ln! ( n lim -- ) over - [ dup n! . 1+ ] times drop ;

1 10 ln!
1
2
6
24
120
720
5040
40320
362880


Superior.

Name: Anonymous 2007-09-14 15:16 ID:mnwZuDu3

>>11
Assuming you meant 1000000000000!, no you didn't. It'd have like 1000000000000^1000000000000 digits in it. (Well, close enough to not matter.)

If you meant 1!, well okay, but then you're just slow and that must've been one fucking huge 1.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List