Rev 4330 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
20 | reyssat | 1 | !if $wims_read_parm!=slib_header |
13586 | bpr | 2 | !goto proc |
20 | reyssat | 3 | !endif |
4161 | bpr | 4 | |
4330 | bpr | 5 | slib_author=Adeline, Grelot; Bernadette, PERRIN-RIOU |
4161 | bpr | 6 | |
20 | reyssat | 7 | slib_example=[2,-7,6]\ |
8 | [2,1;-7,1;6,4]\ |
||
9 | [2,-7,6],[1,1,4]\ |
||
10 | [2,-7,6;1,1,4] |
||
3265 | bpr | 11 | slib_require=pari |
20 | reyssat | 12 | !exit |
13 | |||
14 | :proc |
||
15 | |||
16 | !readproc slib/stat/dataproc $wims_read_parm |
||
17 | !if $slib_cnt=0 |
||
13586 | bpr | 18 | slib_out=0 |
20 | reyssat | 19 | !else |
13586 | bpr | 20 | !if $slib_weight =$empty |
21 | slib_out=!sum x^2 for x in $slib_data |
||
22 | slib_out=$[sqrt($slib_out/$slib_cnt)] |
||
23 | !else |
||
24 | slib_cnt=!itemcnt $slib_data |
||
25 | slib_out=!exec pari print(sqrt(sum(x=1,$slib_cnt,[$slib_weight][x]*([$slib_data][x])^2)/$slib_tw)) |
||
20 | reyssat | 26 | |
13586 | bpr | 27 | !endif weight |
20 | reyssat | 28 | !endif |
29 | |||
30 | slib_out=!trim $slib_out |