in reply to Re^8: All Calculations Done with One Variable Give Integer Answers
in thread All Calculations Done with One Variable Give Integer Answers

Thanks! That's a big help! I can also see if I can limit the scope to just the subroutines that need to use that. I still have to go through the entire module to see why I was using BigInt. I can't remember if it was one or two routines or a number of them.

But why does this still have an effect on any math done with that variable even when BigInt shouldn't apply?

  • Comment on Re^9: All Calculations Done with One Variable Give Integer Answers

Replies are listed 'Best First'.
Re^10: All Calculations Done with One Variable Give Integer Answers
by hdb (Monsignor) on Sep 24, 2013 at 06:43 UTC

    In the test code you have posted IntTest.pm, if you change your constants 1900 and 60 to 1900.0 and 60.0, your problem is fixed as well. This is because use Math::BigInt ':constant'; only applies to integer constants. This could be one way to limit the scope.

      Thanks! That's a simple fix I can make.