math.miller-rabin: make some utilities not private since math.primes uses them

db4
Slava Pestov 2009-05-07 20:52:16 -05:00
parent 2ec754e77f
commit 5099046f9f
1 changed files with 1 additions and 3 deletions

View File

@ -5,8 +5,6 @@ random sequences sets combinators.short-circuit math.bitwise
math math.order ;
IN: math.miller-rabin
<PRIVATE
: >odd ( n -- int ) 0 set-bit ; foldable
: >even ( n -- int ) 0 clear-bit ; foldable
@ -15,7 +13,7 @@ IN: math.miller-rabin
: next-odd ( m -- n ) dup even? [ 1 + ] [ 2 + ] if ;
TUPLE: positive-even-expected n ;
<PRIVATE
:: (miller-rabin) ( n trials -- ? )
n 1 - :> n-1