title: Scala - convert large or scientific numbers to Long
body: <p>Need to be able to convert 00000924843571390729101 or 2.71000000000000000E+02 to Long
  Expect 2.71000000000000000E+02 to become 271</p>
  
  <pre><code>funky results for this: 00000924843571390729101 became 924843571390729088
  val signNumber = "00000924843571390729101"
  
  val castnum = signNumber.toDouble.toLong.toString
  </code></pre>
  
  <p>First conversion below works for 2.71000000000000000E+02, 2nd one works for 00000924843571390729101 </p>
  
  <pre><code>val castnum = signNumber.toDouble.toLong.toString
  val castnum = signNumber.replaceAll("\\.[0-9]*$", "").toLong.toString
  </code></pre>
  
  <p>Do not want to keep any decimal places so not using java.math.BigDecimal</p>
  
  <p>Input string may come in as 9028456928343.0000 in which case want 9028456928343 as the Long</p>