-
Notifications
You must be signed in to change notification settings - Fork 31
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
Not using "strong zeros" for deriatives of constant values #278
Comments
We used to have this. Not having that type stability is in theory fine, but in practice the small unions optimization often failed, causing 100x slowdown. |
Compare:
with
You can see in the code_typed that it appears to be subtracting
0.0 * exp(x)^2
from the answer of1.0 * exp(x)
, causing theNaN
. Ideally this'd instead be1.0 * exp(x) - ZeroTangent()*exp(x)^2
so that we don't get theNaN
.The text was updated successfully, but these errors were encountered: