In addition to LanX's fine answer, see:

  1. numerous nodes in this list
  2. perldoc perlfaq4 at your console (subhead: "Why am I getting long decimals")
  3. What every computer scientist should know about floating point arithmetic
  4. Re: Floating point hell
  5.     ... and many more.

Here in the Monastery, Super Search (used to generate the first link in the list above) will help you answer many of your own questions.


In reply to Re: Integers sometimes turn into Reals after substraction by ww
in thread Integers sometimes turn into Reals after substraction by rduke15

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":