{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/22076","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/22076/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/22076/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/22076/events","html_url":"https://github.com/rust-lang/rust/pull/22076","id":56939281,"number":22076,"title":"Correct fns exp2 that were calling exp","user":{"login":"carols10cents","id":193874,"avatar_url":"https://avatars.githubusercontent.com/u/193874?v=3","gravatar_id":"","url":"https://api.github.com/users/carols10cents","html_url":"https://github.com/carols10cents","followers_url":"https://api.github.com/users/carols10cents/followers","following_url":"https://api.github.com/users/carols10cents/following{/other_user}","gists_url":"https://api.github.com/users/carols10cents/gists{/gist_id}","starred_url":"https://api.github.com/users/carols10cents/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carols10cents/subscriptions","organizations_url":"https://api.github.com/users/carols10cents/orgs","repos_url":"https://api.github.com/users/carols10cents/repos","events_url":"https://api.github.com/users/carols10cents/events{/privacy}","received_events_url":"https://api.github.com/users/carols10cents/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"huonw","id":1203825,"avatar_url":"https://avatars.githubusercontent.com/u/1203825?v=3","gravatar_id":"","url":"https://api.github.com/users/huonw","html_url":"https://github.com/huonw","followers_url":"https://api.github.com/users/huonw/followers","following_url":"https://api.github.com/users/huonw/following{/other_user}","gists_url":"https://api.github.com/users/huonw/gists{/gist_id}","starred_url":"https://api.github.com/users/huonw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huonw/subscriptions","organizations_url":"https://api.github.com/users/huonw/orgs","repos_url":"https://api.github.com/users/huonw/repos","events_url":"https://api.github.com/users/huonw/events{/privacy}","received_events_url":"https://api.github.com/users/huonw/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2015-02-08T05:04:52Z","updated_at":"2015-02-11T01:54:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/22076","html_url":"https://github.com/rust-lang/rust/pull/22076","diff_url":"https://github.com/rust-lang/rust/pull/22076.diff","patch_url":"https://github.com/rust-lang/rust/pull/22076.patch"},"body":"Fixes  #22080.\r\n\r\nI was working on adding examples to the documentation in `std::num::Float`. I got to `exp2`, which says \"Returns 2 raised to the power of the number, `2^(self)`.\"\r\n\r\nSo I tried running this code:\r\n\r\n```\r\nuse std::num::Float;\r\n\r\n#[test]\r\nfn test_exp2() {\r\n    assert_eq!(32.0, 5.0.exp2());\r\n}\r\n```\r\n\r\nand it resulted in a failure of ``(left: `32`, right: `148.413159`)``. That 148.413159 is the value for e^5, which is `exp()`, not `exp2()`.\r\n\r\nSure enough, `exp2` is calling `exp` and shouldn't be, looks like a copy-paste error. \r\n\r\nI haven't added any tests for this since it's unlikely to break again, but I will happily do so if people think that would be a good idea. The doc examples are coming :)\r\n\r\nI scanned through the other functions in these files for similar sorts of errors and didn't notice any."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/73822477","html_url":"https://github.com/rust-lang/rust/pull/22076#issuecomment-73822477","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/22076","id":73822477,"user":{"login":"huonw","id":1203825,"avatar_url":"https://avatars.githubusercontent.com/u/1203825?v=3","gravatar_id":"","url":"https://api.github.com/users/huonw","html_url":"https://github.com/huonw","followers_url":"https://api.github.com/users/huonw/followers","following_url":"https://api.github.com/users/huonw/following{/other_user}","gists_url":"https://api.github.com/users/huonw/gists{/gist_id}","starred_url":"https://api.github.com/users/huonw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huonw/subscriptions","organizations_url":"https://api.github.com/users/huonw/orgs","repos_url":"https://api.github.com/users/huonw/repos","events_url":"https://api.github.com/users/huonw/events{/privacy}","received_events_url":"https://api.github.com/users/huonw/received_events","type":"User","site_admin":false},"created_at":"2015-02-11T01:54:38Z","updated_at":"2015-02-11T01:54:38Z","body":"@bors r+ 8379\r\n\r\nThanks"}}