{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaDiff/DualNumbers.jl/issues/29","labels_url":"https://api.github.com/repos/JuliaDiff/DualNumbers.jl/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/JuliaDiff/DualNumbers.jl/issues/29/comments","events_url":"https://api.github.com/repos/JuliaDiff/DualNumbers.jl/issues/29/events","html_url":"https://github.com/JuliaDiff/DualNumbers.jl/pull/29","id":118096217,"number":29,"title":"Add support for Dual{Complex}","user":{"login":"MikaelSlevinsky","id":8176037,"avatar_url":"https://avatars.githubusercontent.com/u/8176037?v=3","gravatar_id":"","url":"https://api.github.com/users/MikaelSlevinsky","html_url":"https://github.com/MikaelSlevinsky","followers_url":"https://api.github.com/users/MikaelSlevinsky/followers","following_url":"https://api.github.com/users/MikaelSlevinsky/following{/other_user}","gists_url":"https://api.github.com/users/MikaelSlevinsky/gists{/gist_id}","starred_url":"https://api.github.com/users/MikaelSlevinsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikaelSlevinsky/subscriptions","organizations_url":"https://api.github.com/users/MikaelSlevinsky/orgs","repos_url":"https://api.github.com/users/MikaelSlevinsky/repos","events_url":"https://api.github.com/users/MikaelSlevinsky/events{/privacy}","received_events_url":"https://api.github.com/users/MikaelSlevinsky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":22,"created_at":"2015-11-20T18:18:32Z","updated_at":"2015-11-26T10:55:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/JuliaDiff/DualNumbers.jl/pulls/29","html_url":"https://github.com/JuliaDiff/DualNumbers.jl/pull/29","diff_url":"https://github.com/JuliaDiff/DualNumbers.jl/pull/29.diff","patch_url":"https://github.com/JuliaDiff/DualNumbers.jl/pull/29.patch"},"body":"Dear dualists (duellers?)\r\n\r\nWe would like to use DualNumbers in ApproxFun and dependent packages such as SingularIntegralEquations as a requirement. In ApproxFun, we create expansions of functions in numerous spectral bases (Chebyshev, Fourier, Legendre, Jacobi, etc...) and solve ordinary and partial differential equations in these bases as well.\r\n\r\nOne particular use of dual numbers will be in automatic differentiation to compute normal derivatives of incident waves to solve elliptic PDEs like the Helmholtz equation with Neumann boundary conditions in SingularIntegralEquations.\r\n\r\nTo make the transition possible, DualNumbers must be extended to work on Complex data types as well. This required a minor rewrite, and for the most part an improvement.\r\n\r\nI would be happy to see this merged, though I can be patient given dependencies on DualNumbers that would break.\r\n\r\nIf merged, this would close #13, #23 (as a patch), and #24."},"comment":{"url":"https://api.github.com/repos/JuliaDiff/DualNumbers.jl/issues/comments/159878148","html_url":"https://github.com/JuliaDiff/DualNumbers.jl/pull/29#issuecomment-159878148","issue_url":"https://api.github.com/repos/JuliaDiff/DualNumbers.jl/issues/29","id":159878148,"user":{"login":"MikaelSlevinsky","id":8176037,"avatar_url":"https://avatars.githubusercontent.com/u/8176037?v=3","gravatar_id":"","url":"https://api.github.com/users/MikaelSlevinsky","html_url":"https://github.com/MikaelSlevinsky","followers_url":"https://api.github.com/users/MikaelSlevinsky/followers","following_url":"https://api.github.com/users/MikaelSlevinsky/following{/other_user}","gists_url":"https://api.github.com/users/MikaelSlevinsky/gists{/gist_id}","starred_url":"https://api.github.com/users/MikaelSlevinsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikaelSlevinsky/subscriptions","organizations_url":"https://api.github.com/users/MikaelSlevinsky/orgs","repos_url":"https://api.github.com/users/MikaelSlevinsky/repos","events_url":"https://api.github.com/users/MikaelSlevinsky/events{/privacy}","received_events_url":"https://api.github.com/users/MikaelSlevinsky/received_events","type":"User","site_admin":false},"created_at":"2015-11-26T10:55:06Z","updated_at":"2015-11-26T10:55:06Z","body":"The dual part returns the epsilon component of z multiplied by f'(z.value), so:\r\n```julia\r\njulia> z = Dual(1.0,1.0+im)\r\n1.0 + 0.0im  +  1.0 + 1.0imɛ\r\n\r\njulia> exp(z)\r\n2.718281828459045 + 0.0im  +  2.718281828459045 + 2.718281828459045imɛ\r\n```\r\nDoesn't this mean that the function must be complex differentiable?"}}