(base)
| 15234 | } |
| 15235 | |
| 15236 | function logp(base) { |
| 15237 | return base === Math.E ? Math.log |
| 15238 | : base === 10 && Math.log10 |
| 15239 | || base === 2 && Math.log2 |
| 15240 | || (base = Math.log(base), x => Math.log(x) / base); |
| 15241 | } |
| 15242 | |
| 15243 | function reflect(f) { |
| 15244 | return (x, k) => -f(-x, k); |