Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Stata/Problems

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

Report your problems with Stata on this page : Round Sometimes the round() function does not perform its job. For instance, in this case round does not change anything to the value of the local toto. . local toto = 9.950000000000001 . di "`toto'" 9.950000000000001 . local toto2 = round(`toto',.01) . di "`toto2'" 9.950000000000001 The temporary solution to this problem is to treat toto as a string and to use regexm to round it : . local toto = 9.950000000000001 . di "`toto'" 9.950000000000001 . if regexm("`toto'","([0-9].[0-9][0-9])"){ . local toto = regexs(1) . di "`toto'" 9.95 . }