-
-
Notifications
You must be signed in to change notification settings - Fork 198
Closed
Description
AD of pow<fvar<var>>(0, 0) causes NAN adjoint. pow<fvar<var>>(0, 0) and pow<var>(0, 0) both behave as expected.
Update
pow<var>(0, 0) should return NAN adjoint since the partials are undefined.
Steps to reproduce
stan::math::nested_rev_autodiff nested{};
stan::math::var t{0.0};
auto foo = stan::math::pow(t,0);
foo.grad();
assert(not std::isfinite(t.adj())); // failsCurrent Version:
v4.7.0
Metadata
Metadata
Assignees
Labels
No labels