{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/coreclr/issues/2683","labels_url":"https://api.github.com/repos/dotnet/coreclr/issues/2683/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/2683/comments","events_url":"https://api.github.com/repos/dotnet/coreclr/issues/2683/events","html_url":"https://github.com/dotnet/coreclr/issues/2683","id":126891148,"number":2683,"title":"Numerical Issue in Math.Log(x,b) when upgrading to Update 1","user":{"login":"redknightlois","id":1045411,"avatar_url":"https://avatars.githubusercontent.com/u/1045411?v=3","gravatar_id":"","url":"https://api.github.com/users/redknightlois","html_url":"https://github.com/redknightlois","followers_url":"https://api.github.com/users/redknightlois/followers","following_url":"https://api.github.com/users/redknightlois/following{/other_user}","gists_url":"https://api.github.com/users/redknightlois/gists{/gist_id}","starred_url":"https://api.github.com/users/redknightlois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redknightlois/subscriptions","organizations_url":"https://api.github.com/users/redknightlois/orgs","repos_url":"https://api.github.com/users/redknightlois/repos","events_url":"https://api.github.com/users/redknightlois/events{/privacy}","received_events_url":"https://api.github.com/users/redknightlois/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-01-15T15:08:30Z","updated_at":"2016-01-16T07:55:56Z","closed_at":null,"body":"After updating to Update 1 I have a test that started to fail.\r\n\r\nThe core is this:\r\n```Assert.Equal((uint)Math.Log(BitVector.BitsPerWord, 2), BitVector.Log2BitsPerWord);```\r\nessentially what I am doing there is:\r\n```Assert.Equal((uint)Math.Log(64,2), 6);```\r\n\r\nMy surprise was when I looked into the result of ```Math.Log(64,2)``` which should be ```6```, however Update1 shows ```5.9999999999999991``` \r\n\r\nNeedless to say that the correct answer is ```6```\r\nhttp://www.wolframalpha.com/input/?i=log%2864%29%2Flog%282%29\r\n\r\nEDIT: For the look of it, it could be a JIT optimization going wrong as I doubt someone would have been tampering with Math.Log in a release candidate. "},"comment":{"url":"https://api.github.com/repos/dotnet/coreclr/issues/comments/172170521","html_url":"https://github.com/dotnet/coreclr/issues/2683#issuecomment-172170521","issue_url":"https://api.github.com/repos/dotnet/coreclr/issues/2683","id":172170521,"user":{"login":"mikedn","id":9973420,"avatar_url":"https://avatars.githubusercontent.com/u/9973420?v=3","gravatar_id":"","url":"https://api.github.com/users/mikedn","html_url":"https://github.com/mikedn","followers_url":"https://api.github.com/users/mikedn/followers","following_url":"https://api.github.com/users/mikedn/following{/other_user}","gists_url":"https://api.github.com/users/mikedn/gists{/gist_id}","starred_url":"https://api.github.com/users/mikedn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikedn/subscriptions","organizations_url":"https://api.github.com/users/mikedn/orgs","repos_url":"https://api.github.com/users/mikedn/repos","events_url":"https://api.github.com/users/mikedn/events{/privacy}","received_events_url":"https://api.github.com/users/mikedn/received_events","type":"User","site_admin":false},"created_at":"2016-01-16T07:55:56Z","updated_at":"2016-01-16T07:55:56Z","body":"I found a dnx-coreclr-win-x86.1.0.0-rc2-16128 and tested, I still get 6. It might be interesting to know the CPU you use to test in case the CRT uses a different implementation. Though it's probably a new enough CPU to not matter..."}}