Skip to content
Discussion options

You must be logged in to vote

Hi, thanks for looking at CoDiPack.

I will focus on step 3 first:
As you already said, global is deactivated beforhand and not updated. Therefore, global is a constant with respect to the differentiation. The value of global is x * t = x*x*x = 64 with x=4. It got this value during step one.

f is now f = global * t2 = global * (x + t) = global * (x + x^2). Since global has the same value we get the same result.
df/dx is now different since we no longer see the dependency of global with respect to x.
df/dx = global + 2 * global * x. This with x=4 and global=64 we get 576.

Step2:
It is very tricky do properly answer step 2. The whole tutorial is about sensibilizing the user for exactly this …

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by MaxSagebaum
Comment options

You must be logged in to vote
1 reply
@MaxSagebaum
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants