We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have a function which returns a var. How do I then do a calculation such as fabs(a-0.001)? I'm getting the error
var
fabs(a-0.001)
error: cannot convert ‘autodiff::var’ to ‘double’ in assignment
The text was updated successfully, but these errors were encountered:
I got it - val(a) :)
val(a)
Sorry, something went wrong.
Hmmm maybe ir makes sense to overload fabs (and also abs) in autodiff, so that you don't need to use val at all.
fabs
abs
val
No branches or pull requests
I have a function which returns a
var
. How do I then do a calculation such asfabs(a-0.001)
? I'm getting the errorThe text was updated successfully, but these errors were encountered: