Rev 4330 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 4330 | Rev 13586 | ||
|---|---|---|---|
| Line 1... | Line 1... | ||
| 1 | !if $wims_read_parm!=slib_header |
1 | !if $wims_read_parm!=slib_header |
| 2 | !goto proc |
2 | !goto proc |
| 3 | !endif |
3 | !endif |
| 4 | 4 | ||
| 5 | slib_parms=1\ |
5 | slib_parms=1\ |
| 6 | ,[data] or [data],[weight] |
6 | ,[data] or [data],[weight] |
| 7 | slib_author=Adeline, Grelot |
7 | slib_author=Adeline, Grelot |
| Line 14... | Line 14... | ||
| 14 | 14 | ||
| 15 | :proc |
15 | :proc |
| 16 | !readproc slib/stat/dataproc $wims_read_parm |
16 | !readproc slib/stat/dataproc $wims_read_parm |
| 17 | 17 | ||
| 18 | !if $slib_cnt=0 |
18 | !if $slib_cnt=0 |
| 19 | slib_out=1 |
19 | slib_out=1 |
| 20 | !else |
20 | !else |
| 21 | !if $slib_weight =$empty |
21 | !if $slib_weight =$empty |
| 22 | slib_data=!product x for x in $slib_data |
22 | slib_data=!product x for x in $slib_data |
| 23 | slib_out=$[($slib_data)^(1/$slib_cnt)],$slib_cnt |
23 | slib_out=$[($slib_data)^(1/$slib_cnt)],$slib_cnt |
| 24 | !else |
24 | !else |
| 25 | slib_out=!exec pari print(prod(x=1,$slib_cnt,[$slib_data][x]^[$slib_weight][x])^(1/$slib_tw)) |
25 | slib_out=!exec pari print(prod(x=1,$slib_cnt,[$slib_data][x]^[$slib_weight][x])^(1/$slib_tw)) |
| 26 | slib_out=$slib_out,$slib_tw |
26 | slib_out=$slib_out,$slib_tw |
| 27 | - | ||
| 28 | !endif weight |
27 | !endif weight |
| 29 | !endif |
28 | !endif |
| 30 | slib_out =!trim $slib_out |
29 | slib_out =!trim $slib_out |