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

time-shift
Johannes Pfeifer 2012-05-17 09:10:54 +02:00
parent 6868e81b16
commit cd0bc28e7c
1 changed files with 1 additions and 1 deletions

View File

@ -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);