But I want “1.01e3”. Is this possible? I tried to combine Float.round and Float.to_string but this does not necessarily give scientific notation. Thank you.
I don’t think that this is possible. If you check the documentation for :erlang.float_to_list/2 you can see what the options give you. An alternative could be to use Erlang formatted output but I can’t remember how the options work.
Thank you. I will then just stick to the longer scientific notation. In case one really needs it one could just post-process the string but I think I don’t really need the shorter notation, it was just bothering me a bit.