Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecate int_step #2433

Open
bob-carpenter opened this issue Nov 9, 2017 · 2 comments
Open

deprecate int_step #2433

bob-carpenter opened this issue Nov 9, 2017 · 2 comments

Comments

@bob-carpenter
Copy link
Contributor

bob-carpenter commented Nov 9, 2017

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

@roualdes
Copy link
Collaborator

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

@bob-carpenter
Copy link
Contributor Author

bob-carpenter commented Mar 30, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants