You get numbers that are very close to integers from $exp(\pi\sqrt{n})$, where $n$ is a
Heegner number. As Wikipedia mentions, Martin Gardner did an April Fool's prank using the value of the above expression for $n=163$. You can't calculate it properly using simple 64 bit floats, you need higher precision. It's ~262537412640768743.9999999999992500725972078