Page 1 of 1

integer limits and 1 minute rule

Posted: Mon Jun 07, 2010 6:40 pm
by karenhunt6116
Should my program still solve in 1 minute when the problem involves integers greater than the limit of my programming language?

Re: integer limits and 1 minute rule

Posted: Mon Jun 07, 2010 6:57 pm
by stijn263
Almost all problems are designed such that they can be solved with normal 64 bit integers. What programming language are you using and which problem are you trying to solve?

Re: integer limits and 1 minute rule

Posted: Mon Jun 07, 2010 8:12 pm
by karenhunt6116
Thank you for your response.

I am using VBA for excel. I am trying to solve problem 290.

Re: integer limits and 1 minute rule

Posted: Tue Jun 08, 2010 8:32 am
by stijn263
I don't know whether excel supports 64 bit, but in a language like that it's perfectly fine to follow the 15 minute rule :-)

Re: integer limits and 1 minute rule

Posted: Wed Jun 09, 2010 8:15 pm
by karenhunt6116
Thanks again.

I just checked with the IT Manager. It is most likely my computer is a 32-bit integer machine.

Re: integer limits and 1 minute rule

Posted: Thu Jun 10, 2010 2:30 am
by quilan
karenhunt6116 wrote:Thanks again.

I just checked with the IT Manager. It is most likely my computer is a 32-bit integer machine.
It's not that; many/most languages feature 64-bit data types even on 32-bit integer machines. VBA on the other hand, only really has the Currency type that's 64-bit and the Decimal type that's 96-bit. Problem is that manipulating Currency/Decimal objects is a wonky affair at best. I really loathe saying this, but if you're going to tackle a lot of the more recent problems (which usually require 64-bit math), you'd really really really really be doing yourself a favor by using a programming language designed for complicated processing (eg. Python, C++ for easy learning, something like ML or Haskell if you want to challenge yourself & learn new paradigms).

My 2c.