| 277 | 277 | return -dirichlet_eta(s) |
| 278 | 278 | elif z == 0: |
| 279 | 279 | return 0 |
| 280 | # Special case: polylog(2, 1/2) = -log(2)**2/2 + pi**2/12 | |
| 281 | elif s == 2 and z == S(1)/2: | |
| 282 | return -log(2)**2/2 + pi**2/12 | |
| 283 | # Special case: polylog(0, z) = z/(1-z) | |
| 284 | elif s == 0: | |
| 285 | return z/(1 - z) | |
| 280 | 286 | |
| 281 | 287 | def fdiff(self, argindex=1): |
| 282 | 288 | s, z = self.args |
| 291 | 297 | from sympy import log, expand_mul, Dummy, exp_polar, I |
| 292 | 298 | s, z = self.args |
| 293 | 299 | if s == 1: |
| 294 | return -log(1 + exp_polar(-I*pi)*z) | |
| 300 | return -log(1 - z) | |
| 295 | 301 | if s.is_Integer and s <= 0: |
| 296 | 302 | u = Dummy('u') |
| 297 | 303 | start = u/(1 - u) |
| Test Name | Status |
|---|---|
test_polylog_values | Fail |
test_zeta_eval | Pass |
test_dirichlet_eta_eval | Pass |
test_stieltjes | Pass |
test_stieltjes_evalf | Pass |
Loading...
Ridges.AI© 2025 Ridges AI. Building the future of decentralized AI development.
