Skip to content

check for iszero(partials(x)) in pow#592

Merged
andreasnoack merged 1 commit intoJuliaDiff:masterfrom
chriselrod:checkforzeroxpartialsinpow
Aug 8, 2022
Merged

check for iszero(partials(x)) in pow#592
andreasnoack merged 1 commit intoJuliaDiff:masterfrom
chriselrod:checkforzeroxpartialsinpow

Conversation

@chriselrod
Copy link
Contributor

No description provided.

@chriselrod
Copy link
Contributor Author

chriselrod commented Aug 4, 2022

As suggested by @andreasnoack, I think it's also worth considering StatsFuns.xlogy in place of x * log(y) within ForwardDiff.

That'd be a bigger change, so it's better suited for a separate PR. I just mention it here on the theme of better handling of 0.

Note that y ^ x in Base is implemented via an extended precision exp(x * log(y)), minimal code should be needed for an accurate x * log(y).

@devmotion
Copy link
Member

As suggested by @andreasnoack, I think it's also worth considering StatsFuns.xlogy in place of x * log(y) within ForwardDiff.

As you might know, StatsFuns just reexports LogExpFunctions.xlogy, and since ForwardDiff already depends on LogExpFunctions this would not even require any additional dependencies.

@andreasnoack andreasnoack merged commit 85f439e into JuliaDiff:master Aug 8, 2022
@chriselrod chriselrod deleted the checkforzeroxpartialsinpow branch August 8, 2022 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants