{"action":"created","issue":{"url":"https://api.github.com/repos/sympy/sympy/issues/14971","repository_url":"https://api.github.com/repos/sympy/sympy","labels_url":"https://api.github.com/repos/sympy/sympy/issues/14971/labels{/name}","comments_url":"https://api.github.com/repos/sympy/sympy/issues/14971/comments","events_url":"https://api.github.com/repos/sympy/sympy/issues/14971/events","html_url":"https://github.com/sympy/sympy/pull/14971","id":344346811,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzNzYxODk5","number":14971,"title":"RisingFactorial/FallingFactorial: fix high-precision floats","user":{"login":"cbm755","id":818622,"node_id":"MDQ6VXNlcjgxODYyMg==","avatar_url":"https://avatars0.githubusercontent.com/u/818622?v=4","gravatar_id":"","url":"https://api.github.com/users/cbm755","html_url":"https://github.com/cbm755","followers_url":"https://api.github.com/users/cbm755/followers","following_url":"https://api.github.com/users/cbm755/following{/other_user}","gists_url":"https://api.github.com/users/cbm755/gists{/gist_id}","starred_url":"https://api.github.com/users/cbm755/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbm755/subscriptions","organizations_url":"https://api.github.com/users/cbm755/orgs","repos_url":"https://api.github.com/users/cbm755/repos","events_url":"https://api.github.com/users/cbm755/events{/privacy}","received_events_url":"https://api.github.com/users/cbm755/received_events","type":"User","site_admin":false},"labels":[{"id":655646384,"node_id":"MDU6TGFiZWw2NTU2NDYzODQ=","url":"https://api.github.com/repos/sympy/sympy/labels/floats","name":"floats","color":"0000FF","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2018-07-25T08:39:48Z","updated_at":"2018-07-25T17:20:54Z","closed_at":"2018-07-25T16:56:51Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/sympy/sympy/pulls/14971","html_url":"https://github.com/sympy/sympy/pull/14971","diff_url":"https://github.com/sympy/sympy/pull/14971.diff","patch_url":"https://github.com/sympy/sympy/pull/14971.patch"},"body":"Instead of changing the evalf table, add appropriate entries to the\r\n`MPMATH_TRANSLATIONS` table in lambdify.  The `MPMATH_TRANSLATIONS`\r\nfix is taken from the Diofant project, with appreciation:\r\nskirpichev/diofant/commit/4bcd9640f83ac0e050d38b5e4772547070f7ed09\r\n\r\nThe remaining tests and changes are my own.\r\n\r\n- - - -\r\n\r\nRevert some earlier evalf changes: I don't really understand this code\r\nbut it seemed to be limited to double precision.  Replace two broken\r\ntests (str comparisions of Floats are generally fragile and also the\r\nprovided strings were not accurate).  Replace with 32-digit versions of\r\nthe same tests, compared relatively to computations from another CAS.\r\n\r\nThis also makes `lambdify(..., 'mpmath')` functional: test for that.\r\n\r\n#### References to other Issues or PRs\r\n\r\nFixes #14822.\r\n\r\n#### Release Notes\r\n\r\n<!-- BEGIN RELEASE NOTES -->\r\nNO ENTRY\r\n<!-- END RELEASE NOTES -->\r\n"},"comment":{"url":"https://api.github.com/repos/sympy/sympy/issues/comments/407831145","html_url":"https://github.com/sympy/sympy/pull/14971#issuecomment-407831145","issue_url":"https://api.github.com/repos/sympy/sympy/issues/14971","id":407831145,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzgzMTE0NQ==","user":{"login":"asmeurer","id":71486,"node_id":"MDQ6VXNlcjcxNDg2","avatar_url":"https://avatars3.githubusercontent.com/u/71486?v=4","gravatar_id":"","url":"https://api.github.com/users/asmeurer","html_url":"https://github.com/asmeurer","followers_url":"https://api.github.com/users/asmeurer/followers","following_url":"https://api.github.com/users/asmeurer/following{/other_user}","gists_url":"https://api.github.com/users/asmeurer/gists{/gist_id}","starred_url":"https://api.github.com/users/asmeurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asmeurer/subscriptions","organizations_url":"https://api.github.com/users/asmeurer/orgs","repos_url":"https://api.github.com/users/asmeurer/repos","events_url":"https://api.github.com/users/asmeurer/events{/privacy}","received_events_url":"https://api.github.com/users/asmeurer/received_events","type":"User","site_admin":false},"created_at":"2018-07-25T17:20:54Z","updated_at":"2018-07-25T17:20:54Z","author_association":"MEMBER","body":"Yeah I think that's unrelated though. I believe the real problem is\r\n\r\n```py\r\n>>> f = lambdify(x, eqn.lhs - eqn.rhs, 'mpmath')\r\n>>> print(inspect.getsource(f))\r\ndef _lambdifygenerated(x):\r\n    return (  # Not supported in Python:\r\n  # RisingFactorial\r\nRisingFactorial(18, x) - 232/3)\r\n```\r\n\r\nIt isn't wrapping the rational, so it gets evaluated by Python to machine precision to 77.33333333333333. "}}
{"actor":{"display_login":"asmeurer"}}