stan-dev / stan-dev/stan

deprecate int_step

Open
#2,433 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug documentation good first issue
Dominant language
C++
Stars
2.8k
Forks
388
Avg merge
2d 17h
Merged PRs (30d)
15

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the int_step(x) and step(x) entry points and any tests covering their behavior at zero. Confirm the existing semantics, then trace how built-in functions are deprecated and how replacement suggestions are reported. Done means int_step is deprecated without changing its behavior, with guidance to use the specified boolean expression.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.