{"action":"created","issue":{"url":"https://api.github.com/repos/stan-dev/math/issues/150","labels_url":"https://api.github.com/repos/stan-dev/math/issues/150/labels{/name}","comments_url":"https://api.github.com/repos/stan-dev/math/issues/150/comments","events_url":"https://api.github.com/repos/stan-dev/math/issues/150/events","html_url":"https://github.com/stan-dev/math/issues/150","id":102448085,"number":150,"title":"Wiener_log: raise exception for tau >= y","user":{"login":"randommm","id":4267674,"avatar_url":"https://avatars.githubusercontent.com/u/4267674?v=3","gravatar_id":"","url":"https://api.github.com/users/randommm","html_url":"https://github.com/randommm","followers_url":"https://api.github.com/users/randommm/followers","following_url":"https://api.github.com/users/randommm/following{/other_user}","gists_url":"https://api.github.com/users/randommm/gists{/gist_id}","starred_url":"https://api.github.com/users/randommm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randommm/subscriptions","organizations_url":"https://api.github.com/users/randommm/orgs","repos_url":"https://api.github.com/users/randommm/repos","events_url":"https://api.github.com/users/randommm/events{/privacy}","received_events_url":"https://api.github.com/users/randommm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"randommm","id":4267674,"avatar_url":"https://avatars.githubusercontent.com/u/4267674?v=3","gravatar_id":"","url":"https://api.github.com/users/randommm","html_url":"https://github.com/randommm","followers_url":"https://api.github.com/users/randommm/followers","following_url":"https://api.github.com/users/randommm/following{/other_user}","gists_url":"https://api.github.com/users/randommm/gists{/gist_id}","starred_url":"https://api.github.com/users/randommm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randommm/subscriptions","organizations_url":"https://api.github.com/users/randommm/orgs","repos_url":"https://api.github.com/users/randommm/repos","events_url":"https://api.github.com/users/randommm/events{/privacy}","received_events_url":"https://api.github.com/users/randommm/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-08-21T19:31:50Z","updated_at":"2015-08-21T20:47:33Z","closed_at":null,"body":"@bob-carpenter commented 3 days ago (at https://github.com/stan-dev/stan/pull/1578):\r\n\r\n\"Our general convention for probabilty functions is to raise an\r\nexception.  So rather than the comparisons, this should use\r\nanother check function.\r\n\r\nAnd there's never any reason to set a value and then immediately\r\nreturn it.  It could be written as\r\n\r\n  return stan::math::negative_infinity();\r\n\r\nBut I really think it should be replaced with something that\r\nthrows an informative exception --- the idea is to trap errors\r\nas early as possible and let the user know where they arise.\r\n\r\n- Bob\""},"comment":{"url":"https://api.github.com/repos/stan-dev/math/issues/comments/133558716","html_url":"https://github.com/stan-dev/math/issues/150#issuecomment-133558716","issue_url":"https://api.github.com/repos/stan-dev/math/issues/150","id":133558716,"user":{"login":"randommm","id":4267674,"avatar_url":"https://avatars.githubusercontent.com/u/4267674?v=3","gravatar_id":"","url":"https://api.github.com/users/randommm","html_url":"https://github.com/randommm","followers_url":"https://api.github.com/users/randommm/followers","following_url":"https://api.github.com/users/randommm/following{/other_user}","gists_url":"https://api.github.com/users/randommm/gists{/gist_id}","starred_url":"https://api.github.com/users/randommm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randommm/subscriptions","organizations_url":"https://api.github.com/users/randommm/orgs","repos_url":"https://api.github.com/users/randommm/repos","events_url":"https://api.github.com/users/randommm/events{/privacy}","received_events_url":"https://api.github.com/users/randommm/received_events","type":"User","site_admin":false},"created_at":"2015-08-21T20:47:33Z","updated_at":"2015-08-21T20:47:33Z","body":"Something strange is happening: the test `ValidValues` for branch https://github.com/stan-dev/math/compare/feature/issue-150-raise-exception-for-tau-greater-than-or-equal-to-y won't pass:\r\n\r\n      [ RUN      ] AgradDistributionWiener_v_95/AgradDistributionTestFixture/0.ValidValues\r\n      ./test/prob/test_fixture_distr.hpp:110: Failure\r\n      Expected: ({ lp = TestClass.template log_prob <true,T0,T1,T2,T3,T4,T5> (p0,p1,p2,p3,p4,p5); }) doesn't throw an exception.\r\n        Actual: it throws.\r\n      Valid parameters failed at index: 0 -- (1.1000000000000001, 2.1000000000000001, 0.29999999999999999, 0.55000000000000004, 0.40000000000000002)\r\n      ./test/prob/test_fixture_distr.hpp:110: Failure\r\n      Expected: ({ lp = TestClass.template log_prob <true,T0,T1,T2,T3,T4,T5> (p0,p1,p2,p3,p4,p5); }) doesn't throw an exception.\r\n        Actual: it throws.\r\n      Valid parameters failed at index: 1 -- (2.1000000000000001, 4.0999999999999996, 1.8999999999999999, 0.050000000000000003, 0.10000000000000001)\r\n      ./test/prob/test_fixture_distr.hpp:110: Failure\r\n      Expected: ({ lp = TestClass.template log_prob <true,T0,T1,T2,T3,T4,T5> (p0,p1,p2,p3,p4,p5); }) doesn't throw an exception.\r\n        Actual: it throws.\r\n      Valid parameters failed at index: 2 -- (0.10000000000000001, 10.1, 0.050000000000000003, 0.94999999999999996, 0.5)\r\n      ./test/prob/test_fixture_distr.hpp:110: Failure\r\n      Expected: ({ lp = TestClass.template log_prob <true,T0,T1,T2,T3,T4,T5> (p0,p1,p2,p3,p4,p5); }) doesn't throw an exception.\r\n        Actual: it throws.\r\n      Valid parameters failed at index: 4 -- (0.51000000000000001, 1.1000000000000001, 0.29999999999999999, 0.20000000000000001, 10.5)\r\n\r\n\r\nBut when I run \r\n\r\n      parameters {\r\n        real<lower=.3001> a;\r\n      }\r\n      model {\r\n        a ~ wiener(2.1, .3, .55, .4);\r\n        1.1 ~ wiener(2.1, .3, .55, .4);\r\n        increment_log_prob(wiener_log(1.1, 2.1, .3, .55, .4));\r\n      }\r\n\r\nin CmdStan, no error message is shown at all. Any ideas?"}}