Help for this page

Select Code to Download


  1. or download this
    printf("%.16e\n", $dollar1);
    printf("%.16e\n", $dollar2);
    
  2. or download this
    >perl -le"printf '%.16e', 0.1"
    1.0000000000000001e-001
                     ^
                     |
    
  3. or download this
    if (sprintf('%.2f', $dollar1) ne sprintf('%.2f', $dollar2)) {
      print "$dollar1 != $dollar2\n";
    }
    
  4. or download this
    if ($cents1 != $cents2)) {
      print $cents1/100, ' != ', $cents2/100, "\n";
    }