X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=blobdiff_plain;f=core%2Fmath%2Fmath.factor;h=869d0aa133261075d9f419eb25d813d9f07d3770;hp=c88f274141b506b8bb051b9343ee9b6b43ffdff3;hb=f9a93e9993c77fde573b6bd7f9923f9d57382ff3;hpb=0a4cd2fb2dc47eaffe03ff6b1b601d84fd789230 diff --git a/core/math/math.factor b/core/math/math.factor index c88f274141..869d0aa133 100644 --- a/core/math/math.factor +++ b/core/math/math.factor @@ -131,6 +131,9 @@ GENERIC: (log2) ( x -- n ) foldable PRIVATE> +: recursive-hashcode ( n obj quot -- code ) + pick 0 <= [ 3drop 0 ] [ [ 1 - ] 2dip call ] if ; inline + ERROR: log2-expects-positive x ; : log2 ( x -- n )