alashworth / test-issue-import

0 stars 0 forks source link

deprecate int_step #173

Open alashworth opened 5 years ago

alashworth commented 5 years ago

Issue by bob-carpenter Thursday Nov 09, 2017 at 20:09 GMT Originally opened as https://github.com/stan-dev/stan/issues/2433


Summary:

int_step(x) and step(x) return different values for 0.

The version of step(x) matches the BUGS definition and the standard definition of the Heaviside step function. Therefore, it should not be changed.

Changing int_step()'s behavior would be confusing, so instead it should be deprecated and replaced with a suggestion to replace existing uses of int_step(n) with the boolean expression (n >= 0), which evaluates to 1 if n >= 0 and 0 otherwise.

Current Version:

v2.17.0

alashworth commented 5 years ago

Comment by roualdes Tuesday Mar 27, 2018 at 23:29 GMT


I just submit 2 pull requests, one in https://github.com/stan-dev/stan/pull/2501, which matches tests across int_step.stan and step.stan and one in https://github.com/stan-dev/math/pull/805, in which the step function definitions were changed and tests were updated. Review when convenient, please. Thanks.

alashworth commented 5 years ago

Comment by bob-carpenter Friday Mar 30, 2018 at 15:52 GMT


Thanks. I'll get to these ASAP.