Skip to main content
1 of 3
Stitch
  • 4.2k
  • 1
  • 13
  • 28

As an option

Interpretation[{x = RandomReal[]}, Button[ToString@SetPrecision[x, 6], x = RandomReal[]], N[x, 6]]

Or

Interpretation[{x = RandomReal[]}, Button[N@Round[x, 1*^-6], x = RandomReal[]], N@Round[x, 1*^-6]]
Stitch
  • 4.2k
  • 1
  • 13
  • 28