Skip to content
Snippets Groups Projects
Commit cd0bc28e authored by Johannes Pfeifer's avatar Johannes Pfeifer
Browse files

Fixed bug in getPowerDeriv.m where the nth derivative of 0^n evaluated to 0 instead of n!

parent 6868e81b
Branches
No related tags found
No related merge requests found
......@@ -30,7 +30,7 @@ function dxp=getPowerDeriv(x,p,k)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
if (abs(x) < 1e-12) && (p > 0) && (k >= p) && (abs(p - round(p)) < 1e-12)
if (abs(x) < 1e-12) && (p > 0) && (k > p) && (abs(p - round(p)) < 1e-12)
dxp = 0;
else
dxp = x^(p-k);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment