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 | |
20 | reyssat | 5 | slib_parms=1\ |
6 | ,[data] or [data],[weight] |
||
4330 | bpr | 7 | slib_author=Adeline, Grelot |
4161 | bpr | 8 | |
20 | reyssat | 9 | slib_example=[3,5,6]\ |
10 | [3,5,6],[4,1,1]\ |
||
11 | [3,5,6;4,1,1] |
||
3265 | bpr | 12 | slib_require=pari |
20 | reyssat | 13 | !exit |
14 | |||
15 | :proc |
||
16 | !readproc slib/stat/dataproc $wims_read_parm |
||
17 | |||
18 | !if $slib_cnt=0 |
||
13586 | bpr | 19 | slib_out=1 |
20 | reyssat | 20 | !else |
13586 | bpr | 21 | !if $slib_weight =$empty |
22 | slib_data=!product x for x in $slib_data |
||
23 | slib_out=$[($slib_data)^(1/$slib_cnt)],$slib_cnt |
||
24 | !else |
||
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 |
||
27 | !endif weight |
||
20 | reyssat | 28 | !endif |
29 | slib_out =!trim $slib_out |