Merge commit 'erg/master'
commit
6d41230f19
|
@ -78,7 +78,7 @@ SYMBOL: K
|
||||||
K get nth ,
|
K get nth ,
|
||||||
A get 5 bitroll-32 ,
|
A get 5 bitroll-32 ,
|
||||||
E get ,
|
E get ,
|
||||||
] { } make sum 4294967295 bitand ; inline
|
] { } make sum >32-bit ; inline
|
||||||
|
|
||||||
: set-vars ( temp -- )
|
: set-vars ( temp -- )
|
||||||
! E = D; D = C; C = S^30(B); B = A; A = TEMP;
|
! E = D; D = C; C = S^30(B); B = A; A = TEMP;
|
||||||
|
|
|
@ -9,7 +9,7 @@ IN: io.sniffer.filter.bsd
|
||||||
|
|
||||||
: bpf-align ( n -- n' )
|
: bpf-align ( n -- n' )
|
||||||
#! Align to next higher word size
|
#! Align to next higher word size
|
||||||
"long" heap-size 1- [ + ] keep bitnot bitand ;
|
"long" heap-size align ;
|
||||||
|
|
||||||
M: unix-io packet. ( string -- )
|
M: unix-io packet. ( string -- )
|
||||||
18 cut swap >byte-array bpfh.
|
18 cut swap >byte-array bpfh.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
USING: arrays kernel sequences vectors math math.vectors namespaces
|
USING: arrays kernel sequences vectors math math.vectors namespaces
|
||||||
shuffle splitting ;
|
shuffle splitting sequences.lib ;
|
||||||
IN: math.polynomials
|
IN: math.polynomials
|
||||||
|
|
||||||
! Polynomials are vectors with the highest powers on the right:
|
! Polynomials are vectors with the highest powers on the right:
|
||||||
|
@ -22,7 +22,7 @@ PRIVATE>
|
||||||
: p= ( p p -- ? ) pextend = ;
|
: p= ( p p -- ? ) pextend = ;
|
||||||
|
|
||||||
: ptrim ( p -- p )
|
: ptrim ( p -- p )
|
||||||
dup length 1 = [ [ zero? ] right-trim ] unless ;
|
dup singleton? [ [ zero? ] right-trim ] unless ;
|
||||||
|
|
||||||
: 2ptrim ( p p -- p p ) [ ptrim ] 2apply ;
|
: 2ptrim ( p p -- p p ) [ ptrim ] 2apply ;
|
||||||
: p+ ( p p -- p ) pextend v+ ;
|
: p+ ( p p -- p ) pextend v+ ;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
USING: kernel namespaces
|
USING: kernel namespaces
|
||||||
math math.constants math.functions math.matrices math.vectors
|
math math.constants math.functions math.matrices math.vectors
|
||||||
sequences splitting self ;
|
sequences splitting self math.trig ;
|
||||||
|
|
||||||
IN: ori
|
IN: ori
|
||||||
|
|
||||||
|
@ -11,13 +11,6 @@ C: <ori> ori
|
||||||
|
|
||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
! Temporarily defined here until math-contrib gets moved to extra/
|
|
||||||
|
|
||||||
: deg>rad pi * 180 / ; inline
|
|
||||||
: rad>deg 180 * pi / ; inline
|
|
||||||
|
|
||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
: ori> ( -- val ) self> ori-val ;
|
: ori> ( -- val ) self> ori-val ;
|
||||||
|
|
||||||
: >ori ( val -- ) self> set-ori-val ;
|
: >ori ( val -- ) self> set-ori-val ;
|
||||||
|
|
Loading…
Reference in New Issue