<?xml version="1.0" encoding='utf-8'?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="Type conversion - Page 13 - Wikipedia">
<p>
<a accesskey="1" href="page.php?w=Type_conversion&amp;p=12">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Type_conversion&amp;p=14">3.Next</a>
</p>
<p>precision, and ints as at least 32 bits, this code will give this peculiar print-out:</p>

<p> The integer is: 16777217 The float is: 16777216.000000 Their equality: 1</p>

<p>Note that 1 represents equality in the last line above. This odd behavior is caused by an implicit conversion of  to float when it is compared with . The conversion causes loss of precision, which makes the values equal before the comparison.</p>

<p>Important takeaways:</p>

<p>
#  to  causes <a href="page.php?w=truncation">truncation</a>, i.e., removal of the fractional</p><p>
<a accesskey="1" href="page.php?w=Type_conversion&amp;p=12">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Type_conversion&amp;p=14">3.Next</a>
</p>

<do type="prev" label="Search">
        <go href="search.wml"/>
</do>

</card>
</wml>
