Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Very Long Integers

Very Long Integers

Scheduled Pinned Locked Moved Visual Basic
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    The ANZAC
    wrote on last edited by
    #1

    i need a way to deal with a number that is 320 digits long. Whats more, it needs to be an integer, not a decimal. how would i go about working with such large numbers, dividing, adding subtracting, etc. I have tried Long, Decimal and Double but none of them are long enough.

    Posted by The ANZAC

    C A 2 Replies Last reply
    0
    • T The ANZAC

      i need a way to deal with a number that is 320 digits long. Whats more, it needs to be an integer, not a decimal. how would i go about working with such large numbers, dividing, adding subtracting, etc. I have tried Long, Decimal and Double but none of them are long enough.

      Posted by The ANZAC

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      There is no type that handles numbers remotely that long. You'd have to write your own class, to handle a type like this, or look for one online. Do you need all 320 digits to be accurate ? If you only need accuracy to a certain number of digits, you can always assume the rest are 0s.

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

      1 Reply Last reply
      0
      • T The ANZAC

        i need a way to deal with a number that is 320 digits long. Whats more, it needs to be an integer, not a decimal. how would i go about working with such large numbers, dividing, adding subtracting, etc. I have tried Long, Decimal and Double but none of them are long enough.

        Posted by The ANZAC

        A Offline
        A Offline
        arcticbrew
        wrote on last edited by
        #3

        Karens Power Tools has a free calculator with source code that handles numbers with thousands of digits http://www.karenware.com/powertools/ptcalc.asp

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups