[erlang-questions] new float_to_list/2 BIF - critique wanted

Jachym Holecek <>
Mon May 4 13:44:10 CEST 2009


# Gleb Peregud 2009-05-03:
> Currently I'm concerned about [...] and the way of creating format
> string "%.NNe", where NN is precision. How can it be improved?

Using asterisk for precision:

  $ printf "%.*f\n" 3 33.33
  33.330
  $ printf "%.*f\n" 6 33.33
  33.330000

HTH,
	-- Jachym



More information about the erlang-questions mailing list