-
Notifications
You must be signed in to change notification settings - Fork 409
add primitives with better numerical properties #1595
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
Comments
I didn't know about "hypot". Looks like a useful function and the derivative rule is trivial: If f = hypot(x,y), then, df/dx = x/f. |
If you want to avoid a not-a-number, you could define the derivative rule as |
That derivative is undefined, what is casadi's policy on such things? Either way, I would try to keep the properties of |
Policy is that 0/0 will give you a not a number. But you're never guaranteed to get not-a-number. x/x will simplify to 1, for example. Derivative of |
The text was updated successfully, but these errors were encountered: