﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2037	Math expressions flattened incorrectly	Bill Janssen	probably noone	"The flattening code seems to be dropping terms from mathematical expressions.  If you take the model



{{{
model showBug

  encapsulated type OperatingModes = enumeration(M1, M2);
  parameter OperatingModes mode = OperatingModes.M1;
  parameter Real mode_amount = 1.0;

  parameter Real d = (if mode == OperatingModes.M2 then (10 + (1.0 - mode_amount) * 1.0e60) else Modelica.Constants.inf);

end showBug;
}}}

and flatten it with ""omc"", you get this:


{{{
% omc showBug.mo ModelicaServices Modelica
class showBug
  parameter Real mode_amount = 1.0;
  parameter Real d = if mode == showBug.OperatingModes.M2 then 1e+60 + -1e+60 * mode_amount else 1e+60;
  parameter enumeration(M1, M2) mode = showBug.OperatingModes.M1;
end showBug;
%
}}}

You see that the expression for ""d"" is incorrect."	discussion	closed	high	1.12.0	Frontend	trunk	worksforme		
