You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Low precision: -1.12058697578989e+44
High precision: 0.001586425835211121087681179361528927983242277888339631178609757381602116352014620984480403121211547027499627345216063020035934706802772039354304125819952326262751451176676820907796632804032104350623713922869560129245748835027779792137220628978091592575872212530734647063184344560862957299239418155652367375142065798074
I believe the correct result is the one that's close to 0.001586. The expected behavior is for the function to either return the value accurate to within 2 ** (-ctx.prec) relative error, or to raise an exception about a failure to converge. The 1e+44 value looks like a catastrophic cancellation error.
I must say though, I'm not so sure if this is easy to fix. Hypergeometric functions are evil.
At least for hyperu(1, x, y) for large x, y of similar magnitude, it empirically seems like the value is close to x / ((x - y) * (1 - x)). But I don't know what asymptotic expansion this comes from, or how fast that converges.
The text was updated successfully, but these errors were encountered:
mpmath version: 1.2.1
OS: Windows 10
When I run the following:
I get:
I believe the correct result is the one that's close to
0.001586
. The expected behavior is for the function to either return the value accurate to within2 ** (-ctx.prec)
relative error, or to raise an exception about a failure to converge. The 1e+44 value looks like a catastrophic cancellation error.I must say though, I'm not so sure if this is easy to fix. Hypergeometric functions are evil.
At least for
hyperu(1, x, y)
for largex, y
of similar magnitude, it empirically seems like the value is close tox / ((x - y) * (1 - x))
. But I don't know what asymptotic expansion this comes from, or how fast that converges.The text was updated successfully, but these errors were encountered: