Ignore:
Timestamp:
Oct 10, 2019 2:42:38 PM (2 months ago)
Author:
Jonathan Kämpe
Message:

#5844 Merging refactoring to trunk

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/Compiler/ModelicaMiddleEnd/src/jastadd/structural/Symbolic.jrag

    r13636 r13720  
    217217    private static Boolean FEquation.nominalAllowsDivision(FExp factor, FVariable var, double tol) {
    218218        if (factor.variability().constantVariability()) {
    219             FExp nominal = factor.dynamicFExp(var.nominal());
    220             if (nominal.variability().constantVariability() &&
    221                     Math.abs(factor.ceval().realValue()) *
    222                     nominal.ceval().realValue() < tol) {
    223                 return false;
     219            FExp varNominalExp = factor.dynamicFExp(var.nominal());
     220            if (varNominalExp.variability().constantVariability()) {
     221                double factorNominal = Math.abs(factor.ceval().realValue());
     222                double varNominal    = varNominalExp.ceval().realValue();
     223                double totalNominal  = factorNominal * varNominal;
     224                if (totalNominal < tol) {
     225                    return false;
     226                }
    224227            }
    225228        }
Note: See TracChangeset for help on using the changeset viewer.