Merge branch 'master' of git://factorcode.org/git/factor
commit
10758bc6a1
|
@ -5,8 +5,6 @@ random sequences sets combinators.short-circuit math.bitwise
|
||||||
math math.order ;
|
math math.order ;
|
||||||
IN: math.miller-rabin
|
IN: math.miller-rabin
|
||||||
|
|
||||||
<PRIVATE
|
|
||||||
|
|
||||||
: >odd ( n -- int ) 0 set-bit ; foldable
|
: >odd ( n -- int ) 0 set-bit ; foldable
|
||||||
|
|
||||||
: >even ( n -- int ) 0 clear-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 ;
|
: next-odd ( m -- n ) dup even? [ 1 + ] [ 2 + ] if ;
|
||||||
|
|
||||||
TUPLE: positive-even-expected n ;
|
<PRIVATE
|
||||||
|
|
||||||
:: (miller-rabin) ( n trials -- ? )
|
:: (miller-rabin) ( n trials -- ? )
|
||||||
n 1 - :> n-1
|
n 1 - :> n-1
|
||||||
|
|
|
@ -25,7 +25,7 @@ M: image <image-gadget>
|
||||||
|
|
||||||
M: string <image-gadget> load-image <image-gadget> ;
|
M: string <image-gadget> load-image <image-gadget> ;
|
||||||
|
|
||||||
M: pathname <image-gadget> load-image <image-gadget> ;
|
M: pathname <image-gadget> string>> load-image <image-gadget> ;
|
||||||
|
|
||||||
: image-window ( object -- ) <image-gadget> "Image" open-window ;
|
: image-window ( object -- ) <image-gadget> "Image" open-window ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue