Getting non-exponential version of float in Elixir?
1 answer
Typically, if you want precise control over the output, you need to use the underlying erlang library io:format
.
It is somewhat unique, although it more or less works like printf or sprintf in other languages. If you are more familiar with these functions, there is an Elixir library that translates for you.
https://github.com/parroty/exprintf
The Float.to_string function is what is used to print floats, as far as I can tell, there is no way to override the format used.
+1
source to share