title: PHP multiplication decimals
body: <p>I have a strange bug when multiplying decimals.  When I multiply a decimal such as 2.1 by a number such as 2 (to get the product 4.2), PHP displays them identically, and, on comparison, shows them as equal.  But when I multiply 2.1 by 7 (14.7), though PHP still displays them as equal, upon comparison it declares the products unequal.</p>
  
  <p>Here's code illustrating the issue (note what PHP returns):</p>
  
  <pre><code>$num_1 = 4.2;
  $num_2 = 2.1*2;
  if($num_1 == $num_2){
    $eq = "Equal";
  }else{
    $eq = "Unequal";
  }
  echo $num_1.", ".$num_2.", ".$eq."&lt;br&gt;";
  // Returns  4.2, 4.2, Equal
  
  $num_1 = 14.7;
  $num_2 = 2.1*7;
  if($num_1 == $num_2){
    $eq = "Equal";
  }else{
    $eq = "Unequal";
  }
  echo $num_1.", ".$num_2.", ".$eq."&lt;br&gt;";
  // Returns  14.7, 14.7, Unequal
  </code></pre>
  
  <p>Thanks.</p>