Skip to content

Commit

Permalink
Give a proper definition of machine constants.
Browse files Browse the repository at this point in the history
They are compatible with C, and usable.
Closes modelica#2056
  • Loading branch information
HansOlsson committed Sep 30, 2022
1 parent f325ed3 commit 879247e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Modelica/Constants.mo
Expand Up @@ -16,11 +16,11 @@ package Constants

// Machine dependent constants
final constant Real eps=ModelicaServices.Machine.eps
"Biggest number such that 1.0 + eps = 1.0";
"The difference between 1 and the least value greater than 1 that is representable in the given floating point type";
final constant Real small=ModelicaServices.Machine.small
"Smallest number such that small and -small are representable on the machine";
"Minimum normalized positive floating-point number";
final constant Real inf=ModelicaServices.Machine.inf
"Biggest Real number such that inf and -inf are representable on the machine";
"Maximum representable finite floating-point number";
final constant Integer Integer_inf=ModelicaServices.Machine.Integer_inf
"Biggest Integer number such that Integer_inf and -Integer_inf are representable on the machine";

Expand Down

0 comments on commit 879247e

Please sign in to comment.