Rev 20 | Rev 4161 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
20 | reyssat | 1 | !if $wims_read_parm!=slib_header |
2 | !goto proc |
||
3 | !endif |
||
4 | slib_title=Cumulative distribution function of chi2 |
||
5 | slib_parms=2\ |
||
6 | ,[data]\ |
||
7 | 1,degree |
||
8 | |||
9 | slib_author=Bernadette PERRIN-RIOU |
||
10 | slib_out=values of cumulative distribution function of chi2 on data |
||
11 | slib_comment=data can be a list of reals in brackets |
||
12 | slib_example= [2,4,7] ,5 |
||
3265 | bpr | 13 | slib_require=pari |
20 | reyssat | 14 | !exit |
15 | |||
16 | :proc |
||
17 | slib_out= |
||
18 | |||
19 | !distribute item $wims_read_parm into slib_data,slib_degree |
||
20 | |||
21 | !default slib_degree=1 |
||
22 | slib_data=!declosing $slib_data |
||
23 | |||
24 | slib_n=!itemcnt $slib_data |
||
25 | |||
26 | slib_out=!exec pari {slib_u=gamma($slib_degree/2);\ |
||
27 | print(vector($slib_n,x,if([$slib_data][x]>0,incgamc($slib_degree/2,[$slib_data][x]/2)/slib_u,0)))} |
||
28 | |||
29 | slib_out=!trim $slib_out |