{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/28455018","id":28455018,"diff_hunk":"@@ -0,0 +1,300 @@\n+//\n+// Copyright (c) Microsoft. All rights reserved.\n+// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n+//\n+// \n+// File: FloatDouble.cpp\n+// \n+\n+#include <common.h>\n+\n+#include \"floatdouble.h\"\n+#include \"floatclass_double.h\"\n+\n+#define AS_BITFIELD(x)         (*((UINT64*)(&x)))\n+\n+#define IS_INFINITY(x)         ((AS_BITFIELD(x) & UI64(0x7FFFFFFFFFFFFFFF)) == UI64(0x7FF0000000000000))\n+#define IS_ONE(x)              (AS_BITFIELD(x) == UI64(0x3FF0000000000000))\n+#define IS_NEGATIVEONE(x)      (AS_BITFIELD(x) == UI64(0xBFF0000000000000))\n+\n+#ifdef _MSC_VER\n+#pragma float_control(precise, off)\n+#endif\n+\n+// Trigonometric Functions\n+FCIMPL1_V(double, COMDouble::Acos, double x)\n+    FCALL_CONTRACT;\n+\n+    return acos(x);\n+FCIMPLEND\n+\n+FCIMPL1_V(double, COMDouble::Asin, double x)\n+    FCALL_CONTRACT;\n+\n+    return asin(x);\n+FCIMPLEND\n+\n+FCIMPL1_V(double, COMDouble::Atan, double x)\n+    FCALL_CONTRACT;\n+\n+    return atan(x);\n+FCIMPLEND\n+\n+FCIMPL2_VV(double, COMDouble::Atan2, double y, double x)\n+    FCALL_CONTRACT;\n+\n+    // The cmath::atan2 method does not produce nan for atan2(+-inf,+-inf)\n+    return (IS_INFINITY(y) && IS_INFINITY(x)) ? (y / x) : atan2(y, x);\n+FCIMPLEND\n+\n+FCIMPL1_V(double, COMDouble::Cos, double x)\n+    FCALL_CONTRACT;\n+\n+    return cos(x);\n+FCIMPLEND\n+\n+FCIMPL1_V(double, COMDouble::Sin, double x)\n+    FCALL_CONTRACT;\n+\n+    return sin(x);\n+FCIMPLEND\n+\n+FCIMPL2_VI(double, COMDouble::SinCos, double x, double* y)\n+    FCALL_CONTRACT;\n+\n+    *y = COMDouble::Cos(x);\n+    return COMDouble::Sin(x);\n+FCIMPLEND\n+\n+FCIMPL1_V(double, COMDouble::Tan, double x)\n+    FCALL_CONTRACT;\n+\n+    return tan(x);\n+FCIMPLEND\n+\n+// Hyperbolic Functions\n+FCIMPL1_V(double, COMDouble::Acosh, double x)\n+    FCALL_CONTRACT;\n+\n+    return acosh(x);\n+FCIMPLEND\n+\n+FCIMPL1_V(double, COMDouble::Asinh, double x)\n+    FCALL_CONTRACT;\n+\n+    return asinh(x);\n+FCIMPLEND\n+\n+FCIMPL1_V(double, COMDouble::Atanh, double x)\n+    FCALL_CONTRACT;\n+\n+    return atanh(x);\n+FCIMPLEND\n+\n+FCIMPL1_V(double, COMDouble::Cosh, double x)\n+    FCALL_CONTRACT;\n+\n+    return cosh(x);\n+FCIMPLEND\n+\n+FCIMPL1_V(double, COMDouble::Sinh, double x)\n+    FCALL_CONTRACT;\n+\n+    return sinh(x);\n+FCIMPLEND\n+\n+FCIMPL1_V(double, COMDouble::Tanh, double x)\n+    FCALL_CONTRACT;\n+\n+    return tanh(x);\n+FCIMPLEND\n+\n+// Exponential Functions\n+FCIMPL1_V(double, COMDouble::Exp, double x)\n+    FCALL_CONTRACT;\n+\n+    // the cmath::exp method does not handle +-inf properly\n+    return IS_INFINITY(x) ? ((x < 0) ? +0.0 : x) : exp(x);","path":"src/classlibnative/float/floatdouble.cpp","position":117,"original_position":117,"commit_id":"4c832c8736f87abe5608a66d0f9f78ae4145d5ae","original_commit_id":"4c832c8736f87abe5608a66d0f9f78ae4145d5ae","user":{"login":"tannergooding","id":10487869,"avatar_url":"https://avatars.githubusercontent.com/u/10487869?v=3","gravatar_id":"","url":"https://api.github.com/users/tannergooding","html_url":"https://github.com/tannergooding","followers_url":"https://api.github.com/users/tannergooding/followers","following_url":"https://api.github.com/users/tannergooding/following{/other_user}","gists_url":"https://api.github.com/users/tannergooding/gists{/gist_id}","starred_url":"https://api.github.com/users/tannergooding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tannergooding/subscriptions","organizations_url":"https://api.github.com/users/tannergooding/orgs","repos_url":"https://api.github.com/users/tannergooding/repos","events_url":"https://api.github.com/users/tannergooding/events{/privacy}","received_events_url":"https://api.github.com/users/tannergooding/received_events","type":"User","site_admin":false},"body":"This is no longer the case in MSVC 15.\r\n\r\n`cmath::exp` now returns `+0.0` for negative infinity and positive infinity for positive infinity.","created_at":"2015-04-15T19:41:35Z","updated_at":"2015-04-15T19:41:35Z","html_url":"https://github.com/dotnet/coreclr/pull/710#discussion_r28455018","pull_request_url":"https://api.github.com/repos/dotnet/coreclr/pulls/710","_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/28455018"},"html":{"href":"https://github.com/dotnet/coreclr/pull/710#discussion_r28455018"},"pull_request":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/710"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/710","id":33386371,"html_url":"https://github.com/dotnet/coreclr/pull/710","diff_url":"https://github.com/dotnet/coreclr/pull/710.diff","patch_url":"https://github.com/dotnet/coreclr/pull/710.patch","issue_url":"https://api.github.com/repos/dotnet/coreclr/issues/710","number":710,"state":"open","locked":false,"title":"New API for single-precision math (P1)","user":{"login":"tannergooding","id":10487869,"avatar_url":"https://avatars.githubusercontent.com/u/10487869?v=3","gravatar_id":"","url":"https://api.github.com/users/tannergooding","html_url":"https://github.com/tannergooding","followers_url":"https://api.github.com/users/tannergooding/followers","following_url":"https://api.github.com/users/tannergooding/following{/other_user}","gists_url":"https://api.github.com/users/tannergooding/gists{/gist_id}","starred_url":"https://api.github.com/users/tannergooding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tannergooding/subscriptions","organizations_url":"https://api.github.com/users/tannergooding/orgs","repos_url":"https://api.github.com/users/tannergooding/repos","events_url":"https://api.github.com/users/tannergooding/events{/privacy}","received_events_url":"https://api.github.com/users/tannergooding/received_events","type":"User","site_admin":false},"body":"Fixes dotnet/corefx#1151 - New API for single-precision math.\r\n\r\nThis is still a work-in-progress.\r\n\r\n#### TODO:\r\n- [x] Deprecate `System.Math`\r\n- [x] Provide the existing math APIs under the respective native types\r\n- [x] Provide new math APIs for `System.Double`\r\n- [x] Provide equivalent math APIs for `System.Single`\r\n- [x] Provide FCALLS for all `System.Single` and `System.Double` math APIs\r\n- [ ] API Review\r\n- [ ] Changes based on API Review\r\n- [ ] Ensure that all FCALLS are implemented properly (as compared to\r\n`System.Math` and the CLI).\r\n- [ ] Provide tests covering the new APIs\r\n- [ ] Implement PAL changes for Linux/Mac\r\n- [ ] General Cleanup\r\n- [ ] Final Code Review\r\n\r\n#### Edits\r\n* Updated todo list to include the PAL changes required for Linux/Mac","created_at":"2015-04-15T19:08:19Z","updated_at":"2015-04-15T19:41:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"54fd31aedf6481d118f84e0c7c3129f68c9c2f28","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/coreclr/pulls/710/commits","review_comments_url":"https://api.github.com/repos/dotnet/coreclr/pulls/710/comments","review_comment_url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/710/comments","statuses_url":"https://api.github.com/repos/dotnet/coreclr/statuses/4c832c8736f87abe5608a66d0f9f78ae4145d5ae","head":{"label":"tannergooding:math-changes","ref":"math-changes","sha":"4c832c8736f87abe5608a66d0f9f78ae4145d5ae","user":{"login":"tannergooding","id":10487869,"avatar_url":"https://avatars.githubusercontent.com/u/10487869?v=3","gravatar_id":"","url":"https://api.github.com/users/tannergooding","html_url":"https://github.com/tannergooding","followers_url":"https://api.github.com/users/tannergooding/followers","following_url":"https://api.github.com/users/tannergooding/following{/other_user}","gists_url":"https://api.github.com/users/tannergooding/gists{/gist_id}","starred_url":"https://api.github.com/users/tannergooding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tannergooding/subscriptions","organizations_url":"https://api.github.com/users/tannergooding/orgs","repos_url":"https://api.github.com/users/tannergooding/repos","events_url":"https://api.github.com/users/tannergooding/events{/privacy}","received_events_url":"https://api.github.com/users/tannergooding/received_events","type":"User","site_admin":false},"repo":{"id":32194373,"name":"coreclr","full_name":"tannergooding/coreclr","owner":{"login":"tannergooding","id":10487869,"avatar_url":"https://avatars.githubusercontent.com/u/10487869?v=3","gravatar_id":"","url":"https://api.github.com/users/tannergooding","html_url":"https://github.com/tannergooding","followers_url":"https://api.github.com/users/tannergooding/followers","following_url":"https://api.github.com/users/tannergooding/following{/other_user}","gists_url":"https://api.github.com/users/tannergooding/gists{/gist_id}","starred_url":"https://api.github.com/users/tannergooding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tannergooding/subscriptions","organizations_url":"https://api.github.com/users/tannergooding/orgs","repos_url":"https://api.github.com/users/tannergooding/repos","events_url":"https://api.github.com/users/tannergooding/events{/privacy}","received_events_url":"https://api.github.com/users/tannergooding/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tannergooding/coreclr","description":"This repo contains the .NET Core runtime, called CoreCLR, and the base library, called mscorlib. It includes the garbage collector, JIT compiler, base .NET data types and many low-level classes.","fork":true,"url":"https://api.github.com/repos/tannergooding/coreclr","forks_url":"https://api.github.com/repos/tannergooding/coreclr/forks","keys_url":"https://api.github.com/repos/tannergooding/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tannergooding/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tannergooding/coreclr/teams","hooks_url":"https://api.github.com/repos/tannergooding/coreclr/hooks","issue_events_url":"https://api.github.com/repos/tannergooding/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/tannergooding/coreclr/events","assignees_url":"https://api.github.com/repos/tannergooding/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/tannergooding/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/tannergooding/coreclr/tags","blobs_url":"https://api.github.com/repos/tannergooding/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tannergooding/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tannergooding/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/tannergooding/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tannergooding/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/tannergooding/coreclr/languages","stargazers_url":"https://api.github.com/repos/tannergooding/coreclr/stargazers","contributors_url":"https://api.github.com/repos/tannergooding/coreclr/contributors","subscribers_url":"https://api.github.com/repos/tannergooding/coreclr/subscribers","subscription_url":"https://api.github.com/repos/tannergooding/coreclr/subscription","commits_url":"https://api.github.com/repos/tannergooding/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/tannergooding/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/tannergooding/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/tannergooding/coreclr/issues/comments{/number}","contents_url":"https://api.github.com/repos/tannergooding/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/tannergooding/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tannergooding/coreclr/merges","archive_url":"https://api.github.com/repos/tannergooding/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tannergooding/coreclr/downloads","issues_url":"https://api.github.com/repos/tannergooding/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/tannergooding/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/tannergooding/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/tannergooding/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tannergooding/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/tannergooding/coreclr/releases{/id}","created_at":"2015-03-14T03:37:19Z","updated_at":"2015-03-21T04:43:22Z","pushed_at":"2015-04-15T19:00:19Z","git_url":"git://github.com/tannergooding/coreclr.git","ssh_url":"git@github.com:tannergooding/coreclr.git","clone_url":"https://github.com/tannergooding/coreclr.git","svn_url":"https://github.com/tannergooding/coreclr","homepage":"","size":27852,"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":"dotnet:master","ref":"master","sha":"761c02a9c4ce5c42a3702e9c4ff785a54c5a57f4","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":30092893,"name":"coreclr","full_name":"dotnet/coreclr","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/coreclr","description":"This repo contains the .NET Core runtime, called CoreCLR, and the base library, called mscorlib. It includes the garbage collector, JIT compiler, base .NET data types and many low-level classes.","fork":false,"url":"https://api.github.com/repos/dotnet/coreclr","forks_url":"https://api.github.com/repos/dotnet/coreclr/forks","keys_url":"https://api.github.com/repos/dotnet/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/coreclr/teams","hooks_url":"https://api.github.com/repos/dotnet/coreclr/hooks","issue_events_url":"https://api.github.com/repos/dotnet/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/coreclr/events","assignees_url":"https://api.github.com/repos/dotnet/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/coreclr/tags","blobs_url":"https://api.github.com/repos/dotnet/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/coreclr/languages","stargazers_url":"https://api.github.com/repos/dotnet/coreclr/stargazers","contributors_url":"https://api.github.com/repos/dotnet/coreclr/contributors","subscribers_url":"https://api.github.com/repos/dotnet/coreclr/subscribers","subscription_url":"https://api.github.com/repos/dotnet/coreclr/subscription","commits_url":"https://api.github.com/repos/dotnet/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/coreclr/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/coreclr/merges","archive_url":"https://api.github.com/repos/dotnet/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/coreclr/downloads","issues_url":"https://api.github.com/repos/dotnet/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/coreclr/releases{/id}","created_at":"2015-01-30T22:10:02Z","updated_at":"2015-04-15T18:37:13Z","pushed_at":"2015-04-15T19:08:19Z","git_url":"git://github.com/dotnet/coreclr.git","ssh_url":"git@github.com:dotnet/coreclr.git","clone_url":"https://github.com/dotnet/coreclr.git","svn_url":"https://github.com/dotnet/coreclr","homepage":"","size":36397,"stargazers_count":4166,"watchers_count":4166,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":756,"mirror_url":null,"open_issues_count":96,"forks":756,"open_issues":96,"watchers":4166,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/710"},"html":{"href":"https://github.com/dotnet/coreclr/pull/710"},"issue":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/710"},"comments":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/710/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/710/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/710/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/coreclr/statuses/4c832c8736f87abe5608a66d0f9f78ae4145d5ae"}}}}