{"action":"created","issue":{"url":"https://api.github.com/repos/japaric/libm/issues/118","repository_url":"https://api.github.com/repos/japaric/libm","labels_url":"https://api.github.com/repos/japaric/libm/issues/118/labels{/name}","comments_url":"https://api.github.com/repos/japaric/libm/issues/118/comments","events_url":"https://api.github.com/repos/japaric/libm/issues/118/events","html_url":"https://github.com/japaric/libm/issues/118","id":341495637,"node_id":"MDU6SXNzdWUzNDE0OTU2Mzc=","number":118,"title":"Internal usage of f64 in some f32 functions","user":{"login":"korken89","id":913109,"node_id":"MDQ6VXNlcjkxMzEwOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/913109?v=4","gravatar_id":"","url":"https://api.github.com/users/korken89","html_url":"https://github.com/korken89","followers_url":"https://api.github.com/users/korken89/followers","following_url":"https://api.github.com/users/korken89/following{/other_user}","gists_url":"https://api.github.com/users/korken89/gists{/gist_id}","starred_url":"https://api.github.com/users/korken89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/korken89/subscriptions","organizations_url":"https://api.github.com/users/korken89/orgs","repos_url":"https://api.github.com/users/korken89/repos","events_url":"https://api.github.com/users/korken89/events{/privacy}","received_events_url":"https://api.github.com/users/korken89/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-16T12:18:25Z","updated_at":"2018-07-16T12:30:03Z","closed_at":null,"author_association":"NONE","body":"Hi, I had a look over the library and something struck me as odd.\r\n\r\nFor example in `sinf` and `k_sinf` the input arguments are being cast up into `f64`, which will incur a significant run-time cost on `no_std` systems which only has an single precision floating point unit.\r\nMoreover, the calculation being done in, for example here:\r\nhttps://github.com/japaric/libm/blob/3932e2ea8e7e8f782cea6b243c3032d415b8afeb/src/math/sinf.rs#L62 \r\nThe `f64` is only used for sums, which does not need the extra precision given by `f64`.\r\n\r\nThis looks like a copy/paste bug to me, but I would like to hear your reasoning about this."},"comment":{"url":"https://api.github.com/repos/japaric/libm/issues/comments/405231661","html_url":"https://github.com/japaric/libm/issues/118#issuecomment-405231661","issue_url":"https://api.github.com/repos/japaric/libm/issues/118","id":405231661,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTIzMTY2MQ==","user":{"login":"korken89","id":913109,"node_id":"MDQ6VXNlcjkxMzEwOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/913109?v=4","gravatar_id":"","url":"https://api.github.com/users/korken89","html_url":"https://github.com/korken89","followers_url":"https://api.github.com/users/korken89/followers","following_url":"https://api.github.com/users/korken89/following{/other_user}","gists_url":"https://api.github.com/users/korken89/gists{/gist_id}","starred_url":"https://api.github.com/users/korken89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/korken89/subscriptions","organizations_url":"https://api.github.com/users/korken89/orgs","repos_url":"https://api.github.com/users/korken89/repos","events_url":"https://api.github.com/users/korken89/events{/privacy}","received_events_url":"https://api.github.com/users/korken89/received_events","type":"User","site_admin":false},"created_at":"2018-07-16T12:30:03Z","updated_at":"2018-07-16T12:30:03Z","author_association":"NONE","body":"I saw that the kernel in `k_sinf` utilizes `f64` and that high powers (x^5) are being used as well. \r\nIs this what causes the use of `f64`? Has the precision loss vs `f32` been benchmarked?"}}
{"actor":{"display_login":"korken89"}}