Rev 7692 | 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] |
||
7 | |||
4330 | bpr | 8 | slib_author=Sophie, Lemaire; Bernadette, Perrin-Riou |
4161 | bpr | 9 | |
3265 | bpr | 10 | slib_example=[0.2,0.4,0.7] |
11 | !exit |
||
20 | reyssat | 12 | |
13 | :proc |
||
14 | slib_out= |
||
15 | |||
4330 | bpr | 16 | !distribute item $wims_read_parm into slib_data |
20 | reyssat | 17 | |
18 | slib_data=!declosing $slib_data |
||
19 | slib_out=$empty |
||
20 | !for slib_x in $slib_data |
||
21 | !if $slib_x<0.5 and $slib_x>0 |
||
22 | slib_out=!append item $[log (2 * $slib_x)] to $slib_out |
||
23 | !endif |
||
3265 | bpr | 24 | !if $slib_x>=0.5 and $slib_x<1 |
20 | reyssat | 25 | slib_out=!append item $[log (2 * (1-$slib_x))] to $slib_out |
26 | !endif |
||
27 | !if $slib_x<0 or $slib_x>1 |
||
28 | slib_out=!append item NaN to $slib_out |
||
7692 | bpr | 29 | !endif |
20 | reyssat | 30 | !next slib_x |
7692 | bpr | 31 | |
20 | reyssat | 32 | slib_out=!trim $slib_out |