Good question. They should definitely give the same inferences for the parameters (within monte carlo error), but I also would have thought you’d get exactly the same values if, like you say, you also used the same inits and same seed. But I did a little experiment and I also found slight differences, so I think I’m also confused about something!

Maybe @bbbales2 or @rok_cesnovar knows what I’m missing here. In my example below, shouldn’t I get the exact same values of `x`

or is that a faulty assumption?

```
# Fit two simple models, only differing on whether
# sampling notation or target+= is used
library("cmdstanr")
file1 <- write_stan_tempfile(
"
parameters {
real x;
}
model {
x ~ normal(1, 1);
}
"
)
file2 <- write_stan_tempfile(
"
parameters {
real x;
}
model {
target += normal_lpdf(x | 1, 1);
}
"
)
mod1 <- cmdstan_model(file1)
mod2 <- cmdstan_model(file2)
# initialize to 0 and use same seed
fit1 <- mod1$sample(init = 0, seed = 123)
fit2 <- mod2$sample(init = 0, seed = 123)
```

I expect different values for `lp__`

but I also get slightly different results for `x`

, certainly within monte carlo error, but it still surprised me:

```
> fit1$print("x", "mean", "sd")
variable mean sd
x 1.01 0.99
> fit2$print("x", "mean", "sd")
variable mean sd
x 1.00 1.01
```