Subversion Repositories wimsdev

Rev

Rev 4330 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

!if $wims_read_parm!=slib_header
 !goto proc
!endif

slib_title=Generation of random numbers
slib_parms=4\
 ,m\
 0, N\
1000,M\
Z,coefficient ring: Z ,R for the time being,Q, n (n is an integer for Z/nZ)
slib_author=Bernadette PERRIN-RIOU
slib_out=sequence of  m random  numbers between N and M in the coefficient ring
slib_synonyme=série aléatoire, random series
slib_comment=The length of the output is limited.
slib_example= 10,-3,10,Z\
10,-3,10,R

!exit

:proc

!distribute item $wims_read_parm into slib_m,slib_N,slib_M,slib_ring
!default slib_ring=Z
!default slib_N=0
!default slib_M=1000

!if  $slib_ring=Z
        slib_out=!randint  $slib_N,$slib_M repeat $slib_m
!endif
!if  $slib_ring=R
        slib_out=!random  $slib_N,$slib_M repeat $slib_m
!endif

slib_out=!trim $slib_out