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. C / C++ / MFC
  4. 128 bit Data Type

128 bit Data Type

Scheduled Pinned Locked Moved C / C++ / MFC
com
5 Posts 5 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.
  • A Offline
    A Offline
    abc876
    wrote on last edited by
    #1

    I want to perform some calculation which require extremely large floating point values i.e. > 1.7e308. I want some class for handling such large calculations. 128Bit or more. Any tips would be welcomed. Thanks! Muhammad Shoaib Khan http://geocities.com/lansolution

    G B M 3 Replies Last reply
    0
    • A abc876

      I want to perform some calculation which require extremely large floating point values i.e. > 1.7e308. I want some class for handling such large calculations. 128Bit or more. Any tips would be welcomed. Thanks! Muhammad Shoaib Khan http://geocities.com/lansolution

      G Offline
      G Offline
      G Haranadh
      wrote on last edited by
      #2

      May be you can get some help with this link. :-D http://www.codeproject.com/cpp/VisualCalc.asp

      T 1 Reply Last reply
      0
      • G G Haranadh

        May be you can get some help with this link. :-D http://www.codeproject.com/cpp/VisualCalc.asp

        T Offline
        T Offline
        toxcct
        wrote on last edited by
        #3

        actually, my VisualCalc 2.13 uses simple doubles for now... if he had wanted 128 bits integers, he could have used __int64, but for floating point numbers...:wtf: i really don't know.


        TOXCCT >>> GEII power
        [toxcct][VisualCalc]

        1 Reply Last reply
        0
        • A abc876

          I want to perform some calculation which require extremely large floating point values i.e. > 1.7e308. I want some class for handling such large calculations. 128Bit or more. Any tips would be welcomed. Thanks! Muhammad Shoaib Khan http://geocities.com/lansolution

          B Offline
          B Offline
          Bob Stanneveld
          wrote on last edited by
          #4

          Hello, You could always create a class that holds a memory block of 128 bits. You have to decide which floating point representation you use and define all the basic operations yourself. You have to go down to the bit level yourself to do all the excact calculations. One class declaration could look like:

          class CFloat128
          {
          public:
          CFloat128(unsigned __int64 uLowOrder,
          unsigned __int64 uHighOrder = 0,
          bool bNegative = false);
          ~CFloat128();

          // your operations
          private:
          void* m_pData;
          };

          // overloaded operators
          CFloat128 operator + (const CFloat128& lFloat, const CFloat128 rFloat);
          // etc..

          Hope this helps :) Behind every great black man...             ... is the police. - Conspiracy brother Blog[^]

          1 Reply Last reply
          0
          • A abc876

            I want to perform some calculation which require extremely large floating point values i.e. > 1.7e308. I want some class for handling such large calculations. 128Bit or more. Any tips would be welcomed. Thanks! Muhammad Shoaib Khan http://geocities.com/lansolution

            M Offline
            M Offline
            markkuk
            wrote on last edited by
            #5

            GMP[^] supports arbitrary precision floating point math.

            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