{"action":"created","comment":{"url":"https://api.github.com/repos/symengine/symengine/pulls/comments/96889771","pull_request_review_id":17485500,"id":96889771,"diff_hunk":"@@ -74,10 +74,39 @@ class DiffImplementation\n \n     static RCP<const Basic> diff(const Zeta &self, const RCP<const Symbol> &x)\n     {\n-        // TODO: check if it is differentiated wrt s\n-        return mul(mul(mul(minus_one, self.get_s()),\n-                       zeta(add(self.get_s(), one), self.get_a())),\n-                   self.get_a()->diff(x));\n+        RCP<const Basic> m1 = self.get_s()->diff(x);\n+        RCP<const Basic> diff\n+            = mul(mul(mul(minus_one, self.get_s()),\n+                      zeta(add(self.get_s(), one), self.get_a())),\n+                  self.get_a()->diff(x));\n+        if (eq(*m1, *zero)) {\n+            return diff;\n+        } else {\n+            unsigned count = 0;\n+            bool found_x = false;\n+            for (const auto &a : self.get_args()) {\n+                if (eq(*a, *x)) {\n+                    found_x = true;\n+                    count++;\n+                } else if (count < 2 and neq(*a->diff(x), *zero)) {\n+                    count++;\n+                }\n+            }\n+            if (count == 1 and found_x) {\n+                return Derivative::create(self.rcp_from_this(), {x});\n+            }\n+            vec_basic v = self.get_args();\n+            v[0] = get_dummy(self, \"xi_1\");","path":"symengine/derivative.cpp","position":30,"original_position":30,"commit_id":"2abe40187f6c830c70490234327646f68c7d1e64","original_commit_id":"2abe40187f6c830c70490234327646f68c7d1e64","user":{"login":"isuruf","id":5234427,"avatar_url":"https://avatars.githubusercontent.com/u/5234427?v=3","gravatar_id":"","url":"https://api.github.com/users/isuruf","html_url":"https://github.com/isuruf","followers_url":"https://api.github.com/users/isuruf/followers","following_url":"https://api.github.com/users/isuruf/following{/other_user}","gists_url":"https://api.github.com/users/isuruf/gists{/gist_id}","starred_url":"https://api.github.com/users/isuruf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isuruf/subscriptions","organizations_url":"https://api.github.com/users/isuruf/orgs","repos_url":"https://api.github.com/users/isuruf/repos","events_url":"https://api.github.com/users/isuruf/events{/privacy}","received_events_url":"https://api.github.com/users/isuruf/received_events","type":"User","site_admin":false},"body":"You are not using `v`, so can you assign this to a variable called `dummy` and use it?","created_at":"2017-01-19T15:53:31Z","updated_at":"2017-01-19T15:55:51Z","html_url":"https://github.com/symengine/symengine/pull/1166#discussion_r96889771","pull_request_url":"https://api.github.com/repos/symengine/symengine/pulls/1166","_links":{"self":{"href":"https://api.github.com/repos/symengine/symengine/pulls/comments/96889771"},"html":{"href":"https://github.com/symengine/symengine/pull/1166#discussion_r96889771"},"pull_request":{"href":"https://api.github.com/repos/symengine/symengine/pulls/1166"}}},"pull_request":{"url":"https://api.github.com/repos/symengine/symengine/pulls/1166","id":100581754,"html_url":"https://github.com/symengine/symengine/pull/1166","diff_url":"https://github.com/symengine/symengine/pull/1166.diff","patch_url":"https://github.com/symengine/symengine/pull/1166.patch","issue_url":"https://api.github.com/repos/symengine/symengine/issues/1166","number":1166,"state":"open","locked":false,"title":"Improved Zeta Function and Added Tests","user":{"login":"ShikharJ","id":19722966,"avatar_url":"https://avatars.githubusercontent.com/u/19722966?v=3","gravatar_id":"","url":"https://api.github.com/users/ShikharJ","html_url":"https://github.com/ShikharJ","followers_url":"https://api.github.com/users/ShikharJ/followers","following_url":"https://api.github.com/users/ShikharJ/following{/other_user}","gists_url":"https://api.github.com/users/ShikharJ/gists{/gist_id}","starred_url":"https://api.github.com/users/ShikharJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShikharJ/subscriptions","organizations_url":"https://api.github.com/users/ShikharJ/orgs","repos_url":"https://api.github.com/users/ShikharJ/repos","events_url":"https://api.github.com/users/ShikharJ/events{/privacy}","received_events_url":"https://api.github.com/users/ShikharJ/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-01-07T20:49:20Z","updated_at":"2017-01-19T15:55:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2ff41d02027942d2e2f1213cbeb852dd19412d84","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/symengine/symengine/pulls/1166/commits","review_comments_url":"https://api.github.com/repos/symengine/symengine/pulls/1166/comments","review_comment_url":"https://api.github.com/repos/symengine/symengine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/symengine/symengine/issues/1166/comments","statuses_url":"https://api.github.com/repos/symengine/symengine/statuses/2abe40187f6c830c70490234327646f68c7d1e64","head":{"label":"ShikharJ:ZetaFunction","ref":"ZetaFunction","sha":"2abe40187f6c830c70490234327646f68c7d1e64","user":{"login":"ShikharJ","id":19722966,"avatar_url":"https://avatars.githubusercontent.com/u/19722966?v=3","gravatar_id":"","url":"https://api.github.com/users/ShikharJ","html_url":"https://github.com/ShikharJ","followers_url":"https://api.github.com/users/ShikharJ/followers","following_url":"https://api.github.com/users/ShikharJ/following{/other_user}","gists_url":"https://api.github.com/users/ShikharJ/gists{/gist_id}","starred_url":"https://api.github.com/users/ShikharJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShikharJ/subscriptions","organizations_url":"https://api.github.com/users/ShikharJ/orgs","repos_url":"https://api.github.com/users/ShikharJ/repos","events_url":"https://api.github.com/users/ShikharJ/events{/privacy}","received_events_url":"https://api.github.com/users/ShikharJ/received_events","type":"User","site_admin":false},"repo":{"id":71805265,"name":"symengine","full_name":"ShikharJ/symengine","owner":{"login":"ShikharJ","id":19722966,"avatar_url":"https://avatars.githubusercontent.com/u/19722966?v=3","gravatar_id":"","url":"https://api.github.com/users/ShikharJ","html_url":"https://github.com/ShikharJ","followers_url":"https://api.github.com/users/ShikharJ/followers","following_url":"https://api.github.com/users/ShikharJ/following{/other_user}","gists_url":"https://api.github.com/users/ShikharJ/gists{/gist_id}","starred_url":"https://api.github.com/users/ShikharJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShikharJ/subscriptions","organizations_url":"https://api.github.com/users/ShikharJ/orgs","repos_url":"https://api.github.com/users/ShikharJ/repos","events_url":"https://api.github.com/users/ShikharJ/events{/privacy}","received_events_url":"https://api.github.com/users/ShikharJ/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ShikharJ/symengine","description":"SymEngine is a fast symbolic manipulation library, written in C++","fork":true,"url":"https://api.github.com/repos/ShikharJ/symengine","forks_url":"https://api.github.com/repos/ShikharJ/symengine/forks","keys_url":"https://api.github.com/repos/ShikharJ/symengine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ShikharJ/symengine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ShikharJ/symengine/teams","hooks_url":"https://api.github.com/repos/ShikharJ/symengine/hooks","issue_events_url":"https://api.github.com/repos/ShikharJ/symengine/issues/events{/number}","events_url":"https://api.github.com/repos/ShikharJ/symengine/events","assignees_url":"https://api.github.com/repos/ShikharJ/symengine/assignees{/user}","branches_url":"https://api.github.com/repos/ShikharJ/symengine/branches{/branch}","tags_url":"https://api.github.com/repos/ShikharJ/symengine/tags","blobs_url":"https://api.github.com/repos/ShikharJ/symengine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ShikharJ/symengine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ShikharJ/symengine/git/refs{/sha}","trees_url":"https://api.github.com/repos/ShikharJ/symengine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ShikharJ/symengine/statuses/{sha}","languages_url":"https://api.github.com/repos/ShikharJ/symengine/languages","stargazers_url":"https://api.github.com/repos/ShikharJ/symengine/stargazers","contributors_url":"https://api.github.com/repos/ShikharJ/symengine/contributors","subscribers_url":"https://api.github.com/repos/ShikharJ/symengine/subscribers","subscription_url":"https://api.github.com/repos/ShikharJ/symengine/subscription","commits_url":"https://api.github.com/repos/ShikharJ/symengine/commits{/sha}","git_commits_url":"https://api.github.com/repos/ShikharJ/symengine/git/commits{/sha}","comments_url":"https://api.github.com/repos/ShikharJ/symengine/comments{/number}","issue_comment_url":"https://api.github.com/repos/ShikharJ/symengine/issues/comments{/number}","contents_url":"https://api.github.com/repos/ShikharJ/symengine/contents/{+path}","compare_url":"https://api.github.com/repos/ShikharJ/symengine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ShikharJ/symengine/merges","archive_url":"https://api.github.com/repos/ShikharJ/symengine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ShikharJ/symengine/downloads","issues_url":"https://api.github.com/repos/ShikharJ/symengine/issues{/number}","pulls_url":"https://api.github.com/repos/ShikharJ/symengine/pulls{/number}","milestones_url":"https://api.github.com/repos/ShikharJ/symengine/milestones{/number}","notifications_url":"https://api.github.com/repos/ShikharJ/symengine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ShikharJ/symengine/labels{/name}","releases_url":"https://api.github.com/repos/ShikharJ/symengine/releases{/id}","deployments_url":"https://api.github.com/repos/ShikharJ/symengine/deployments","created_at":"2016-10-24T15:50:39Z","updated_at":"2016-10-24T15:50:41Z","pushed_at":"2017-01-19T15:31:36Z","git_url":"git://github.com/ShikharJ/symengine.git","ssh_url":"git@github.com:ShikharJ/symengine.git","clone_url":"https://github.com/ShikharJ/symengine.git","svn_url":"https://github.com/ShikharJ/symengine","homepage":"http://sympy.org","size":6743,"stargazers_count":0,"watchers_count":0,"language":"C++","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":0,"default_branch":"master"}},"base":{"label":"symengine:master","ref":"master","sha":"89fa5c3e63779da882b82e55a69f090155e56ef1","user":{"login":"symengine","id":11509221,"avatar_url":"https://avatars.githubusercontent.com/u/11509221?v=3","gravatar_id":"","url":"https://api.github.com/users/symengine","html_url":"https://github.com/symengine","followers_url":"https://api.github.com/users/symengine/followers","following_url":"https://api.github.com/users/symengine/following{/other_user}","gists_url":"https://api.github.com/users/symengine/gists{/gist_id}","starred_url":"https://api.github.com/users/symengine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symengine/subscriptions","organizations_url":"https://api.github.com/users/symengine/orgs","repos_url":"https://api.github.com/users/symengine/repos","events_url":"https://api.github.com/users/symengine/events{/privacy}","received_events_url":"https://api.github.com/users/symengine/received_events","type":"Organization","site_admin":false},"repo":{"id":42376,"name":"symengine","full_name":"symengine/symengine","owner":{"login":"symengine","id":11509221,"avatar_url":"https://avatars.githubusercontent.com/u/11509221?v=3","gravatar_id":"","url":"https://api.github.com/users/symengine","html_url":"https://github.com/symengine","followers_url":"https://api.github.com/users/symengine/followers","following_url":"https://api.github.com/users/symengine/following{/other_user}","gists_url":"https://api.github.com/users/symengine/gists{/gist_id}","starred_url":"https://api.github.com/users/symengine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symengine/subscriptions","organizations_url":"https://api.github.com/users/symengine/orgs","repos_url":"https://api.github.com/users/symengine/repos","events_url":"https://api.github.com/users/symengine/events{/privacy}","received_events_url":"https://api.github.com/users/symengine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/symengine/symengine","description":"SymEngine is a fast symbolic manipulation library, written in C++","fork":false,"url":"https://api.github.com/repos/symengine/symengine","forks_url":"https://api.github.com/repos/symengine/symengine/forks","keys_url":"https://api.github.com/repos/symengine/symengine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/symengine/symengine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/symengine/symengine/teams","hooks_url":"https://api.github.com/repos/symengine/symengine/hooks","issue_events_url":"https://api.github.com/repos/symengine/symengine/issues/events{/number}","events_url":"https://api.github.com/repos/symengine/symengine/events","assignees_url":"https://api.github.com/repos/symengine/symengine/assignees{/user}","branches_url":"https://api.github.com/repos/symengine/symengine/branches{/branch}","tags_url":"https://api.github.com/repos/symengine/symengine/tags","blobs_url":"https://api.github.com/repos/symengine/symengine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/symengine/symengine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/symengine/symengine/git/refs{/sha}","trees_url":"https://api.github.com/repos/symengine/symengine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/symengine/symengine/statuses/{sha}","languages_url":"https://api.github.com/repos/symengine/symengine/languages","stargazers_url":"https://api.github.com/repos/symengine/symengine/stargazers","contributors_url":"https://api.github.com/repos/symengine/symengine/contributors","subscribers_url":"https://api.github.com/repos/symengine/symengine/subscribers","subscription_url":"https://api.github.com/repos/symengine/symengine/subscription","commits_url":"https://api.github.com/repos/symengine/symengine/commits{/sha}","git_commits_url":"https://api.github.com/repos/symengine/symengine/git/commits{/sha}","comments_url":"https://api.github.com/repos/symengine/symengine/comments{/number}","issue_comment_url":"https://api.github.com/repos/symengine/symengine/issues/comments{/number}","contents_url":"https://api.github.com/repos/symengine/symengine/contents/{+path}","compare_url":"https://api.github.com/repos/symengine/symengine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/symengine/symengine/merges","archive_url":"https://api.github.com/repos/symengine/symengine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/symengine/symengine/downloads","issues_url":"https://api.github.com/repos/symengine/symengine/issues{/number}","pulls_url":"https://api.github.com/repos/symengine/symengine/pulls{/number}","milestones_url":"https://api.github.com/repos/symengine/symengine/milestones{/number}","notifications_url":"https://api.github.com/repos/symengine/symengine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/symengine/symengine/labels{/name}","releases_url":"https://api.github.com/repos/symengine/symengine/releases{/id}","deployments_url":"https://api.github.com/repos/symengine/symengine/deployments","created_at":"2008-08-13T18:40:14Z","updated_at":"2017-01-18T09:49:50Z","pushed_at":"2017-01-19T15:31:37Z","git_url":"git://github.com/symengine/symengine.git","ssh_url":"git@github.com:symengine/symengine.git","clone_url":"https://github.com/symengine/symengine.git","svn_url":"https://github.com/symengine/symengine","homepage":"http://sympy.org","size":6689,"stargazers_count":209,"watchers_count":209,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":130,"mirror_url":null,"open_issues_count":117,"forks":130,"open_issues":117,"watchers":209,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/symengine/symengine/pulls/1166"},"html":{"href":"https://github.com/symengine/symengine/pull/1166"},"issue":{"href":"https://api.github.com/repos/symengine/symengine/issues/1166"},"comments":{"href":"https://api.github.com/repos/symengine/symengine/issues/1166/comments"},"review_comments":{"href":"https://api.github.com/repos/symengine/symengine/pulls/1166/comments"},"review_comment":{"href":"https://api.github.com/repos/symengine/symengine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/symengine/symengine/pulls/1166/commits"},"statuses":{"href":"https://api.github.com/repos/symengine/symengine/statuses/2abe40187f6c830c70490234327646f68c7d1e64"}}}}
{"actor":{"display_login":"isuruf"}}