{"action":"created","comment":{"url":"https://api.github.com/repos/sympy/sympy/pulls/comments/27769860","id":27769860,"diff_hunk":"@@ -2251,6 +2251,16 @@ def _eval_as_leading_term(self, x):\n         else:\n             return self.func(arg)\n \n+    def _eval_is_real(self):\n+        x = self.args[0]\n+        if x.is_real == False:\n+            return False\n+        y = abs(x) - 1","path":"sympy/functions/elementary/trigonometric.py","position":17,"original_position":17,"commit_id":"5016ca501b53cf10e2904eb55a7a6725091dabf7","original_commit_id":"5016ca501b53cf10e2904eb55a7a6725091dabf7","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":"Also the result is true strictly speaking. The truth value cannot, in fact, be determined for a symbol x without further restrictions. So it need not have anything to do with asec(0) not being defined as I first suspected. (Though 'type error' may not be the best way of returning the outcome.)\r\nOne should give enough data for assumptions to be able to determine the truth value. ","created_at":"2015-04-04T15:53:21Z","updated_at":"2015-04-04T15:53:21Z","html_url":"https://github.com/sympy/sympy/pull/9223#discussion_r27769860","pull_request_url":"https://api.github.com/repos/sympy/sympy/pulls/9223","_links":{"self":{"href":"https://api.github.com/repos/sympy/sympy/pulls/comments/27769860"},"html":{"href":"https://github.com/sympy/sympy/pull/9223#discussion_r27769860"},"pull_request":{"href":"https://api.github.com/repos/sympy/sympy/pulls/9223"}}},"pull_request":{"url":"https://api.github.com/repos/sympy/sympy/pulls/9223","id":32242486,"html_url":"https://github.com/sympy/sympy/pull/9223","diff_url":"https://github.com/sympy/sympy/pull/9223.diff","patch_url":"https://github.com/sympy/sympy/pull/9223.patch","issue_url":"https://api.github.com/repos/sympy/sympy/issues/9223","number":9223,"state":"open","locked":false,"title":"fixes #9220: asec(0).is_real throws ZeroDivisionError","user":{"login":"leosartaj","id":6217976,"avatar_url":"https://avatars.githubusercontent.com/u/6217976?v=3","gravatar_id":"","url":"https://api.github.com/users/leosartaj","html_url":"https://github.com/leosartaj","followers_url":"https://api.github.com/users/leosartaj/followers","following_url":"https://api.github.com/users/leosartaj/following{/other_user}","gists_url":"https://api.github.com/users/leosartaj/gists{/gist_id}","starred_url":"https://api.github.com/users/leosartaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leosartaj/subscriptions","organizations_url":"https://api.github.com/users/leosartaj/orgs","repos_url":"https://api.github.com/users/leosartaj/repos","events_url":"https://api.github.com/users/leosartaj/events{/privacy}","received_events_url":"https://api.github.com/users/leosartaj/received_events","type":"User","site_admin":false},"body":"implemented `_eval_is_real` method in `asec class`. For -1 < x < 1 or imaginary x, `asec(x).is_real` returns `False` otherwise returns `True`.\r\n\r\nFixes #9220 ","created_at":"2015-03-30T16:21:05Z","updated_at":"2015-04-04T15:53:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5c356567a719dd91ab20c20b6fca464a01ee6c19","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sympy/sympy/pulls/9223/commits","review_comments_url":"https://api.github.com/repos/sympy/sympy/pulls/9223/comments","review_comment_url":"https://api.github.com/repos/sympy/sympy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sympy/sympy/issues/9223/comments","statuses_url":"https://api.github.com/repos/sympy/sympy/statuses/5016ca501b53cf10e2904eb55a7a6725091dabf7","head":{"label":"leosartaj:issue-9220","ref":"issue-9220","sha":"5016ca501b53cf10e2904eb55a7a6725091dabf7","user":{"login":"leosartaj","id":6217976,"avatar_url":"https://avatars.githubusercontent.com/u/6217976?v=3","gravatar_id":"","url":"https://api.github.com/users/leosartaj","html_url":"https://github.com/leosartaj","followers_url":"https://api.github.com/users/leosartaj/followers","following_url":"https://api.github.com/users/leosartaj/following{/other_user}","gists_url":"https://api.github.com/users/leosartaj/gists{/gist_id}","starred_url":"https://api.github.com/users/leosartaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leosartaj/subscriptions","organizations_url":"https://api.github.com/users/leosartaj/orgs","repos_url":"https://api.github.com/users/leosartaj/repos","events_url":"https://api.github.com/users/leosartaj/events{/privacy}","received_events_url":"https://api.github.com/users/leosartaj/received_events","type":"User","site_admin":false},"repo":{"id":29408196,"name":"sympy","full_name":"leosartaj/sympy","owner":{"login":"leosartaj","id":6217976,"avatar_url":"https://avatars.githubusercontent.com/u/6217976?v=3","gravatar_id":"","url":"https://api.github.com/users/leosartaj","html_url":"https://github.com/leosartaj","followers_url":"https://api.github.com/users/leosartaj/followers","following_url":"https://api.github.com/users/leosartaj/following{/other_user}","gists_url":"https://api.github.com/users/leosartaj/gists{/gist_id}","starred_url":"https://api.github.com/users/leosartaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leosartaj/subscriptions","organizations_url":"https://api.github.com/users/leosartaj/orgs","repos_url":"https://api.github.com/users/leosartaj/repos","events_url":"https://api.github.com/users/leosartaj/events{/privacy}","received_events_url":"https://api.github.com/users/leosartaj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/leosartaj/sympy","description":"A computer algebra system written in pure Python","fork":true,"url":"https://api.github.com/repos/leosartaj/sympy","forks_url":"https://api.github.com/repos/leosartaj/sympy/forks","keys_url":"https://api.github.com/repos/leosartaj/sympy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/leosartaj/sympy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/leosartaj/sympy/teams","hooks_url":"https://api.github.com/repos/leosartaj/sympy/hooks","issue_events_url":"https://api.github.com/repos/leosartaj/sympy/issues/events{/number}","events_url":"https://api.github.com/repos/leosartaj/sympy/events","assignees_url":"https://api.github.com/repos/leosartaj/sympy/assignees{/user}","branches_url":"https://api.github.com/repos/leosartaj/sympy/branches{/branch}","tags_url":"https://api.github.com/repos/leosartaj/sympy/tags","blobs_url":"https://api.github.com/repos/leosartaj/sympy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/leosartaj/sympy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/leosartaj/sympy/git/refs{/sha}","trees_url":"https://api.github.com/repos/leosartaj/sympy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/leosartaj/sympy/statuses/{sha}","languages_url":"https://api.github.com/repos/leosartaj/sympy/languages","stargazers_url":"https://api.github.com/repos/leosartaj/sympy/stargazers","contributors_url":"https://api.github.com/repos/leosartaj/sympy/contributors","subscribers_url":"https://api.github.com/repos/leosartaj/sympy/subscribers","subscription_url":"https://api.github.com/repos/leosartaj/sympy/subscription","commits_url":"https://api.github.com/repos/leosartaj/sympy/commits{/sha}","git_commits_url":"https://api.github.com/repos/leosartaj/sympy/git/commits{/sha}","comments_url":"https://api.github.com/repos/leosartaj/sympy/comments{/number}","issue_comment_url":"https://api.github.com/repos/leosartaj/sympy/issues/comments{/number}","contents_url":"https://api.github.com/repos/leosartaj/sympy/contents/{+path}","compare_url":"https://api.github.com/repos/leosartaj/sympy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/leosartaj/sympy/merges","archive_url":"https://api.github.com/repos/leosartaj/sympy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/leosartaj/sympy/downloads","issues_url":"https://api.github.com/repos/leosartaj/sympy/issues{/number}","pulls_url":"https://api.github.com/repos/leosartaj/sympy/pulls{/number}","milestones_url":"https://api.github.com/repos/leosartaj/sympy/milestones{/number}","notifications_url":"https://api.github.com/repos/leosartaj/sympy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/leosartaj/sympy/labels{/name}","releases_url":"https://api.github.com/repos/leosartaj/sympy/releases{/id}","created_at":"2015-01-17T22:39:40Z","updated_at":"2015-03-14T16:38:38Z","pushed_at":"2015-04-02T17:32:19Z","git_url":"git://github.com/leosartaj/sympy.git","ssh_url":"git@github.com:leosartaj/sympy.git","clone_url":"https://github.com/leosartaj/sympy.git","svn_url":"https://github.com/leosartaj/sympy","homepage":"http://sympy.org/","size":68418,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"sympy:master","ref":"master","sha":"2775005d32f1ff9111ae466ebdf737aadeb66d43","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-04-04T14:49:01Z","pushed_at":"2015-04-04T15:25:32Z","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":146460,"stargazers_count":2045,"watchers_count":2045,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1007,"mirror_url":null,"open_issues_count":1896,"forks":1007,"open_issues":1896,"watchers":2045,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sympy/sympy/pulls/9223"},"html":{"href":"https://github.com/sympy/sympy/pull/9223"},"issue":{"href":"https://api.github.com/repos/sympy/sympy/issues/9223"},"comments":{"href":"https://api.github.com/repos/sympy/sympy/issues/9223/comments"},"review_comments":{"href":"https://api.github.com/repos/sympy/sympy/pulls/9223/comments"},"review_comment":{"href":"https://api.github.com/repos/sympy/sympy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sympy/sympy/pulls/9223/commits"},"statuses":{"href":"https://api.github.com/repos/sympy/sympy/statuses/5016ca501b53cf10e2904eb55a7a6725091dabf7"}}}}