{"action":"created","comment":{"url":"https://api.github.com/repos/JuliaStats/Distributions.jl/pulls/comments/42821135","id":42821135,"diff_hunk":"@@ -74,3 +74,8 @@ end\n #     println(\"    testing $(distr)\")\n #     test_samples(distr, n_tsamples)\n # end\n+\n+# Test for non-Float64 input\n+using DualNumbers\n+@test string(logpdf(Normal(0,1),big(1))) == \"-1.418938533204672741780329736405617639861397473637783412817151540482765695927251\"","path":"test/continuous.jl","position":7,"original_position":7,"commit_id":"6d108c2745795081276ac14053b1f33ba7af8edf","original_commit_id":"6d108c2745795081276ac14053b1f33ba7af8edf","user":{"login":"scidom","id":2519036,"avatar_url":"https://avatars.githubusercontent.com/u/2519036?v=3","gravatar_id":"","url":"https://api.github.com/users/scidom","html_url":"https://github.com/scidom","followers_url":"https://api.github.com/users/scidom/followers","following_url":"https://api.github.com/users/scidom/following{/other_user}","gists_url":"https://api.github.com/users/scidom/gists{/gist_id}","starred_url":"https://api.github.com/users/scidom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scidom/subscriptions","organizations_url":"https://api.github.com/users/scidom/orgs","repos_url":"https://api.github.com/users/scidom/repos","events_url":"https://api.github.com/users/scidom/events{/privacy}","received_events_url":"https://api.github.com/users/scidom/received_events","type":"User","site_admin":false},"body":"How about sth like this for a test:\r\n\r\n```\r\n@test derivative(logpdf(Normal(1., 0.15), x), 2.5) == gradlogpdf(Normal(1., 0.15), 2.5)\r\n ```","created_at":"2015-10-22T23:59:14Z","updated_at":"2015-10-22T23:59:14Z","html_url":"https://github.com/JuliaStats/Distributions.jl/pull/428#discussion_r42821135","pull_request_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/pulls/428","_links":{"self":{"href":"https://api.github.com/repos/JuliaStats/Distributions.jl/pulls/comments/42821135"},"html":{"href":"https://github.com/JuliaStats/Distributions.jl/pull/428#discussion_r42821135"},"pull_request":{"href":"https://api.github.com/repos/JuliaStats/Distributions.jl/pulls/428"}}},"pull_request":{"url":"https://api.github.com/repos/JuliaStats/Distributions.jl/pulls/428","id":48279066,"html_url":"https://github.com/JuliaStats/Distributions.jl/pull/428","diff_url":"https://github.com/JuliaStats/Distributions.jl/pull/428.diff","patch_url":"https://github.com/JuliaStats/Distributions.jl/pull/428.patch","issue_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/issues/428","number":428,"state":"open","locked":false,"title":"don't automatically promote to Float64 for ContinuousUnivariateDistributions","user":{"login":"mlubin","id":1733683,"avatar_url":"https://avatars.githubusercontent.com/u/1733683?v=3","gravatar_id":"","url":"https://api.github.com/users/mlubin","html_url":"https://github.com/mlubin","followers_url":"https://api.github.com/users/mlubin/followers","following_url":"https://api.github.com/users/mlubin/following{/other_user}","gists_url":"https://api.github.com/users/mlubin/gists{/gist_id}","starred_url":"https://api.github.com/users/mlubin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlubin/subscriptions","organizations_url":"https://api.github.com/users/mlubin/orgs","repos_url":"https://api.github.com/users/mlubin/repos","events_url":"https://api.github.com/users/mlubin/events{/privacy}","received_events_url":"https://api.github.com/users/mlubin/received_events","type":"User","site_admin":false},"body":"Combined with https://github.com/JuliaStats/StatsFuns.jl/pull/5, closes #427. I think the automatic promotion was out of place anyway, since some of the implementations in StatsFuns already supported non-Float64 types. This now works:\r\n```\r\njulia> logpdf(Normal(0,1),big(1))\r\n-1.418938533204672741780329736405617639861397473637783412817151540482765695927251\r\n\r\njulia> using ForwardDiff\r\n\r\njulia> f(x::Number) = logpdf(Normal(1., 0.15), x);\r\n\r\njulia> derivative(f, 2.5)\r\n-66.66666666666667\r\n```\r\n\r\nAdded a couple unit tests, not sure if they're in the right format or the right place. (The tests will fail until https://github.com/JuliaStats/StatsFuns.jl/pull/5 is merged and tagged.)\r\n\r\nCC @scidom @jrevels","created_at":"2015-10-21T01:34:13Z","updated_at":"2015-10-22T23:59:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f706551cc6e194aa989e8e9f4361eb791d97806a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/pulls/428/commits","review_comments_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/pulls/428/comments","review_comment_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/issues/428/comments","statuses_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/statuses/6d108c2745795081276ac14053b1f33ba7af8edf","head":{"label":"mlubin:nopromote","ref":"nopromote","sha":"6d108c2745795081276ac14053b1f33ba7af8edf","user":{"login":"mlubin","id":1733683,"avatar_url":"https://avatars.githubusercontent.com/u/1733683?v=3","gravatar_id":"","url":"https://api.github.com/users/mlubin","html_url":"https://github.com/mlubin","followers_url":"https://api.github.com/users/mlubin/followers","following_url":"https://api.github.com/users/mlubin/following{/other_user}","gists_url":"https://api.github.com/users/mlubin/gists{/gist_id}","starred_url":"https://api.github.com/users/mlubin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlubin/subscriptions","organizations_url":"https://api.github.com/users/mlubin/orgs","repos_url":"https://api.github.com/users/mlubin/repos","events_url":"https://api.github.com/users/mlubin/events{/privacy}","received_events_url":"https://api.github.com/users/mlubin/received_events","type":"User","site_admin":false},"repo":{"id":44644687,"name":"Distributions.jl","full_name":"mlubin/Distributions.jl","owner":{"login":"mlubin","id":1733683,"avatar_url":"https://avatars.githubusercontent.com/u/1733683?v=3","gravatar_id":"","url":"https://api.github.com/users/mlubin","html_url":"https://github.com/mlubin","followers_url":"https://api.github.com/users/mlubin/followers","following_url":"https://api.github.com/users/mlubin/following{/other_user}","gists_url":"https://api.github.com/users/mlubin/gists{/gist_id}","starred_url":"https://api.github.com/users/mlubin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlubin/subscriptions","organizations_url":"https://api.github.com/users/mlubin/orgs","repos_url":"https://api.github.com/users/mlubin/repos","events_url":"https://api.github.com/users/mlubin/events{/privacy}","received_events_url":"https://api.github.com/users/mlubin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mlubin/Distributions.jl","description":"A Julia package for probability distributions and associated functions.","fork":true,"url":"https://api.github.com/repos/mlubin/Distributions.jl","forks_url":"https://api.github.com/repos/mlubin/Distributions.jl/forks","keys_url":"https://api.github.com/repos/mlubin/Distributions.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mlubin/Distributions.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mlubin/Distributions.jl/teams","hooks_url":"https://api.github.com/repos/mlubin/Distributions.jl/hooks","issue_events_url":"https://api.github.com/repos/mlubin/Distributions.jl/issues/events{/number}","events_url":"https://api.github.com/repos/mlubin/Distributions.jl/events","assignees_url":"https://api.github.com/repos/mlubin/Distributions.jl/assignees{/user}","branches_url":"https://api.github.com/repos/mlubin/Distributions.jl/branches{/branch}","tags_url":"https://api.github.com/repos/mlubin/Distributions.jl/tags","blobs_url":"https://api.github.com/repos/mlubin/Distributions.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mlubin/Distributions.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mlubin/Distributions.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/mlubin/Distributions.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mlubin/Distributions.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/mlubin/Distributions.jl/languages","stargazers_url":"https://api.github.com/repos/mlubin/Distributions.jl/stargazers","contributors_url":"https://api.github.com/repos/mlubin/Distributions.jl/contributors","subscribers_url":"https://api.github.com/repos/mlubin/Distributions.jl/subscribers","subscription_url":"https://api.github.com/repos/mlubin/Distributions.jl/subscription","commits_url":"https://api.github.com/repos/mlubin/Distributions.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/mlubin/Distributions.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/mlubin/Distributions.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/mlubin/Distributions.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/mlubin/Distributions.jl/contents/{+path}","compare_url":"https://api.github.com/repos/mlubin/Distributions.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mlubin/Distributions.jl/merges","archive_url":"https://api.github.com/repos/mlubin/Distributions.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mlubin/Distributions.jl/downloads","issues_url":"https://api.github.com/repos/mlubin/Distributions.jl/issues{/number}","pulls_url":"https://api.github.com/repos/mlubin/Distributions.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/mlubin/Distributions.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/mlubin/Distributions.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mlubin/Distributions.jl/labels{/name}","releases_url":"https://api.github.com/repos/mlubin/Distributions.jl/releases{/id}","created_at":"2015-10-21T01:17:37Z","updated_at":"2015-10-21T01:17:39Z","pushed_at":"2015-10-21T01:33:20Z","git_url":"git://github.com/mlubin/Distributions.jl.git","ssh_url":"git@github.com:mlubin/Distributions.jl.git","clone_url":"https://github.com/mlubin/Distributions.jl.git","svn_url":"https://github.com/mlubin/Distributions.jl","homepage":"","size":2174,"stargazers_count":0,"watchers_count":0,"language":"Julia","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"JuliaStats:master","ref":"master","sha":"642e5fb9931f23563ce2b54a0055fd9adb44fb9d","user":{"login":"JuliaStats","id":2761531,"avatar_url":"https://avatars.githubusercontent.com/u/2761531?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaStats","html_url":"https://github.com/JuliaStats","followers_url":"https://api.github.com/users/JuliaStats/followers","following_url":"https://api.github.com/users/JuliaStats/following{/other_user}","gists_url":"https://api.github.com/users/JuliaStats/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaStats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaStats/subscriptions","organizations_url":"https://api.github.com/users/JuliaStats/orgs","repos_url":"https://api.github.com/users/JuliaStats/repos","events_url":"https://api.github.com/users/JuliaStats/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaStats/received_events","type":"Organization","site_admin":false},"repo":{"id":6619192,"name":"Distributions.jl","full_name":"JuliaStats/Distributions.jl","owner":{"login":"JuliaStats","id":2761531,"avatar_url":"https://avatars.githubusercontent.com/u/2761531?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaStats","html_url":"https://github.com/JuliaStats","followers_url":"https://api.github.com/users/JuliaStats/followers","following_url":"https://api.github.com/users/JuliaStats/following{/other_user}","gists_url":"https://api.github.com/users/JuliaStats/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaStats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaStats/subscriptions","organizations_url":"https://api.github.com/users/JuliaStats/orgs","repos_url":"https://api.github.com/users/JuliaStats/repos","events_url":"https://api.github.com/users/JuliaStats/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaStats/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JuliaStats/Distributions.jl","description":"A Julia package for probability distributions and associated functions.","fork":false,"url":"https://api.github.com/repos/JuliaStats/Distributions.jl","forks_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/forks","keys_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/teams","hooks_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/hooks","issue_events_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/events","assignees_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/tags","blobs_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/languages","stargazers_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/stargazers","contributors_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/contributors","subscribers_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/subscribers","subscription_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/subscription","commits_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/merges","archive_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/downloads","issues_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/labels{/name}","releases_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/releases{/id}","created_at":"2012-11-09T20:01:33Z","updated_at":"2015-10-17T00:12:07Z","pushed_at":"2015-10-22T23:24:48Z","git_url":"git://github.com/JuliaStats/Distributions.jl.git","ssh_url":"git@github.com:JuliaStats/Distributions.jl.git","clone_url":"https://github.com/JuliaStats/Distributions.jl.git","svn_url":"https://github.com/JuliaStats/Distributions.jl","homepage":"","size":5251,"stargazers_count":126,"watchers_count":126,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":96,"mirror_url":null,"open_issues_count":61,"forks":96,"open_issues":61,"watchers":126,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JuliaStats/Distributions.jl/pulls/428"},"html":{"href":"https://github.com/JuliaStats/Distributions.jl/pull/428"},"issue":{"href":"https://api.github.com/repos/JuliaStats/Distributions.jl/issues/428"},"comments":{"href":"https://api.github.com/repos/JuliaStats/Distributions.jl/issues/428/comments"},"review_comments":{"href":"https://api.github.com/repos/JuliaStats/Distributions.jl/pulls/428/comments"},"review_comment":{"href":"https://api.github.com/repos/JuliaStats/Distributions.jl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JuliaStats/Distributions.jl/pulls/428/commits"},"statuses":{"href":"https://api.github.com/repos/JuliaStats/Distributions.jl/statuses/6d108c2745795081276ac14053b1f33ba7af8edf"}}}}