stan-dev / cmdstan

CmdStan, the command line interface to Stan
https://mc-stan.org/users/interfaces/cmdstan
BSD 3-Clause "New" or "Revised" License
212 stars 93 forks source link

[BUG] Argument printing in output no longer shows sufficient digits #1242

Closed andrjohns closed 8 months ago

andrjohns commented 8 months ago

Summary

The printing of input arguments in the output now seems to be truncated to a fixed number of digits (possibly rounded as well):

Under cmdstan 2.33.1:

andrew@Andrews-MacBook-Air bernoulli % ./bernoulli optimize algorithm=lbfgs tol_obj=1e-11 data file=bernoulli.data.json
method = optimize
  optimize
    algorithm = lbfgs (Default)
      lbfgs
        init_alpha = 0.001 (Default)
        tol_obj = 9.9999999999999994e-12

Under cmdstan 2.34:

andrew@Andrews-MacBook-Air bernoulli % ./bernoulli optimize algorithm=lbfgs tol_obj=1e-11 data file=bernoulli.data.json                 
method = optimize
  optimize
    algorithm = lbfgs (Default)
      lbfgs
        init_alpha = 0.001000 (Default)
        tol_obj = 0.000000

Current Version:

v2.34.0

WardBrian commented 8 months ago

Seems related to https://github.com/stan-dev/cmdstan/issues/1214. My guess is the fix will be similar, but in https://github.com/stan-dev/cmdstan/blob/develop/src/cmdstan/arguments/singleton_argument.hpp

Do you have time today to put in a PR?