{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaDiff/TaylorSeries.jl/issues/156","repository_url":"https://api.github.com/repos/JuliaDiff/TaylorSeries.jl","labels_url":"https://api.github.com/repos/JuliaDiff/TaylorSeries.jl/issues/156/labels{/name}","comments_url":"https://api.github.com/repos/JuliaDiff/TaylorSeries.jl/issues/156/comments","events_url":"https://api.github.com/repos/JuliaDiff/TaylorSeries.jl/issues/156/events","html_url":"https://github.com/JuliaDiff/TaylorSeries.jl/issues/156","id":299835248,"number":156,"title":"add! does not work to add two TaylorN","user":{"login":"dpsanders","id":191822,"avatar_url":"https://avatars0.githubusercontent.com/u/191822?v=4","gravatar_id":"","url":"https://api.github.com/users/dpsanders","html_url":"https://github.com/dpsanders","followers_url":"https://api.github.com/users/dpsanders/followers","following_url":"https://api.github.com/users/dpsanders/following{/other_user}","gists_url":"https://api.github.com/users/dpsanders/gists{/gist_id}","starred_url":"https://api.github.com/users/dpsanders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpsanders/subscriptions","organizations_url":"https://api.github.com/users/dpsanders/orgs","repos_url":"https://api.github.com/users/dpsanders/repos","events_url":"https://api.github.com/users/dpsanders/events{/privacy}","received_events_url":"https://api.github.com/users/dpsanders/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-02-23T20:09:09Z","updated_at":"2018-02-23T22:03:01Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"```jl\r\njulia> x, y = set_variables(\"x y\")\r\n2-element Array{TaylorSeries.TaylorN{Float64},1}:\r\n  1.0 x + 𝒪(‖x‖⁷)\r\n  1.0 y + 𝒪(‖x‖⁷)\r\n\r\njulia> s = (x+y)^3\r\n 1.0 x³ + 3.0 x² y + 3.0 x y² + 1.0 y³ + 𝒪(‖x‖⁷)\r\n\r\njulia> TaylorSeries.add!(s, 3x)\r\nERROR: MethodError: no method matching add!(::TaylorSeries.TaylorN{Float64}, ::TaylorSeries.TaylorN{Float64})\r\nClosest candidates are:\r\n  add!(::TaylorSeries.TaylorN, ::TaylorSeries.TaylorN, ::Int64) at /Users/dpsanders/.julia/v0.6/TaylorSeries/src/arithmetic.jl:121\r\n  add!(::TaylorSeries.TaylorN, ::TaylorSeries.TaylorN, ::TaylorSeries.TaylorN, ::Int64) at /Users/dpsanders/.julia/v0.6/TaylorSeries/src/arithmetic.jl:129\r\n  add!(::TaylorSeries.TaylorN, ::TaylorSeries.TaylorN, ::Union{Complex, Real}, ::Int64) at /Users/dpsanders/.julia/v0.6/TaylorSeries/src/arithmetic.jl:133\r\n  ...\r\n```"},"comment":{"url":"https://api.github.com/repos/JuliaDiff/TaylorSeries.jl/issues/comments/368151423","html_url":"https://github.com/JuliaDiff/TaylorSeries.jl/issues/156#issuecomment-368151423","issue_url":"https://api.github.com/repos/JuliaDiff/TaylorSeries.jl/issues/156","id":368151423,"user":{"login":"lbenet","id":5237744,"avatar_url":"https://avatars0.githubusercontent.com/u/5237744?v=4","gravatar_id":"","url":"https://api.github.com/users/lbenet","html_url":"https://github.com/lbenet","followers_url":"https://api.github.com/users/lbenet/followers","following_url":"https://api.github.com/users/lbenet/following{/other_user}","gists_url":"https://api.github.com/users/lbenet/gists{/gist_id}","starred_url":"https://api.github.com/users/lbenet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lbenet/subscriptions","organizations_url":"https://api.github.com/users/lbenet/orgs","repos_url":"https://api.github.com/users/lbenet/repos","events_url":"https://api.github.com/users/lbenet/events{/privacy}","received_events_url":"https://api.github.com/users/lbenet/received_events","type":"User","site_admin":false},"created_at":"2018-02-23T22:03:01Z","updated_at":"2018-02-23T22:03:01Z","author_association":"MEMBER","body":"It does work, though not as an in-place operation.\r\n\r\n```julia\r\njulia> using TaylorSeries\r\n\r\njulia> x, y = set_variables(\"x y\")\r\n2-element Array{TaylorSeries.TaylorN{Float64},1}:\r\n  1.0 x + 𝒪(‖x‖⁷)\r\n  1.0 y + 𝒪(‖x‖⁷)\r\n\r\njulia> s = (x + y)^2\r\n 1.0 x² + 2.0 x y + 1.0 y² + 𝒪(‖x‖⁷)\r\n\r\njulia> t = (x-y)^2\r\n 1.0 x² - 2.0 x y + 1.0 y² + 𝒪(‖x‖⁷)\r\n\r\njulia> s = s+t\r\n 2.0 x² + 2.0 y² + 𝒪(‖x‖⁷)\r\n```"}}
{"actor":{"display_login":"lbenet"}}