 
 GENERIC: random-float* ( tuple -- r )
  
-: random-float ( -- n ) random-generator get random-float* ;
+: random-float ( -- n ) random-generator get random-float* ; inline
 
 M:: lagged-fibonacci random-float* ( lagged-fibonacci -- x )
     lagged-fibonacci [ pt0>> ] [ u>> ] bi nth

CONSTANT: lagged-fibonacci-sig-bits 24

: normalize-seed ( seed -- seed' )
    abs lagged-fibonacci-max-seed mod ;

: adjust-ptr ( ptr -- ptr' )
    1 - dup 0 < [ drop p-r ] when ;

PRIVATE>


    lagged-fibonacci [ adjust-ptr ] change-pt0 drop
    lagged-fibonacci [ adjust-ptr ] change-pt1 drop
    uni ; inline

: default-lagged-fibonacci ( -- obj )
    [ random-32 ] with-system-random <lagged-fibonacci> ;
