{"action":"created","comment":{"url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/comments/35038402","id":35038402,"diff_hunk":"@@ -531,8 +543,17 @@ unittest {\n \n \n private {\n-enum real MAXLOG = 0x1.62e42fefa39ef358p+13L;  // log(real.max)\n-enum real MINLOG = -0x1.6436716d5406e6d8p+13L; // log(real.min*real.epsilon) = log(smallest denormal)\n+static if (floatTraits!(real).realFormat == RealFormat.ieeeExtended) {\n+    enum real MAXLOG = 0x1.62e42fefa39ef358p+13L;  // log(real.max)\n+    enum real MINLOG = -0x1.6436716d5406e6d8p+13L; // log(real.min_normal*real.epsilon) = log(smallest denormal)\n+}\n+else static if (floatTraits!(real).realFormat == RealFormat.ieeeDouble) {\n+    enum real MAXLOG = 0x1.62e430p+9L;  // log(real.max)\n+    enum real MINLOG = -0x1.743854p+9L; // log(real.min_normal*real.epsilon) = log(smallest denormal)","path":"std/internal/math/gammafunction.d","position":42,"original_position":42,"commit_id":"00fda8c3e4dc0e4f31caf84dcc1cbda3ac39a246","original_commit_id":"00fda8c3e4dc0e4f31caf84dcc1cbda3ac39a246","user":{"login":"9il","id":845083,"avatar_url":"https://avatars.githubusercontent.com/u/845083?v=3","gravatar_id":"","url":"https://api.github.com/users/9il","html_url":"https://github.com/9il","followers_url":"https://api.github.com/users/9il/followers","following_url":"https://api.github.com/users/9il/following{/other_user}","gists_url":"https://api.github.com/users/9il/gists{/gist_id}","starred_url":"https://api.github.com/users/9il/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/9il/subscriptions","organizations_url":"https://api.github.com/users/9il/orgs","repos_url":"https://api.github.com/users/9il/repos","events_url":"https://api.github.com/users/9il/events{/privacy}","received_events_url":"https://api.github.com/users/9il/received_events","type":"User","site_admin":false},"body":"Floating hexadecimal approximate constants for unittests can be computed with Wolfram Alpha.\r\nExample: [hexadecimal log(2^52)](http://www.wolframalpha.com/input/?i=hexadecimal+log%282%5E52%29).\r\nAlso you can press *More digits*.\r\n\r\nFor this example you need exact value of `double.max` and `double.min_normal*real.epsilon`. Probably you can print them in hexadecimal form, see `std.format` for more details.\r\n\r\nPlease add note about Wolfram into comments and the date when you would computed this values using Wolfram.","created_at":"2015-07-20T20:15:28Z","updated_at":"2015-07-20T20:15:28Z","html_url":"https://github.com/D-Programming-Language/phobos/pull/3045#discussion_r35038402","pull_request_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/3045","_links":{"self":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/comments/35038402"},"html":{"href":"https://github.com/D-Programming-Language/phobos/pull/3045#discussion_r35038402"},"pull_request":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/3045"}}},"pull_request":{"url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/3045","id":30722000,"html_url":"https://github.com/D-Programming-Language/phobos/pull/3045","diff_url":"https://github.com/D-Programming-Language/phobos/pull/3045.diff","patch_url":"https://github.com/D-Programming-Language/phobos/pull/3045.patch","issue_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/3045","number":3045,"state":"open","locked":false,"title":"std.mathspecial: for 64-bit reals, provide MAXGAMMA, MAXLOG, and MINLOG","user":{"login":"JohanEngelen","id":10983051,"avatar_url":"https://avatars.githubusercontent.com/u/10983051?v=3","gravatar_id":"","url":"https://api.github.com/users/JohanEngelen","html_url":"https://github.com/JohanEngelen","followers_url":"https://api.github.com/users/JohanEngelen/followers","following_url":"https://api.github.com/users/JohanEngelen/following{/other_user}","gists_url":"https://api.github.com/users/JohanEngelen/gists{/gist_id}","starred_url":"https://api.github.com/users/JohanEngelen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohanEngelen/subscriptions","organizations_url":"https://api.github.com/users/JohanEngelen/orgs","repos_url":"https://api.github.com/users/JohanEngelen/repos","events_url":"https://api.github.com/users/JohanEngelen/events{/privacy}","received_events_url":"https://api.github.com/users/JohanEngelen/received_events","type":"User","site_admin":false},"body":"Because MAXGAMMA, MAXLOG, and MINLOG are only defined for 80-bit reals, gammafunction.d unittests fail for targets that have 64-bit reals (notably MSVC).\r\n\r\nThis PR conditionally defines the 64-bit equivalent constants. Also, it contains a fix for gammaStirling(x) in which a call to pow() would overflow for 64-bit reals for x > 143. This fixes several failing unittests. The changes should be a noop for 80-bit reals.\r\nfloatTraits from std.math is used to detect whether 80- or 64-bit reals are used; therefore there is a dependency on PR #3011.\r\n\r\nThe changes are tested using DMD 2.066.1 (Windows) and LDC2 (Windows, version 192583 based on DMD v2.066.1 and LLVM 3.7.0svn-r230699).\r\n\r\nComments are very welcome.","created_at":"2015-03-08T16:21:46Z","updated_at":"2015-07-20T20:15:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"741011cde7034933a4ed6e9fb21e8753d1eb3030","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/3045/commits","review_comments_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/3045/comments","review_comment_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/3045/comments","statuses_url":"https://api.github.com/repos/D-Programming-Language/phobos/statuses/00fda8c3e4dc0e4f31caf84dcc1cbda3ac39a246","head":{"label":"JohanEngelen:gamma64bit","ref":"gamma64bit","sha":"00fda8c3e4dc0e4f31caf84dcc1cbda3ac39a246","user":{"login":"JohanEngelen","id":10983051,"avatar_url":"https://avatars.githubusercontent.com/u/10983051?v=3","gravatar_id":"","url":"https://api.github.com/users/JohanEngelen","html_url":"https://github.com/JohanEngelen","followers_url":"https://api.github.com/users/JohanEngelen/followers","following_url":"https://api.github.com/users/JohanEngelen/following{/other_user}","gists_url":"https://api.github.com/users/JohanEngelen/gists{/gist_id}","starred_url":"https://api.github.com/users/JohanEngelen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohanEngelen/subscriptions","organizations_url":"https://api.github.com/users/JohanEngelen/orgs","repos_url":"https://api.github.com/users/JohanEngelen/repos","events_url":"https://api.github.com/users/JohanEngelen/events{/privacy}","received_events_url":"https://api.github.com/users/JohanEngelen/received_events","type":"User","site_admin":false},"repo":{"id":31853379,"name":"phobos","full_name":"JohanEngelen/phobos","owner":{"login":"JohanEngelen","id":10983051,"avatar_url":"https://avatars.githubusercontent.com/u/10983051?v=3","gravatar_id":"","url":"https://api.github.com/users/JohanEngelen","html_url":"https://github.com/JohanEngelen","followers_url":"https://api.github.com/users/JohanEngelen/followers","following_url":"https://api.github.com/users/JohanEngelen/following{/other_user}","gists_url":"https://api.github.com/users/JohanEngelen/gists{/gist_id}","starred_url":"https://api.github.com/users/JohanEngelen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohanEngelen/subscriptions","organizations_url":"https://api.github.com/users/JohanEngelen/orgs","repos_url":"https://api.github.com/users/JohanEngelen/repos","events_url":"https://api.github.com/users/JohanEngelen/events{/privacy}","received_events_url":"https://api.github.com/users/JohanEngelen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JohanEngelen/phobos","description":"The standard library of the D programming language","fork":true,"url":"https://api.github.com/repos/JohanEngelen/phobos","forks_url":"https://api.github.com/repos/JohanEngelen/phobos/forks","keys_url":"https://api.github.com/repos/JohanEngelen/phobos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JohanEngelen/phobos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JohanEngelen/phobos/teams","hooks_url":"https://api.github.com/repos/JohanEngelen/phobos/hooks","issue_events_url":"https://api.github.com/repos/JohanEngelen/phobos/issues/events{/number}","events_url":"https://api.github.com/repos/JohanEngelen/phobos/events","assignees_url":"https://api.github.com/repos/JohanEngelen/phobos/assignees{/user}","branches_url":"https://api.github.com/repos/JohanEngelen/phobos/branches{/branch}","tags_url":"https://api.github.com/repos/JohanEngelen/phobos/tags","blobs_url":"https://api.github.com/repos/JohanEngelen/phobos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JohanEngelen/phobos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JohanEngelen/phobos/git/refs{/sha}","trees_url":"https://api.github.com/repos/JohanEngelen/phobos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JohanEngelen/phobos/statuses/{sha}","languages_url":"https://api.github.com/repos/JohanEngelen/phobos/languages","stargazers_url":"https://api.github.com/repos/JohanEngelen/phobos/stargazers","contributors_url":"https://api.github.com/repos/JohanEngelen/phobos/contributors","subscribers_url":"https://api.github.com/repos/JohanEngelen/phobos/subscribers","subscription_url":"https://api.github.com/repos/JohanEngelen/phobos/subscription","commits_url":"https://api.github.com/repos/JohanEngelen/phobos/commits{/sha}","git_commits_url":"https://api.github.com/repos/JohanEngelen/phobos/git/commits{/sha}","comments_url":"https://api.github.com/repos/JohanEngelen/phobos/comments{/number}","issue_comment_url":"https://api.github.com/repos/JohanEngelen/phobos/issues/comments{/number}","contents_url":"https://api.github.com/repos/JohanEngelen/phobos/contents/{+path}","compare_url":"https://api.github.com/repos/JohanEngelen/phobos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JohanEngelen/phobos/merges","archive_url":"https://api.github.com/repos/JohanEngelen/phobos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JohanEngelen/phobos/downloads","issues_url":"https://api.github.com/repos/JohanEngelen/phobos/issues{/number}","pulls_url":"https://api.github.com/repos/JohanEngelen/phobos/pulls{/number}","milestones_url":"https://api.github.com/repos/JohanEngelen/phobos/milestones{/number}","notifications_url":"https://api.github.com/repos/JohanEngelen/phobos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JohanEngelen/phobos/labels{/name}","releases_url":"https://api.github.com/repos/JohanEngelen/phobos/releases{/id}","created_at":"2015-03-08T14:51:52Z","updated_at":"2015-03-12T21:56:27Z","pushed_at":"2015-07-20T18:57:40Z","git_url":"git://github.com/JohanEngelen/phobos.git","ssh_url":"git@github.com:JohanEngelen/phobos.git","clone_url":"https://github.com/JohanEngelen/phobos.git","svn_url":"https://github.com/JohanEngelen/phobos","homepage":"dlang.org/phobos","size":41100,"stargazers_count":0,"watchers_count":0,"language":"D","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"D-Programming-Language:master","ref":"master","sha":"d38df5076dad82d0284878b4c8a5c8f26c9ad45e","user":{"login":"D-Programming-Language","id":565913,"avatar_url":"https://avatars.githubusercontent.com/u/565913?v=3","gravatar_id":"","url":"https://api.github.com/users/D-Programming-Language","html_url":"https://github.com/D-Programming-Language","followers_url":"https://api.github.com/users/D-Programming-Language/followers","following_url":"https://api.github.com/users/D-Programming-Language/following{/other_user}","gists_url":"https://api.github.com/users/D-Programming-Language/gists{/gist_id}","starred_url":"https://api.github.com/users/D-Programming-Language/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/D-Programming-Language/subscriptions","organizations_url":"https://api.github.com/users/D-Programming-Language/orgs","repos_url":"https://api.github.com/users/D-Programming-Language/repos","events_url":"https://api.github.com/users/D-Programming-Language/events{/privacy}","received_events_url":"https://api.github.com/users/D-Programming-Language/received_events","type":"Organization","site_admin":false},"repo":{"id":1257084,"name":"phobos","full_name":"D-Programming-Language/phobos","owner":{"login":"D-Programming-Language","id":565913,"avatar_url":"https://avatars.githubusercontent.com/u/565913?v=3","gravatar_id":"","url":"https://api.github.com/users/D-Programming-Language","html_url":"https://github.com/D-Programming-Language","followers_url":"https://api.github.com/users/D-Programming-Language/followers","following_url":"https://api.github.com/users/D-Programming-Language/following{/other_user}","gists_url":"https://api.github.com/users/D-Programming-Language/gists{/gist_id}","starred_url":"https://api.github.com/users/D-Programming-Language/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/D-Programming-Language/subscriptions","organizations_url":"https://api.github.com/users/D-Programming-Language/orgs","repos_url":"https://api.github.com/users/D-Programming-Language/repos","events_url":"https://api.github.com/users/D-Programming-Language/events{/privacy}","received_events_url":"https://api.github.com/users/D-Programming-Language/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/D-Programming-Language/phobos","description":"The standard library of the D programming language","fork":false,"url":"https://api.github.com/repos/D-Programming-Language/phobos","forks_url":"https://api.github.com/repos/D-Programming-Language/phobos/forks","keys_url":"https://api.github.com/repos/D-Programming-Language/phobos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/D-Programming-Language/phobos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/D-Programming-Language/phobos/teams","hooks_url":"https://api.github.com/repos/D-Programming-Language/phobos/hooks","issue_events_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/events{/number}","events_url":"https://api.github.com/repos/D-Programming-Language/phobos/events","assignees_url":"https://api.github.com/repos/D-Programming-Language/phobos/assignees{/user}","branches_url":"https://api.github.com/repos/D-Programming-Language/phobos/branches{/branch}","tags_url":"https://api.github.com/repos/D-Programming-Language/phobos/tags","blobs_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/refs{/sha}","trees_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/D-Programming-Language/phobos/statuses/{sha}","languages_url":"https://api.github.com/repos/D-Programming-Language/phobos/languages","stargazers_url":"https://api.github.com/repos/D-Programming-Language/phobos/stargazers","contributors_url":"https://api.github.com/repos/D-Programming-Language/phobos/contributors","subscribers_url":"https://api.github.com/repos/D-Programming-Language/phobos/subscribers","subscription_url":"https://api.github.com/repos/D-Programming-Language/phobos/subscription","commits_url":"https://api.github.com/repos/D-Programming-Language/phobos/commits{/sha}","git_commits_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/commits{/sha}","comments_url":"https://api.github.com/repos/D-Programming-Language/phobos/comments{/number}","issue_comment_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/comments{/number}","contents_url":"https://api.github.com/repos/D-Programming-Language/phobos/contents/{+path}","compare_url":"https://api.github.com/repos/D-Programming-Language/phobos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/D-Programming-Language/phobos/merges","archive_url":"https://api.github.com/repos/D-Programming-Language/phobos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/D-Programming-Language/phobos/downloads","issues_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues{/number}","pulls_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls{/number}","milestones_url":"https://api.github.com/repos/D-Programming-Language/phobos/milestones{/number}","notifications_url":"https://api.github.com/repos/D-Programming-Language/phobos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/D-Programming-Language/phobos/labels{/name}","releases_url":"https://api.github.com/repos/D-Programming-Language/phobos/releases{/id}","created_at":"2011-01-15T07:00:06Z","updated_at":"2015-07-20T02:38:17Z","pushed_at":"2015-07-20T19:22:32Z","git_url":"git://github.com/D-Programming-Language/phobos.git","ssh_url":"git@github.com:D-Programming-Language/phobos.git","clone_url":"https://github.com/D-Programming-Language/phobos.git","svn_url":"https://github.com/D-Programming-Language/phobos","homepage":"dlang.org/phobos","size":87229,"stargazers_count":615,"watchers_count":615,"language":"D","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":412,"mirror_url":null,"open_issues_count":71,"forks":412,"open_issues":71,"watchers":615,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/3045"},"html":{"href":"https://github.com/D-Programming-Language/phobos/pull/3045"},"issue":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/issues/3045"},"comments":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/issues/3045/comments"},"review_comments":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/3045/comments"},"review_comment":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/3045/commits"},"statuses":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/statuses/00fda8c3e4dc0e4f31caf84dcc1cbda3ac39a246"}}}}