{"action":"created","issue":{"url":"https://api.github.com/repos/scala-js/scala-js/issues/2587","repository_url":"https://api.github.com/repos/scala-js/scala-js","labels_url":"https://api.github.com/repos/scala-js/scala-js/issues/2587/labels{/name}","comments_url":"https://api.github.com/repos/scala-js/scala-js/issues/2587/comments","events_url":"https://api.github.com/repos/scala-js/scala-js/issues/2587/events","html_url":"https://github.com/scala-js/scala-js/issues/2587","id":176078665,"number":2587,"title":"BigDecimal is not distributive","user":{"login":"non","id":218045,"avatar_url":"https://avatars.githubusercontent.com/u/218045?v=3","gravatar_id":"","url":"https://api.github.com/users/non","html_url":"https://github.com/non","followers_url":"https://api.github.com/users/non/followers","following_url":"https://api.github.com/users/non/following{/other_user}","gists_url":"https://api.github.com/users/non/gists{/gist_id}","starred_url":"https://api.github.com/users/non/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/non/subscriptions","organizations_url":"https://api.github.com/users/non/orgs","repos_url":"https://api.github.com/users/non/repos","events_url":"https://api.github.com/users/non/events{/privacy}","received_events_url":"https://api.github.com/users/non/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/scala-js/scala-js/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/scala-js/scala-js/milestones/41","html_url":"https://github.com/scala-js/scala-js/milestones/v0.6.13","labels_url":"https://api.github.com/repos/scala-js/scala-js/milestones/41/labels","id":1965200,"number":41,"title":"v0.6.13","description":"","creator":{"login":"sjrd","id":535934,"avatar_url":"https://avatars.githubusercontent.com/u/535934?v=3","gravatar_id":"","url":"https://api.github.com/users/sjrd","html_url":"https://github.com/sjrd","followers_url":"https://api.github.com/users/sjrd/followers","following_url":"https://api.github.com/users/sjrd/following{/other_user}","gists_url":"https://api.github.com/users/sjrd/gists{/gist_id}","starred_url":"https://api.github.com/users/sjrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjrd/subscriptions","organizations_url":"https://api.github.com/users/sjrd/orgs","repos_url":"https://api.github.com/users/sjrd/repos","events_url":"https://api.github.com/users/sjrd/events{/privacy}","received_events_url":"https://api.github.com/users/sjrd/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":0,"state":"open","created_at":"2016-08-26T13:59:40Z","updated_at":"2016-09-09T19:45:44Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-09-09T18:37:29Z","updated_at":"2016-09-09T20:04:51Z","closed_at":null,"body":"It seems like there's a bug in the `BigDecimal` implementation, possibly related to the fact that `Int.MinValue` equals `-Int.MinValue`:\r\n\r\n```scala\r\nobject TestCase extends scala.scalajs.js.JSApp {\r\n  def main(): Unit = {\r\n    val x = BigDecimal(Int.MinValue)\r\n    println(x * (x + x))\r\n    println(x * x + x * x)\r\n  }\r\n}\r\n```\r\n\r\nHere's the output:\r\n\r\n> -9223372036854775808\r\n> 9223372036854775808\r\n\r\n(The correct answer is `9223372036854775808`.)\r\n\r\nThis is using Scala 2.11.8 and Scala.js 0.6.11."},"comment":{"url":"https://api.github.com/repos/scala-js/scala-js/issues/comments/246024419","html_url":"https://github.com/scala-js/scala-js/issues/2587#issuecomment-246024419","issue_url":"https://api.github.com/repos/scala-js/scala-js/issues/2587","id":246024419,"user":{"login":"non","id":218045,"avatar_url":"https://avatars.githubusercontent.com/u/218045?v=3","gravatar_id":"","url":"https://api.github.com/users/non","html_url":"https://github.com/non","followers_url":"https://api.github.com/users/non/followers","following_url":"https://api.github.com/users/non/following{/other_user}","gists_url":"https://api.github.com/users/non/gists{/gist_id}","starred_url":"https://api.github.com/users/non/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/non/subscriptions","organizations_url":"https://api.github.com/users/non/orgs","repos_url":"https://api.github.com/users/non/repos","events_url":"https://api.github.com/users/non/events{/privacy}","received_events_url":"https://api.github.com/users/non/received_events","type":"User","site_admin":false},"created_at":"2016-09-09T20:04:51Z","updated_at":"2016-09-09T20:04:51Z","body":"@sjrd I can try to take a look too -- I don't have as much scala.js experience but I've worked with a bunch of number types in the past."}}
{"actor":{"display_login":"non"}}