so basically I'm trying to generate a list of file names. What I have done so far is the following:

total = Table[StringTemplate["/home/Projekt/output/b12_t`t`_a`a`.csv"]@<|
"t" -> 0.01 k, "a" -> 0.01 l|>, {k, 1, 21}, {l, 0, 50}]

Then I realized that, the mantissa ended with 0s are not displayed in full decimal place. For example: instead of showing


it shows


I know that normally we can use Precision[x] to print the exact number but in this case is does no help. Much appreciated if someone can give me a hint.


1 Answer 1

     "`t`", InsertionFunction -> (ToString@NumberForm[#, {1, 2}] &)
  ]@<|"t" -> 0.01 k|>,
  {k, 0, 10}
{"0.00", "0.01", "0.02", "0.03", "0.04", "0.05", "0.06", "0.07", "0.08", "0.09", "0.10"}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.