-
Notifications
You must be signed in to change notification settings - Fork 0
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
add 'safe_power' engine function that sets 0^0 to 0 #200
Comments
Thanks Ben. I'll checkout your branch. |
PS There seems to be a similar construction at line 130 of https://kaskr.github.io/adcomp/convenience_8hpp_source.html |
Thanks! I'm following this here: https://www.coin-or.org/CppAD/Doc/condexp.htm |
New branch at https://github.com/canmod/macpan2/tree/safe_power2, PR |
Thanks Ben. I think I did it a while ago, then needed to take little people to choir and then there are tests failing from other commits in the branch. Here's the pull request I was using: #201 . But I haven't pushed my changes yet. In any case, this is what it will look like I think.
|
Looks like |
Why? In this case I don't think we want to be more permissive (i.e. |
I now have it working with tests, and was about to check it in when I realized that R itself seems to be doing |
More confusion. I've now asked the engine to do the case in the description of this ticket, and I get the following.
This is not a |
Another example of R doing something that my current
|
Here is the first version of the test of |
it would be convenient to have an engine function that computes
x^y
but always returns 0 ifx==0
. (We have a special case where we are computing0^0
, where C++ quite reasonably returnsNaN
; we know we want the answer to be 0 in this case.) I took a crack at this on a branch (withCppAD::CondExpLt
), but am so far failing (perhaps because of some issue with vectorization? Not sure ...)If this is not something @stevencarlislewalker can figure out quickly I might ask on the TMB list ...
(attn: @jfree-man)
The text was updated successfully, but these errors were encountered: