Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #122798

Re: Is there a current best library for large integers?

From Michael S <already5chosen@yahoo.com>
Newsgroups comp.lang.c++
Subject Re: Is there a current best library for large integers?
Date 2025-09-30 14:21 +0300
Organization A noiseless patient Spider
Message-ID <20250930142124.000050b1@yahoo.com> (permalink)
References <10beov9$383mp$1@dont-email.me>

Show all headers | View raw


On Mon, 29 Sep 2025 21:08:09 +0100
Vir Campestris <vir.campestris@invalid.invalid> wrote:

> I could knock something up - all I need to do is total a ****** lot
> of small numbers accurately, but the result is more than 64 bits.
> 
> Andy

To add to my previous post, if for some reason __int128 does not
satisfy your needs and if you don't want not switch to better language
then the simplest way to do it in "almost standard" C++ is to use
"almost standard" C++ library. I.e. boost.

www.boost.org/doc/libs/latest/libs/multiprecision/doc/html/boost_multiprecision/tut/ints/cpp_int.html

Not nearly as friction-free as __int128 and if you use it in multiple
places it can make your compilation noticeably slower, but at least
deployment is easy, both at development machine and at target. In fact,
being header-only, at target boost_multiprecision::cpp_int introduces no
dependencies at all.


Back to comp.lang.c++ | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Is there a current best library for large integers? Vir Campestris <vir.campestris@invalid.invalid> - 2025-09-29 21:08 +0100
  Re: Is there a current best library for large integers? olcott <polcott333@gmail.com> - 2025-09-29 15:40 -0500
    Re: Is there a current best library for large integers? Bonita Montero <Bonita.Montero@gmail.com> - 2025-10-07 18:24 +0200
      Re: Is there a current best library for large integers? scott@slp53.sl.home (Scott Lurndal) - 2025-10-07 17:56 +0000
        Re: Is there a current best library for large integers? Bonita Montero <Bonita.Montero@gmail.com> - 2025-10-08 04:38 +0200
          Re: Is there a current best library for large integers? scott@slp53.sl.home (Scott Lurndal) - 2025-10-08 14:02 +0000
  Re: Is there a current best library for large integers? olcott <polcott333@gmail.com> - 2025-09-29 15:45 -0500
  Re: Is there a current best library for large integers? Barry Schwarz <schwarzb@delq.com> - 2025-09-29 14:19 -0700
  Re: Is there a current best library for large integers? Michael S <already5chosen@yahoo.com> - 2025-09-30 01:03 +0300
    Re: Is there a current best library for large integers? David Brown <david.brown@hesbynett.no> - 2025-09-30 09:17 +0200
      Re: Is there a current best library for large integers? Michael S <already5chosen@yahoo.com> - 2025-09-30 14:02 +0300
      Re: Is there a current best library for large integers? Lynn McGuire <lynnmcguire5@gmail.com> - 2025-10-03 15:41 -0500
    Re: Is there a current best library for large integers? Vir Campestris <vir.campestris@invalid.invalid> - 2025-10-03 17:05 +0100
      Re: Is there a current best library for large integers? Ralf Goertz <me@myprovider.invalid> - 2025-10-06 17:34 +0200
        Re: Is there a current best library for large integers? Paavo Helde <eesnimi@osa.pri.ee> - 2025-10-07 10:44 +0300
          Re: Is there a current best library for large integers? Ralf Goertz <me@myprovider.invalid> - 2025-10-07 10:51 +0200
  Re: Is there a current best library for large integers? Michael S <already5chosen@yahoo.com> - 2025-09-30 14:21 +0300

csiph-web