]> gitweb.factorcode.org Git - factor.git/commitdiff
math.functions: duplicate on-bits to avoid circular dependency on math.bitwise.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 22 Sep 2011 19:23:16 +0000 (12:23 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 22 Sep 2011 19:23:16 +0000 (12:23 -0700)
basis/math/functions/functions.factor

index 9a5bb2084bcadc2b5720c351a623943b4a6576a5..b33e40862df3fe6e0f2d53fc7e0205d38296790a 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: math kernel math.constants math.private math.bits
 math.libm combinators fry math.order sequences
-combinators.short-circuit macros literals math.bitwise ;
+combinators.short-circuit macros literals ;
 IN: math.functions
 
 : >fraction ( a/b -- a b )
@@ -156,6 +156,11 @@ M: real absq sq ; inline
 : >=1? ( x -- ? )
     dup complex? [ drop f ] [ 1 >= ] if ; inline
 
+<PRIVATE
+! to avoid circular dependency on math.bitwise
+: on-bits ( m -- n ) 2^ 1 - ; inline
+PRIVATE>
+
 GENERIC: frexp ( x -- y exp )
 
 M: float frexp