how can format this number “1.3e3” into normal number “1300” in phoenix or elixir
iex(1)> {x, _} = Float.parse("1.3e3")
{1.3e3, ""}
iex(2)> :erlang.float_to_binary(x, [:compact, decimals: 0])
"1300"
5 Likes