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

Off-by-one error with `==` involving index #52

Closed
richfitz opened this issue Oct 18, 2016 · 1 comment
Closed

Off-by-one error with `==` involving index #52

richfitz opened this issue Oct 18, 2016 · 1 comment
Projects
Milestone

Comments

@richfitz
Copy link
Member

@richfitz richfitz commented Oct 18, 2016

gen <- odin::odin({
  initial(a) <- 1
  deriv(a) <- 0
  x[] <- if (i == 1) 1 else 0
  dim(x) <- 4
})
gen()$contents()$x
# [1] 0 1 0 0

in the above it should be the first, not the second element. Solution is to apply the off-by-one correction to each side of == separately?

@richfitz richfitz modified the milestone: release Mar 14, 2017
@richfitz richfitz added this to To Do in development Jan 11, 2018
@richfitz
Copy link
Member Author

@richfitz richfitz commented Feb 27, 2019

Re-reported as #136 but fixed in #139

@richfitz richfitz mentioned this issue Mar 18, 2019
@richfitz richfitz closed this Apr 8, 2019
development automation moved this from To Do to Done Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
development
  
Done
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.