Rev 3265 | Go to most recent revision | Details | 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 |
||
13 | !exit |
||
14 | |||
15 | :proc |
||
16 | slib_out= |
||
17 | |||
18 | !distribute item $wims_read_parm into slib_data,slib_degree |
||
19 | |||
20 | !default slib_degree=1 |
||
21 | slib_data=!declosing $slib_data |
||
22 | |||
23 | slib_n=!itemcnt $slib_data |
||
24 | |||
25 | slib_out=!exec pari {slib_u=gamma($slib_degree/2);\ |
||
26 | print(vector($slib_n,x,if([$slib_data][x]>0,incgamc($slib_degree/2,[$slib_data][x]/2)/slib_u,0)))} |
||
27 | |||
28 | slib_out=!trim $slib_out |