{"action":"created","issue":{"url":"https://api.github.com/repos/ldc-developers/phobos/issues/7","labels_url":"https://api.github.com/repos/ldc-developers/phobos/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/ldc-developers/phobos/issues/7/comments","events_url":"https://api.github.com/repos/ldc-developers/phobos/issues/7/events","html_url":"https://github.com/ldc-developers/phobos/pull/7","id":59554172,"number":7,"title":"fixes to std.math such that all unit tests pass on LDC 64bit windows.","user":{"login":"KevinBrogan","id":1428163,"avatar_url":"https://avatars.githubusercontent.com/u/1428163?v=3","gravatar_id":"","url":"https://api.github.com/users/KevinBrogan","html_url":"https://github.com/KevinBrogan","followers_url":"https://api.github.com/users/KevinBrogan/followers","following_url":"https://api.github.com/users/KevinBrogan/following{/other_user}","gists_url":"https://api.github.com/users/KevinBrogan/gists{/gist_id}","starred_url":"https://api.github.com/users/KevinBrogan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KevinBrogan/subscriptions","organizations_url":"https://api.github.com/users/KevinBrogan/orgs","repos_url":"https://api.github.com/users/KevinBrogan/repos","events_url":"https://api.github.com/users/KevinBrogan/events{/privacy}","received_events_url":"https://api.github.com/users/KevinBrogan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2015-03-02T21:28:44Z","updated_at":"2015-05-17T21:43:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ldc-developers/phobos/pulls/7","html_url":"https://github.com/ldc-developers/phobos/pull/7","diff_url":"https://github.com/ldc-developers/phobos/pull/7.diff","patch_url":"https://github.com/ldc-developers/phobos/pull/7.patch"},"body":"fixes to std.math such that all unit tests pass on LDC 64bit windows."},"comment":{"url":"https://api.github.com/repos/ldc-developers/phobos/issues/comments/102861673","html_url":"https://github.com/ldc-developers/phobos/pull/7#issuecomment-102861673","issue_url":"https://api.github.com/repos/ldc-developers/phobos/issues/7","id":102861673,"user":{"login":"smolt","id":919827,"avatar_url":"https://avatars.githubusercontent.com/u/919827?v=3","gravatar_id":"","url":"https://api.github.com/users/smolt","html_url":"https://github.com/smolt","followers_url":"https://api.github.com/users/smolt/followers","following_url":"https://api.github.com/users/smolt/following{/other_user}","gists_url":"https://api.github.com/users/smolt/gists{/gist_id}","starred_url":"https://api.github.com/users/smolt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smolt/subscriptions","organizations_url":"https://api.github.com/users/smolt/orgs","repos_url":"https://api.github.com/users/smolt/repos","events_url":"https://api.github.com/users/smolt/events{/privacy}","received_events_url":"https://api.github.com/users/smolt/received_events","type":"User","site_admin":false},"created_at":"2015-05-17T21:43:42Z","updated_at":"2015-05-17T21:43:42Z","body":"Thanks! - All my std.math unittests pass for iOS now.  The `sqrt()` test for negative args did wonders for the `acosh()` unittest in -O builds.\r\n\r\nOut of curiosity, I had to study why `acosh()` worked in iOS debug builds.  In debug builds, the optimizer doesn't get a chance to lower `llvm_sqrt()` intrinsic llvm.sqrt.f64 so ARM `vsqrt.f64` instruction is generated, correctly producing NaN for negative args.  With optimizer turned on, llvm.sqrt.f64 is lowered to LLVM `undef` and that seems to be treated like an uninitialized variable.  Optimized assembly code for `llvm_sqrt()` uses whatever value is already in a floating point register leading to funny (undefined) results.\r\n\r\nI see David documented this behavior in druntime ldc/intrinsics.di back in 2012."}}