Skip to content

Commit

Permalink
fixed bug in func type simplification in integer polynomes
Browse files Browse the repository at this point in the history
  • Loading branch information
hhijazi committed Nov 9, 2023
1 parent 3ee3409 commit f1bae48
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions include/gravity/func.h
Original file line number Diff line number Diff line change
Expand Up @@ -8179,16 +8179,28 @@ namespace gravity {
auto pt = simplified->front();
if(pt.second==1){
_ftype = initial_ftype;
if(_pterms->size()==1 && !_qterms && !_expr)
_ftype = lin_;
this->insert(sign, coef, *pt.first);
return false;
}
if(pt.second==2){
_ftype = initial_ftype;
if(_pterms->size()==1 && !_expr)
_ftype = quad_;
this->insert(sign, coef, *pt.first, *pt.first);
return false;
}
}
if(simplified->size()==2 && simplified->front().second==1 && simplified->back().second==1){
_ftype = initial_ftype;
if(_pterms->size()==1 && !_expr)
_ftype = quad_;
this->insert(sign, coef, *simplified->front().first, *simplified->back().first);
return false;
}
newl = simplified;

newv = false;
break;
}
Expand Down

0 comments on commit f1bae48

Please sign in to comment.