title: How To Format A Number to Precision in Elixir?
body: <p>What is the most direct, &amp; efficient way to do this in Elixir?</p>
  
  <pre><code>Starting number: 123.101
  
  Ending number: 123.101000 # Adding 3 digits to the precision of a float.
  
  Starting number: 123
  
  Ending number: 123.000 # Adding 3 digits to the precision of an integer.
  
  Starting number: 123.101
  
  Ending number: 123.1 # removing precision
  
  Starting number: 123.000
  
  Ending number: 123 # removing precision
  </code></pre>