title: Ada: Fraction part of Float/Fixed as Integer
body: <p>In Ada, I would like to separate out a number like 12.345 out into two distinct integers:</p>
  
  <pre><code>whole : integer := 12;
  fraction : integer := 345;
  </code></pre>
  
  <p>The Whole part is easy, but I don't know how to get the Fraction part.</p>
  
  <p>My starting idea is:</p>
  
  <pre><code>12.345 mod Integer(12.345)
  </code></pre>
  
  <p>which will return 0.345, and could be multiplied by the inverse magnitude (in this case ×1000), but I don't know how to count the amount of digits either.</p>