Created
March 22, 2014 20:40
-
-
Save ghorn/9714029 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# result of symbolic differentaition | |
def f_sym(x): | |
f = exp(k*x) | |
fd = k*exp(k*x) | |
return (f,fd) | |
# result of AD | |
def f_ad(x): | |
f = exp(k*x) | |
fd = k*f | |
return (f,fd) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment