|No such thing as a small change|
Re^8: All Calculations Done with One Variable Give Integer Answersby syphilis (Canon)
|on Sep 24, 2013 at 04:57 UTC||Need Help??|
Effectively, the math operations involving integers will be done using integer arithmetic - which is precisely as you have seen.
You can avoid this behaviour by simply not calling "use Math::BigInt ':constant';".
The only thing you then have to worry about is what happens when an integer value that is too big to fit into an IV comes along.
(perl -V:ivsize will tell you how many bytes your IV's can take up. It depends upon how perl was configured when it was being built and won't necessarily be the same on other builds of perl, even if they are the same version. Typically ivsize is either 4 or 8.)
If all of your integer values will fit into an IV, then there's little more to consider - just remove the offending line of code.