{"action":"created","comment":{"url":"https://api.github.com/repos/sympy/sympy/pulls/comments/46092533","id":46092533,"diff_hunk":"@@ -855,11 +874,27 @@ def inverse(self, argindex=1):\n \n     @classmethod\n     def eval(cls, arg):\n+        from sympy.calculus.util import Limits\n         if arg.is_Number:\n             if arg is S.NaN:\n                 return S.NaN\n             elif arg is S.Zero:\n                 return S.Zero\n+            elif arg is S.Infinity or arg is S.NegativeInfinity:\n+                return Limits(S.NegativeInfinity, S.Infinity)\n+\n+        if isinstance(arg, Limits):\n+            min, max = arg.min, arg.max\n+            if min is not S.NegativeInfinity:\n+                min = min - floor(min/S.Pi)*S.Pi\n+\n+            if max is not S.Infinity:\n+                max = max - floor(min/S.Pi)*S.Pi","path":"sympy/functions/elementary/trigonometric.py","position":96,"original_position":96,"commit_id":"47ba2936f985bd7ca565ddce6fa284b343b76633","original_commit_id":"47ba2936f985bd7ca565ddce6fa284b343b76633","user":{"login":"jksuom","id":6929119,"avatar_url":"https://avatars.githubusercontent.com/u/6929119?v=3","gravatar_id":"","url":"https://api.github.com/users/jksuom","html_url":"https://github.com/jksuom","followers_url":"https://api.github.com/users/jksuom/followers","following_url":"https://api.github.com/users/jksuom/following{/other_user}","gists_url":"https://api.github.com/users/jksuom/gists{/gist_id}","starred_url":"https://api.github.com/users/jksuom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jksuom/subscriptions","organizations_url":"https://api.github.com/users/jksuom/orgs","repos_url":"https://api.github.com/users/jksuom/repos","events_url":"https://api.github.com/users/jksuom/events{/privacy}","received_events_url":"https://api.github.com/users/jksuom/received_events","type":"User","site_admin":false},"body":"I think that ``floor(min/S.Pi)`` should have the same value as above. Perhaps one should first set\r\n`` d = floor(min/S.Pi)*S.Pi``\r\nand then ``min -= d``, ``max -= d``.","created_at":"2015-11-29T14:07:39Z","updated_at":"2015-11-29T14:07:39Z","html_url":"https://github.com/sympy/sympy/pull/10051#discussion_r46092533","pull_request_url":"https://api.github.com/repos/sympy/sympy/pulls/10051","_links":{"self":{"href":"https://api.github.com/repos/sympy/sympy/pulls/comments/46092533"},"html":{"href":"https://github.com/sympy/sympy/pull/10051#discussion_r46092533"},"pull_request":{"href":"https://api.github.com/repos/sympy/sympy/pulls/10051"}}},"pull_request":{"url":"https://api.github.com/repos/sympy/sympy/pulls/10051","id":48900061,"html_url":"https://github.com/sympy/sympy/pull/10051","diff_url":"https://github.com/sympy/sympy/pull/10051.diff","patch_url":"https://github.com/sympy/sympy/pull/10051.patch","issue_url":"https://api.github.com/repos/sympy/sympy/issues/10051","number":10051,"state":"open","locked":false,"title":"Implementation of \"Limits\"(different from Limit) in SymPy","user":{"login":"gxyd","id":7712241,"avatar_url":"https://avatars.githubusercontent.com/u/7712241?v=3","gravatar_id":"","url":"https://api.github.com/users/gxyd","html_url":"https://github.com/gxyd","followers_url":"https://api.github.com/users/gxyd/followers","following_url":"https://api.github.com/users/gxyd/following{/other_user}","gists_url":"https://api.github.com/users/gxyd/gists{/gist_id}","starred_url":"https://api.github.com/users/gxyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gxyd/subscriptions","organizations_url":"https://api.github.com/users/gxyd/orgs","repos_url":"https://api.github.com/users/gxyd/repos","events_url":"https://api.github.com/users/gxyd/events{/privacy}","received_events_url":"https://api.github.com/users/gxyd/received_events","type":"User","site_admin":false},"body":"For information regarding \"What Limits is?\" see commit message.\r\nPlease bear with me, i am not very good at writing `OOP` in `Python right now. But will try to improve upon this.\r\nping @jksuom","created_at":"2015-10-27T16:57:33Z","updated_at":"2015-11-29T14:07:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"97d11d6c1c9cf6e3d724aa07d18424b8e34eaa86","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sympy/sympy/pulls/10051/commits","review_comments_url":"https://api.github.com/repos/sympy/sympy/pulls/10051/comments","review_comment_url":"https://api.github.com/repos/sympy/sympy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sympy/sympy/issues/10051/comments","statuses_url":"https://api.github.com/repos/sympy/sympy/statuses/47ba2936f985bd7ca565ddce6fa284b343b76633","head":{"label":"gxyd:implementation_limits","ref":"implementation_limits","sha":"47ba2936f985bd7ca565ddce6fa284b343b76633","user":{"login":"gxyd","id":7712241,"avatar_url":"https://avatars.githubusercontent.com/u/7712241?v=3","gravatar_id":"","url":"https://api.github.com/users/gxyd","html_url":"https://github.com/gxyd","followers_url":"https://api.github.com/users/gxyd/followers","following_url":"https://api.github.com/users/gxyd/following{/other_user}","gists_url":"https://api.github.com/users/gxyd/gists{/gist_id}","starred_url":"https://api.github.com/users/gxyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gxyd/subscriptions","organizations_url":"https://api.github.com/users/gxyd/orgs","repos_url":"https://api.github.com/users/gxyd/repos","events_url":"https://api.github.com/users/gxyd/events{/privacy}","received_events_url":"https://api.github.com/users/gxyd/received_events","type":"User","site_admin":false},"repo":{"id":23004594,"name":"sympy","full_name":"gxyd/sympy","owner":{"login":"gxyd","id":7712241,"avatar_url":"https://avatars.githubusercontent.com/u/7712241?v=3","gravatar_id":"","url":"https://api.github.com/users/gxyd","html_url":"https://github.com/gxyd","followers_url":"https://api.github.com/users/gxyd/followers","following_url":"https://api.github.com/users/gxyd/following{/other_user}","gists_url":"https://api.github.com/users/gxyd/gists{/gist_id}","starred_url":"https://api.github.com/users/gxyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gxyd/subscriptions","organizations_url":"https://api.github.com/users/gxyd/orgs","repos_url":"https://api.github.com/users/gxyd/repos","events_url":"https://api.github.com/users/gxyd/events{/privacy}","received_events_url":"https://api.github.com/users/gxyd/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gxyd/sympy","description":"A computer algebra system written in pure Python","fork":true,"url":"https://api.github.com/repos/gxyd/sympy","forks_url":"https://api.github.com/repos/gxyd/sympy/forks","keys_url":"https://api.github.com/repos/gxyd/sympy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gxyd/sympy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gxyd/sympy/teams","hooks_url":"https://api.github.com/repos/gxyd/sympy/hooks","issue_events_url":"https://api.github.com/repos/gxyd/sympy/issues/events{/number}","events_url":"https://api.github.com/repos/gxyd/sympy/events","assignees_url":"https://api.github.com/repos/gxyd/sympy/assignees{/user}","branches_url":"https://api.github.com/repos/gxyd/sympy/branches{/branch}","tags_url":"https://api.github.com/repos/gxyd/sympy/tags","blobs_url":"https://api.github.com/repos/gxyd/sympy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gxyd/sympy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gxyd/sympy/git/refs{/sha}","trees_url":"https://api.github.com/repos/gxyd/sympy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gxyd/sympy/statuses/{sha}","languages_url":"https://api.github.com/repos/gxyd/sympy/languages","stargazers_url":"https://api.github.com/repos/gxyd/sympy/stargazers","contributors_url":"https://api.github.com/repos/gxyd/sympy/contributors","subscribers_url":"https://api.github.com/repos/gxyd/sympy/subscribers","subscription_url":"https://api.github.com/repos/gxyd/sympy/subscription","commits_url":"https://api.github.com/repos/gxyd/sympy/commits{/sha}","git_commits_url":"https://api.github.com/repos/gxyd/sympy/git/commits{/sha}","comments_url":"https://api.github.com/repos/gxyd/sympy/comments{/number}","issue_comment_url":"https://api.github.com/repos/gxyd/sympy/issues/comments{/number}","contents_url":"https://api.github.com/repos/gxyd/sympy/contents/{+path}","compare_url":"https://api.github.com/repos/gxyd/sympy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gxyd/sympy/merges","archive_url":"https://api.github.com/repos/gxyd/sympy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gxyd/sympy/downloads","issues_url":"https://api.github.com/repos/gxyd/sympy/issues{/number}","pulls_url":"https://api.github.com/repos/gxyd/sympy/pulls{/number}","milestones_url":"https://api.github.com/repos/gxyd/sympy/milestones{/number}","notifications_url":"https://api.github.com/repos/gxyd/sympy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gxyd/sympy/labels{/name}","releases_url":"https://api.github.com/repos/gxyd/sympy/releases{/id}","created_at":"2014-08-15T22:08:09Z","updated_at":"2015-07-04T12:40:41Z","pushed_at":"2015-11-29T12:54:40Z","git_url":"git://github.com/gxyd/sympy.git","ssh_url":"git@github.com:gxyd/sympy.git","clone_url":"https://github.com/gxyd/sympy.git","svn_url":"https://github.com/gxyd/sympy","homepage":"http://sympy.org/","size":73186,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"sympy:master","ref":"master","sha":"bf990d085afe47bbdde420c5e2e271a01377c487","user":{"login":"sympy","id":260832,"avatar_url":"https://avatars.githubusercontent.com/u/260832?v=3","gravatar_id":"","url":"https://api.github.com/users/sympy","html_url":"https://github.com/sympy","followers_url":"https://api.github.com/users/sympy/followers","following_url":"https://api.github.com/users/sympy/following{/other_user}","gists_url":"https://api.github.com/users/sympy/gists{/gist_id}","starred_url":"https://api.github.com/users/sympy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sympy/subscriptions","organizations_url":"https://api.github.com/users/sympy/orgs","repos_url":"https://api.github.com/users/sympy/repos","events_url":"https://api.github.com/users/sympy/events{/privacy}","received_events_url":"https://api.github.com/users/sympy/received_events","type":"Organization","site_admin":false},"repo":{"id":640534,"name":"sympy","full_name":"sympy/sympy","owner":{"login":"sympy","id":260832,"avatar_url":"https://avatars.githubusercontent.com/u/260832?v=3","gravatar_id":"","url":"https://api.github.com/users/sympy","html_url":"https://github.com/sympy","followers_url":"https://api.github.com/users/sympy/followers","following_url":"https://api.github.com/users/sympy/following{/other_user}","gists_url":"https://api.github.com/users/sympy/gists{/gist_id}","starred_url":"https://api.github.com/users/sympy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sympy/subscriptions","organizations_url":"https://api.github.com/users/sympy/orgs","repos_url":"https://api.github.com/users/sympy/repos","events_url":"https://api.github.com/users/sympy/events{/privacy}","received_events_url":"https://api.github.com/users/sympy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sympy/sympy","description":"A computer algebra system written in pure Python","fork":false,"url":"https://api.github.com/repos/sympy/sympy","forks_url":"https://api.github.com/repos/sympy/sympy/forks","keys_url":"https://api.github.com/repos/sympy/sympy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sympy/sympy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sympy/sympy/teams","hooks_url":"https://api.github.com/repos/sympy/sympy/hooks","issue_events_url":"https://api.github.com/repos/sympy/sympy/issues/events{/number}","events_url":"https://api.github.com/repos/sympy/sympy/events","assignees_url":"https://api.github.com/repos/sympy/sympy/assignees{/user}","branches_url":"https://api.github.com/repos/sympy/sympy/branches{/branch}","tags_url":"https://api.github.com/repos/sympy/sympy/tags","blobs_url":"https://api.github.com/repos/sympy/sympy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sympy/sympy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sympy/sympy/git/refs{/sha}","trees_url":"https://api.github.com/repos/sympy/sympy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sympy/sympy/statuses/{sha}","languages_url":"https://api.github.com/repos/sympy/sympy/languages","stargazers_url":"https://api.github.com/repos/sympy/sympy/stargazers","contributors_url":"https://api.github.com/repos/sympy/sympy/contributors","subscribers_url":"https://api.github.com/repos/sympy/sympy/subscribers","subscription_url":"https://api.github.com/repos/sympy/sympy/subscription","commits_url":"https://api.github.com/repos/sympy/sympy/commits{/sha}","git_commits_url":"https://api.github.com/repos/sympy/sympy/git/commits{/sha}","comments_url":"https://api.github.com/repos/sympy/sympy/comments{/number}","issue_comment_url":"https://api.github.com/repos/sympy/sympy/issues/comments{/number}","contents_url":"https://api.github.com/repos/sympy/sympy/contents/{+path}","compare_url":"https://api.github.com/repos/sympy/sympy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sympy/sympy/merges","archive_url":"https://api.github.com/repos/sympy/sympy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sympy/sympy/downloads","issues_url":"https://api.github.com/repos/sympy/sympy/issues{/number}","pulls_url":"https://api.github.com/repos/sympy/sympy/pulls{/number}","milestones_url":"https://api.github.com/repos/sympy/sympy/milestones{/number}","notifications_url":"https://api.github.com/repos/sympy/sympy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sympy/sympy/labels{/name}","releases_url":"https://api.github.com/repos/sympy/sympy/releases{/id}","created_at":"2010-04-30T20:37:14Z","updated_at":"2015-11-29T10:13:39Z","pushed_at":"2015-11-29T12:54:42Z","git_url":"git://github.com/sympy/sympy.git","ssh_url":"git@github.com:sympy/sympy.git","clone_url":"https://github.com/sympy/sympy.git","svn_url":"https://github.com/sympy/sympy","homepage":"http://sympy.org/","size":102300,"stargazers_count":2476,"watchers_count":2476,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1210,"mirror_url":null,"open_issues_count":2073,"forks":1210,"open_issues":2073,"watchers":2476,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sympy/sympy/pulls/10051"},"html":{"href":"https://github.com/sympy/sympy/pull/10051"},"issue":{"href":"https://api.github.com/repos/sympy/sympy/issues/10051"},"comments":{"href":"https://api.github.com/repos/sympy/sympy/issues/10051/comments"},"review_comments":{"href":"https://api.github.com/repos/sympy/sympy/pulls/10051/comments"},"review_comment":{"href":"https://api.github.com/repos/sympy/sympy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sympy/sympy/pulls/10051/commits"},"statuses":{"href":"https://api.github.com/repos/sympy/sympy/statuses/47ba2936f985bd7ca565ddce6fa284b343b76633"}}}}