title: Hive cast string to floating decimal
body: <p>I am trying to cast a string field with a variable decimal to double. The problem I'm running into is that because the decimal is variable and can be any one of the following:</p>
  
  <pre><code>359.879999
  35.8799999
  3.59879999
  </code></pre>
  
  <p>(move the decimal wherever you want to...but the length of the field is always 9)</p>
  
  <p>I have tried to do:</p>
  
  <pre><code>cast(RECURR as float) as RECURR
  </code></pre>
  
  <p>but that is just returning:</p>
  
  <pre><code>359.880004882813
  </code></pre>
  
  <p>I have tried:</p>
  
  <pre><code>cast(RECURR as decimal) as RECURR
  </code></pre>
  
  <p>and that returns:</p>
  
  <pre><code>360
  </code></pre>