Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. BigDecimal?
Qt 6.11 is out! See what's new in the release blog

BigDecimal?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 4 Posters 6.6k Views 2 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.
  • J Offline
    J Offline
    Jonathan
    wrote on last edited by
    #1

    Does Qt have equivalents to the Java BigDecimal or BigInteger classes?

    I need to do some arbitrary precision arithmetic.

    Many thanks, ¬Jonathan

    1 Reply Last reply
    0
    • F Offline
      F Offline
      Franzk
      wrote on last edited by
      #2

      I think a long double (80 bits) is rather OK for these purposes. If you still think you need them, you might be able to write your own or use someone else's implementation from somewhere.

      "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • F Offline
        F Offline
        Felix
        wrote on last edited by
        #3

        openSSL uses an implementation for them f.e. I used them in my Code too.

        1 Reply Last reply
        0
        • benlauB Offline
          benlauB Offline
          benlau
          Qt Champions 2016
          wrote on last edited by
          #4

          For those who need BigInteger for Qt/QML, I have packed a library which is installable by qpm:

          biginteger: QML BigInteger library

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved