Skip to content

Commit

Permalink
Add range for power when possible
Browse files Browse the repository at this point in the history
  • Loading branch information
Johan Löfberg committed May 26, 2024
1 parent d7078ad commit 49eb3cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions operators/power_internal1.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
Y = varargin{4};
F=[];
if Y>=1
operator = CreateBasicOperator('increasing','positive','callback');
operator = CreateBasicOperator('increasing','positive','callback','range',[0 inf]);
elseif Y>=0
operator = CreateBasicOperator('decreasing','positive','callback');
operator = CreateBasicOperator('decreasing','positive','callback','range',[0 inf]);
else
% Base is negative, so the power has to be an integer
F = (integer(X));
Expand Down

0 comments on commit 49eb3cd

Please sign in to comment.