{"action":"opened","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/17869","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/17869/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/17869/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/17869/events","html_url":"https://github.com/JuliaLang/julia/issues/17869","id":169769802,"number":17869,"title":"Wrong result of dot function","user":{"login":"giordano","id":765740,"avatar_url":"https://avatars.githubusercontent.com/u/765740?v=3","gravatar_id":"","url":"https://api.github.com/users/giordano","html_url":"https://github.com/giordano","followers_url":"https://api.github.com/users/giordano/followers","following_url":"https://api.github.com/users/giordano/following{/other_user}","gists_url":"https://api.github.com/users/giordano/gists{/gist_id}","starred_url":"https://api.github.com/users/giordano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giordano/subscriptions","organizations_url":"https://api.github.com/users/giordano/orgs","repos_url":"https://api.github.com/users/giordano/repos","events_url":"https://api.github.com/users/giordano/events{/privacy}","received_events_url":"https://api.github.com/users/giordano/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-06T22:32:05Z","updated_at":"2016-08-06T22:32:05Z","closed_at":null,"body":"While working on the `LombScargle.jl` package, I noticed that in some cases the `dot` function gives a surprisingly imprecise result.  For example, the dot product between a vector and `ones` should be equal to the sum of elements of the vector, but this isn't the case:\r\n```julia\r\njulia> versioninfo()\r\nJulia Version 0.6.0-dev.49\r\nCommit bc4eba5 (2016-08-06 08:00 UTC)\r\nPlatform Info:\r\n  System: Linux (x86_64-unknown-linux-gnu)\r\n  CPU: Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz\r\n  WORD_SIZE: 64\r\n  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)\r\n  LAPACK: libopenblas64_\r\n  LIBM: libopenlibm\r\n  LLVM: libLLVM-3.7.1 (ORCJIT, haswell)\r\ns = sin(linspace(0.01, 10pi, 1001));\r\ndot(ones(s), s)\r\n# => 0.003408004595124931\r\nsum(s)\r\n# => 0.003408004595202869\r\nsum(ones(s).*s) # This is slower than `dot`, but more precise\r\n# => 0.003408004595202869\r\n```\r\n"}}
{"actor":{"display_login":"giordano"}}