@ChrisChiasson: thanks. Sorry, I’m not trying to be antagonistic. I just don’t understand what’s going on. More below.
Thanks. I missed it when I looked at the code, probably because it was named
complexNotNullIssue123. I had assumed the test was testing that things weren’t null.
One thing that would help is to not use
auto in this test. I’m going to assume
T. And then autodiff holds.
The question I have is… are there any situations where if you had a
std::complex<stan::math::var> x, would you ever want the gradients of both the real and imaginary components? That’s these two things:
x.imag().grad(d_imag)? Or… will you ever only want gradients after a function that takes a complex value and returns something on the real plane?
What is “termination”? I haven’t seen that term used in conjunction with ADL. Is this called something else more commonly?
I’ve tried searching both google and stackoverflow for “ADL termination” and “argument dependent lookup termination” and I haven’t found anything relevant.
I just don’t understand the word “termination” in the way you’re using it so I don’t understand what that statement means. Help?