Convert string to float without round off java
<p>I want to convert longitude and latitude that I get as a string from my database. The string is correct, and when i try to convert it into double, it is also correct. However when i am convert the double or the string value (i have tried both) into a float value, the last decimal gets round off. </p>

<p>The value of the string or double is 59.858139
The convertion to float is 59.85814</p>

<p>I've tried everything, and this is one desperate example :)</p>

<pre><code>private float ConvertToFloat(double d)
{
    float f = 00.000000f;
    f = (float) d;
    return f;
}
</code></pre>
