10/07/2014, 01:50 AM

Addendum: You can replace Wapprox with this:

to get even more speed (saves some repeated log calculations).

Code:

`Wapprox(k, z) = {`

local(brl = brlog(k, z));

local(lbrl = log(brl));

return(brl - lbrl + sum(kk=0,5,sum(m=1,5,c(kk, m)*lbrl^m * brl^(-kk-m))));

}

to get even more speed (saves some repeated log calculations).