topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Saturday December 14, 2024, 12:00 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: High-bit Math? (128 or 256)  (Read 4759 times)

Renegade

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,291
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
High-bit Math? (128 or 256)
« on: July 24, 2013, 06:43 AM »
There are some calculations that I'd like to run, but I need some extremely big numbers and some extremely small numbers.

So I need something that will facilitate a very large bit-depth for the number types. e.g. 128 bit or 256 bit. I need integers and non-integers.

I only need to do:

  • +
  • - (redundant from above)
  • *
  • / (redundant from above)
  • ^

However, ^ needs to accommodate very small numbers or very precise numbers, e.g.

  • 1.00000000000000000000000000023423423
  • 0.000000000000000000000000000000000000000000000000000000000002342342

An nth root function would be convenient, but isn't needed.

Does anyone know of anything that works and that can help me? Any language is fine by me. Something C-ish would be nice, but I don't care.
Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

x16wda

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 888
  • what am I doing in this handbasket?
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: High-bit Math? (128 or 256)
« Reply #1 on: July 24, 2013, 08:14 PM »
Did you look at this?
vi vi vi - editor of the beast

Renegade

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,291
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
Re: High-bit Math? (128 or 256)
« Reply #2 on: July 24, 2013, 09:11 PM »
Did you look at this?

No. I've not seen that before. I'll look into it. Thanks!
Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

Jibz

  • Developer
  • Joined in 2005
  • ***
  • Posts: 1,187
    • View Profile
    • Donate to Member
Re: High-bit Math? (128 or 256)
« Reply #3 on: July 25, 2013, 03:41 AM »
There are a number of bignum libraries available for various languages.

A few examples that appear to support float operations are GNU MP, NTL, MAPM.

And if you can restrict your problems to integer math there are a lot more options (even python, which has a built-in arbitrary precision integer type).