Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Limits on int's in c++  (Read 3455 times)

0 Members and 1 Guest are viewing this topic.

Khasiar

    Topic Starter


    Intermediate

    Limits on int's in c++
    « on: May 17, 2011, 09:56:27 PM »
    Hey,

    I am trying to store permutations (huge) in an int and it limits itself so i was hoping there was another way of doing this.

    for instance if i want to store a value > 4,294,967,295 in an unsigned int it doesnt work when going past that value

    so i moved up to unsigned _int64 which allows 18,446,744,073,709,551,615 but as you may know with permutations you can really have limits if your trying to reach a perfect program.

    for those that dont know permutations = pow(n, r) and when your working with things like 13 to the power of 300 = error on all calculators + comps ive tried it on.

    so pretty much im trying to store a value in an int that has an unlimited size, any ideas?

    Thanks in advance

    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: Limits on int's in c++
    « Reply #1 on: May 17, 2011, 09:59:13 PM »
    I was trying to dereference Null Pointers before it was cool.

    Khasiar

      Topic Starter


      Intermediate

      Re: Limits on int's in c++
      « Reply #2 on: May 18, 2011, 07:32:40 PM »
      OMG, BC this is excatly what i was looking for! thank you soooo much :)