{"action":"created","issue":{"url":"https://api.github.com/repos/ceylon/ceylon.language/issues/742","labels_url":"https://api.github.com/repos/ceylon/ceylon.language/issues/742/labels{/name}","comments_url":"https://api.github.com/repos/ceylon/ceylon.language/issues/742/comments","events_url":"https://api.github.com/repos/ceylon/ceylon.language/issues/742/events","html_url":"https://github.com/ceylon/ceylon.language/issues/742","id":104651965,"number":742,"title":"Add property to `Float` to distinguish `-0.0` from `+0.0`","user":{"login":"FroMage","id":179265,"avatar_url":"https://avatars.githubusercontent.com/u/179265?v=3","gravatar_id":"","url":"https://api.github.com/users/FroMage","html_url":"https://github.com/FroMage","followers_url":"https://api.github.com/users/FroMage/followers","following_url":"https://api.github.com/users/FroMage/following{/other_user}","gists_url":"https://api.github.com/users/FroMage/gists{/gist_id}","starred_url":"https://api.github.com/users/FroMage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FroMage/subscriptions","organizations_url":"https://api.github.com/users/FroMage/orgs","repos_url":"https://api.github.com/users/FroMage/repos","events_url":"https://api.github.com/users/FroMage/events{/privacy}","received_events_url":"https://api.github.com/users/FroMage/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ceylon/ceylon.language/labels/FEATURE","name":"FEATURE","color":"02e10c"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/ceylon/ceylon.language/milestones/10","html_url":"https://github.com/ceylon/ceylon.language/milestones/1.2","labels_url":"https://api.github.com/repos/ceylon/ceylon.language/milestones/10/labels","id":807571,"number":10,"title":"1.2","description":"","creator":{"login":"gavinking","id":579974,"avatar_url":"https://avatars.githubusercontent.com/u/579974?v=3","gravatar_id":"","url":"https://api.github.com/users/gavinking","html_url":"https://github.com/gavinking","followers_url":"https://api.github.com/users/gavinking/followers","following_url":"https://api.github.com/users/gavinking/following{/other_user}","gists_url":"https://api.github.com/users/gavinking/gists{/gist_id}","starred_url":"https://api.github.com/users/gavinking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gavinking/subscriptions","organizations_url":"https://api.github.com/users/gavinking/orgs","repos_url":"https://api.github.com/users/gavinking/repos","events_url":"https://api.github.com/users/gavinking/events{/privacy}","received_events_url":"https://api.github.com/users/gavinking/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":120,"state":"open","created_at":"2014-09-30T00:35:13Z","updated_at":"2015-09-03T09:07:23Z","due_on":"2014-10-28T23:00:00Z","closed_at":null},"comments":6,"created_at":"2015-09-03T09:07:23Z","updated_at":"2015-09-03T09:21:51Z","closed_at":null,"body":"As noted in #741, sometimes we have to test things and make sure that we get a `-0.0` or a `+0.0` and since they are both `==` there's no way for us to check that they are the right zero, short of performing some formula. I think we should add something like `Boolean positiveZero` and `Boolean negativeZero` to `Float`.\r\n\r\nOK?"},"comment":{"url":"https://api.github.com/repos/ceylon/ceylon.language/issues/comments/137389187","html_url":"https://github.com/ceylon/ceylon.language/issues/742#issuecomment-137389187","issue_url":"https://api.github.com/repos/ceylon/ceylon.language/issues/742","id":137389187,"user":{"login":"FroMage","id":179265,"avatar_url":"https://avatars.githubusercontent.com/u/179265?v=3","gravatar_id":"","url":"https://api.github.com/users/FroMage","html_url":"https://github.com/FroMage","followers_url":"https://api.github.com/users/FroMage/followers","following_url":"https://api.github.com/users/FroMage/following{/other_user}","gists_url":"https://api.github.com/users/FroMage/gists{/gist_id}","starred_url":"https://api.github.com/users/FroMage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FroMage/subscriptions","organizations_url":"https://api.github.com/users/FroMage/orgs","repos_url":"https://api.github.com/users/FroMage/repos","events_url":"https://api.github.com/users/FroMage/events{/privacy}","received_events_url":"https://api.github.com/users/FroMage/received_events","type":"User","site_admin":false},"created_at":"2015-09-03T09:21:51Z","updated_at":"2015-09-03T09:21:51Z","body":"Not exposing it only means people have to write the following _every time_ they care:\r\n\r\n```ceylon\r\n    Boolean positiveZero(Float num){\r\n        return num == 0.0 && (1 / num) > 0.0;\r\n    }\r\n    Boolean negativeZero(Float num){\r\n        return num == 0.0 && (1 / num) < 0.0;\r\n    }\r\n```\r\n\r\nI don't see why we have to make it hard for them, even if they are few."}}