If you want to check, that the value is close to integer, you can try this:
<?php
$tolerance = 1E-6;
$result = 8.1E-12 + 2;
if (($result % 1) < $tolerance)
{
print "$result is close to integer ". (int) $result;
}
Prints:
2.0000000000081 is close to integer 2