But 4/25 isn't a number which can be accurately represented in a binary system and rounding errors come into play.
See also Humans have too many fingers
To elaborate further
(4*1000)/25 is an integer but 1000*(4/25) is a float with a very tiny error in the last bits of the mantissa.
Perl will still print this float like an integer because the error is too small.
But after the subtraction the leading zeros in the mantissa will cause a left shift (with adjustment of the exponent).
This means the error shifts out of Perl's tolerance margin and is printed as (decimal) fraction.
In reply to Re: Integers sometimes turn into Reals after substraction
in thread Integers sometimes turn into Reals after substraction by rduke15
<code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>