Changeset 14243


Ignore:
Timestamp:
Dec 2, 2019 10:52:12 AM (10 days ago)
Author:
Jesper Mattsson
Message:

Reverted release branch merge. (#5881)

Location:
branches/2.16.x
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/2.16.x

    • Property svn:mergeinfo changed
      /trunkreverse-merged: 14229
  • branches/2.16.x/CHANGELOG.txt

    r14239 r14243  
    33Improved handling of iteration variables in c-code generation for
    44multiple loops within a single function.
    5 
    6 ; Fixed ; Minor ; Compiler ; #5881
    7 Fixed bug where constant evaluation of external functions could result
    8 in loss of precision when returning values smaller than 1.
    95
    106; Change ; Minor ; Compiler ; #5883
  • branches/2.16.x/Python/src/tests_jmodelica/files/Modelica/ExtFunctionTests.mo

    r14230 r14243  
    407407      end fRealScalar;
    408408     
    409       function fRealScalarSmall
    410         input  Real x_in;
    411         output Real x_out;
    412       external "C" annotation(
    413         Library="externalFunctionsC",
    414         Include="#include \"externalFunctionsC.h\"");
    415       end fRealScalarSmall;
    416      
    417409      function fRealArray
    418410        input  Real[2] x_in;
     
    432424
    433425      constant Real    xScalar        = fRealScalar(3);
    434       constant Real    xScalarSmall   = fRealScalarSmall(1.234546789012345);
    435426      constant Real[2] xArray         = fRealArray({4,5});
    436427      constant Real[2] xArrayUnknown  = fRealArrayUnknown({6,7});
  • branches/2.16.x/Python/src/tests_jmodelica/files/Modelica/Resources/Include/externalFunctionsC.h

    r14230 r14243  
    55
    66double fRealScalar(double in);
    7 double fRealScalarSmall(double in);
    87int fIntegerScalar(int in);
    98int fEnumScalar(int in);
  • branches/2.16.x/Python/src/tests_jmodelica/files/Modelica/Resources/src/externalFunctionsC.c

    r14230 r14243  
    99    return in*3.14;
    1010}
    11 
    12 
    13 double fRealScalarSmall(double in)
    14 {
    15     return in / 1.0e6;
    16 }
    17 
    1811
    1912void fRealArray(double* in, size_t in_d1, double* out, size_t out_d1)
  • branches/2.16.x/Python/src/tests_jmodelica/general/test_extfunctions.py

    r14230 r14243  
    599599        res = model.simulate()
    600600        nose.tools.assert_equals(res.final('xScalar'), 3*3.14)
    601         nose.tools.assert_equals(res.final('xScalarSmall'), 1.234546789012345 / 1e6)
    602601        nose.tools.assert_equals(res.final('xArray[2]'), 4)
    603602        nose.tools.assert_equals(res.final('xArrayUnknown[2]'), 6)
     
    770769          for j in range(1,4):
    771770            x = 'out[{0},{1}]'.format(i,j)
    772             nose.tools.assert_equals(resSim.final(x), resConst.final(x))
     771            nose.tools.assert_almost_equals(resSim.final(x), resConst.final(x), places=13)
    773772        nose.tools.assert_equals(resSim.final('a'), resConst.final('a'))
    774773        nose.tools.assert_equals(resSim.final('b'), resConst.final('b'))
  • branches/2.16.x/RuntimeLibrary/src

  • branches/2.16.x/RuntimeLibrary/src/evaluator/jmi_evaluator_util.h

    r14230 r14243  
    6363
    6464/* Format specifier when printing jmi_real_t */
    65 #define JMCEVAL_realFormat "%.17e"
     65#define JMCEVAL_realFormat "%.16f"
    6666
    6767/* Parses ND dimensions into dimension buffer d*/
Note: See TracChangeset for help on using the changeset viewer.