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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. very long numbers

very long numbers

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
6 Posts 6 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.
  • S Offline
    S Offline
    Selevercin
    wrote on last edited by
    #1

    Hi! Is there perhaps a header file that I could use that would allow me to use very long numbers in my calculations? Something that could take up to 20 digits would be nice, though more would be appreaciated. Thanks, Selevercin If you have a problem with my spelling, just remember that's not my fault. I (as well as everyone else who learned to spell after 1976) blame it on Robert A. Kolpek for U.S. Patent 4,136,395.

    M J A B 4 Replies Last reply
    0
    • S Selevercin

      Hi! Is there perhaps a header file that I could use that would allow me to use very long numbers in my calculations? Something that could take up to 20 digits would be nice, though more would be appreaciated. Thanks, Selevercin If you have a problem with my spelling, just remember that's not my fault. I (as well as everyone else who learned to spell after 1976) blame it on Robert A. Kolpek for U.S. Patent 4,136,395.

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      If you mean integers, you can use the MS extensions __int64 and unsigned __int64 --Mike-- Latest blog entry: *drool* (Alyson) [May 10] Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber "You have Erica on the brain" - Jon Sagara to me

      1 Reply Last reply
      0
      • S Selevercin

        Hi! Is there perhaps a header file that I could use that would allow me to use very long numbers in my calculations? Something that could take up to 20 digits would be nice, though more would be appreaciated. Thanks, Selevercin If you have a problem with my spelling, just remember that's not my fault. I (as well as everyone else who learned to spell after 1976) blame it on Robert A. Kolpek for U.S. Patent 4,136,395.

        J Offline
        J Offline
        Joaquin M Lopez Munoz
        wrote on last edited by
        #3

        There are some arbitrary precision numeric libraries on the net. Check for instance GMP[^]. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

        1 Reply Last reply
        0
        • S Selevercin

          Hi! Is there perhaps a header file that I could use that would allow me to use very long numbers in my calculations? Something that could take up to 20 digits would be nice, though more would be appreaciated. Thanks, Selevercin If you have a problem with my spelling, just remember that's not my fault. I (as well as everyone else who learned to spell after 1976) blame it on Robert A. Kolpek for U.S. Patent 4,136,395.

          A Offline
          A Offline
          algol
          wrote on last edited by
          #4

          Hi, You can use Decimal data type and Decimal arithmetic functions: VarDecAdd, VarDecMul etc. They are declared in oleauto.h. Decimal variables are stored as 12-byte signed integers and can store values from 0.0000000000000000000000000001 to 79,228,162,514,264,337,593,543,950,335 Alexander

          1 Reply Last reply
          0
          • S Selevercin

            Hi! Is there perhaps a header file that I could use that would allow me to use very long numbers in my calculations? Something that could take up to 20 digits would be nice, though more would be appreaciated. Thanks, Selevercin If you have a problem with my spelling, just remember that's not my fault. I (as well as everyone else who learned to spell after 1976) blame it on Robert A. Kolpek for U.S. Patent 4,136,395.

            B Offline
            B Offline
            basementman
            wrote on last edited by
            #5

            for floating point, look up long double in the doc. Range is +/–1.2E4932 with at least 19 digits of precision.

            A 1 Reply Last reply
            0
            • B basementman

              for floating point, look up long double in the doc. Range is +/–1.2E4932 with at least 19 digits of precision.

              A Offline
              A Offline
              Anna Jayne Metcalfe
              wrote on last edited by
              #6

              long double is there for backward compatibility only - it's now the same as double (15 digits of precision). Anna :rose: Homepage | My life in tears "Be yourself - not what others think you should be" - Marcia Graesch "Anna's just a sexy-looking lesbian tart" - A friend, trying to wind me up. It didn't work. Trouble with resource IDs? Try the Resource ID Organiser Visual C++ Add-In

              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