From 4fa6e0931049922b4a055f172227991444b90156 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Mon, 8 Apr 2013 15:15:49 -0700 Subject: [PATCH] math.factorials: include 1. --- extra/math/factorials/factorials.factor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extra/math/factorials/factorials.factor b/extra/math/factorials/factorials.factor index 493f5f228f..df025dde5c 100644 --- a/extra/math/factorials/factorials.factor +++ b/extra/math/factorials/factorials.factor @@ -11,8 +11,8 @@ MEMO: factorial ( n -- n! ) : factorial/ ( n k -- n!/k! ) { - { [ dup 1 < ] [ drop factorial ] } - { [ over 1 < ] [ nip factorial recip ] } + { [ dup 1 <= ] [ drop factorial ] } + { [ over 1 <= ] [ nip factorial recip ] } [ 2dup < [ t ] [ swap f ] if [ (a,b] product ] dip [ recip ] when