{"action":"created","issue":{"url":"https://api.github.com/repos/tbeu/Modelica/issues/2056","repository_url":"https://api.github.com/repos/tbeu/Modelica","labels_url":"https://api.github.com/repos/tbeu/Modelica/issues/2056/labels{/name}","comments_url":"https://api.github.com/repos/tbeu/Modelica/issues/2056/comments","events_url":"https://api.github.com/repos/tbeu/Modelica/issues/2056/events","html_url":"https://github.com/tbeu/Modelica/issues/2056","id":184767874,"number":2056,"title":"Proper definition of Modelica.Constants.{eps,small}","user":{"login":"modelica-trac-importer","id":22202507,"avatar_url":"https://avatars.githubusercontent.com/u/22202507?v=3","gravatar_id":"","url":"https://api.github.com/users/modelica-trac-importer","html_url":"https://github.com/modelica-trac-importer","followers_url":"https://api.github.com/users/modelica-trac-importer/followers","following_url":"https://api.github.com/users/modelica-trac-importer/following{/other_user}","gists_url":"https://api.github.com/users/modelica-trac-importer/gists{/gist_id}","starred_url":"https://api.github.com/users/modelica-trac-importer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/modelica-trac-importer/subscriptions","organizations_url":"https://api.github.com/users/modelica-trac-importer/orgs","repos_url":"https://api.github.com/users/modelica-trac-importer/repos","events_url":"https://api.github.com/users/modelica-trac-importer/events{/privacy}","received_events_url":"https://api.github.com/users/modelica-trac-importer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tbeu/Modelica/labels/bug","name":"bug","color":"ee0701"},{"url":"https://api.github.com/repos/tbeu/Modelica/labels/Constants","name":"Constants","color":"0000aa"},{"url":"https://api.github.com/repos/tbeu/Modelica/labels/P:%20normal","name":"P: normal","color":"aa8888"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/tbeu/Modelica/milestones/1","html_url":"https://github.com/tbeu/Modelica/milestones/*undecided*","labels_url":"https://api.github.com/repos/tbeu/Modelica/milestones/1/labels","id":2087445,"number":1,"title":"*undecided*","description":"''Tickets that haven't yet been scheduled for a particular release.''","creator":{"login":"modelica-trac-importer","id":22202507,"avatar_url":"https://avatars.githubusercontent.com/u/22202507?v=3","gravatar_id":"","url":"https://api.github.com/users/modelica-trac-importer","html_url":"https://github.com/modelica-trac-importer","followers_url":"https://api.github.com/users/modelica-trac-importer/followers","following_url":"https://api.github.com/users/modelica-trac-importer/following{/other_user}","gists_url":"https://api.github.com/users/modelica-trac-importer/gists{/gist_id}","starred_url":"https://api.github.com/users/modelica-trac-importer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/modelica-trac-importer/subscriptions","organizations_url":"https://api.github.com/users/modelica-trac-importer/orgs","repos_url":"https://api.github.com/users/modelica-trac-importer/repos","events_url":"https://api.github.com/users/modelica-trac-importer/events{/privacy}","received_events_url":"https://api.github.com/users/modelica-trac-importer/received_events","type":"User","site_admin":false},"open_issues":84,"closed_issues":0,"state":"open","created_at":"2016-10-23T17:54:51Z","updated_at":"2016-10-24T07:30:18Z","due_on":"1969-12-31T00:00:00Z","closed_at":null},"comments":1,"created_at":"2016-10-24T07:30:18Z","updated_at":"2016-10-24T07:30:27Z","closed_at":null,"body":"**Reported by hansolsson on 6 Sep 2016 13:33 UTC**\nThe values are now given in ModelicaServices - but my problem isn't the values, but the definitions.\r\n\r\nIn Modelica.Constants it says: \r\n  final constant Real eps \"Biggest number such that 1.0 + eps = 1.0\";\r\n  final constant Real small \"Smallest number such that small and -small are representable on the machine\";\r\n  final constant Real inf \"Biggest Real number such that inf and -inf are representable on the machine\";\r\n--\r\nThe name \"inf\" not well-chosen - but apart from that according to the definitions we have on an normal intel-based computer:\r\ninf=1.7976931348623157E+308\r\neps =1.1102230246251565E-016\r\nsmall=4.94065645841247E-324 (denormalized number)\r\n\r\nCompare this with the C-standard:\r\n#define DBL_EPSILON     2.2204460492503131e-016 \r\n/* smallest such that 1.0+DBL_EPSILON != 1.0 */\r\n\r\n#define DBL_MIN         2.2250738585072014e-308 \r\n/* min positive value */\r\n\r\n(The actual C11-standard makes it clear that DBL_MIN is a normalized floating point number.)\r\n\r\nThe previous values of eps and small were conservative estimates such that 1+eps>1 and 1/small was defined. The impact of using eps such that 1+eps=1 or denormalized small is unknown.\r\n\r\nI would prefer to map this to DBL_MAX, DBL_EPS and DBL_MIN - and thus adapt the definitions so that this is true.\r\n\r\n\n\nMigrated-From: https://trac.modelica.org/Modelica/ticket/2056"},"comment":{"url":"https://api.github.com/repos/tbeu/Modelica/issues/comments/255667519","html_url":"https://github.com/tbeu/Modelica/issues/2056#issuecomment-255667519","issue_url":"https://api.github.com/repos/tbeu/Modelica/issues/2056","id":255667519,"user":{"login":"modelica-trac-importer","id":22202507,"avatar_url":"https://avatars.githubusercontent.com/u/22202507?v=3","gravatar_id":"","url":"https://api.github.com/users/modelica-trac-importer","html_url":"https://github.com/modelica-trac-importer","followers_url":"https://api.github.com/users/modelica-trac-importer/followers","following_url":"https://api.github.com/users/modelica-trac-importer/following{/other_user}","gists_url":"https://api.github.com/users/modelica-trac-importer/gists{/gist_id}","starred_url":"https://api.github.com/users/modelica-trac-importer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/modelica-trac-importer/subscriptions","organizations_url":"https://api.github.com/users/modelica-trac-importer/orgs","repos_url":"https://api.github.com/users/modelica-trac-importer/repos","events_url":"https://api.github.com/users/modelica-trac-importer/events{/privacy}","received_events_url":"https://api.github.com/users/modelica-trac-importer/received_events","type":"User","site_admin":false},"created_at":"2016-10-24T07:30:27Z","updated_at":"2016-10-24T07:30:27Z","body":"**Comment by hansolsson on 6 Sep 2016 13:40 UTC**\nIn C11:\r\nDBL_EPS is:\r\nthe difference between 1 and the least value greater than 1 that is representable in the given floating point type\r\n\r\nDBL_MIN is:\r\nminimum normalized positive floating-point number\r\n\r\nDBL_MAX is:\r\nmaximum representable finite floating-point number !"}}
{"actor":{"display_login":"modelica-trac-importer"}}