Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect gradient differentiating parenthesis #1098

Open
ovdiiuv opened this issue Sep 17, 2024 · 0 comments
Open

Incorrect gradient differentiating parenthesis #1098

ovdiiuv opened this issue Sep 17, 2024 · 0 comments

Comments

@ovdiiuv
Copy link
Collaborator

ovdiiuv commented Sep 17, 2024

Differentiating

double f5(double x){
  return -1 * (-x);
}

gives us

void f5_grad(double x, double *_d_x) {
    *_d_x += --1 * 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant