-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make pow pushforward fn numerically stable
This commit makes clad::custom_derivatives::std::pow_pushforward fn numerically stable by only adding directional derivative w.r.t exponent if and only if the directional seed of exponent is non-zero. This will make the function give correct directional derivative for the cases where log(base) is undefined but directional derivative w.r.t exponent is not requested -- thus log(base) should ideally never be used. Closes #507
- Loading branch information
1 parent
e658d27
commit 6250d7d
Showing
3 changed files
with
105 additions
and
34 deletions.
There are no files selected for viewing
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
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
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