Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Limit tolerance for zero crossings in Cpp runtime
The upper limit 1e-6 is the old and current default value (formerly fix in CodegenCpp.tpl, now defined in SystemDefaultImplementation.cpp). The lower limit DBL_EPSILON was justified with two examples: `Modelica.Electrical.Analog.Examples.NandGate` fails without limit if the output step size gets reduced to 4e-11 in daily tests (from model setting 2e-10). A larger lower limit, like 10*DBL_EPSILON, would give a spike in `Modelica.Electrical.Spice3.Examples.Inverter` (mp.S.v at 1e-13s). Additionally remove a misplaced min define in `Core/Math/Functions.cpp`. See `Core/Modelica.h` and `Core/Math/Constants.h`: #undef min using std::min;
- Loading branch information