# How to forward differentiate a complex function?

**URL:** https://discourse.julialang.org/t/how-to-forward-differentiate-a-complex-function/130127
**Category:** General Usage
**Tags:** question, forwarddiff, autodiff, complex-numbers
**Created:** [June 23, 2025, 10:52am UTC](https://discourse.julialang.org/t/how-to-forward-differentiate-a-complex-function/130127 "2025-06-23T10:52:14Z")
**Posts on this page:** 1
**Showing post:** 13

<div class="post-metadata">

### Author: ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/27854_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)
#### Post date: [June 23, 2025, 7:42pm UTC](https://discourse.julialang.org/t/how-to-forward-differentiate-a-complex-function/130127/13 "2025-06-23T19:42:40Z")

</div>

Well that’s only the beginning of the story, because the representation of the derivative in the non holomorphic case has several variants, none of which is unambiguously the right one.

> [@Taking Complex Autodiff Seriously in ChainRules](https://discourse.julialang.org/t/taking-complex-autodiff-seriously-in-chainrules/39317):
>
> So these conversations have been starting up recently again on the Slack #autodiff channel and in places like [https://github.com/JuliaDiff/ChainRulesCore.jl/issues/159](https://github.com/JuliaDiff/ChainRulesCore.jl/issues/159). I think there’s a lot of misconceptions out there about the derivatives of functions of complex numbers, caused in part by confusing notation and in part by many people’s education about complex numbers focusing too heavily on the holomorphic case. However, in an AD system where we want to deal with general code, we can not limi…

---

_[View the full topic](https://discourse.julialang.org/t/how-to-forward-differentiate-a-complex-function/130127)._
