Fixed bug in getPowerDeriv.m where the nth derivative of 0^n evaluated to 0 instead of n!
parent
6868e81b16
commit
cd0bc28e7c
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue