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


Groups > comp.lang.c > #27640

Re: Large number libraries/algorithms

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: Large number libraries/algorithms
Date 2012-10-24 11:33 -0700
Organization None to speak of
Message-ID <lnmwzbvhxs.fsf@nuthaus.mib.org> (permalink)
References (6 earlier) <lnipa1dkoy.fsf@nuthaus.mib.org> <UqqdnTtQPYLmDhrNnZ2dnUVZ7r-dnZ2d@lyse.net> <k68ipb$hl4$1@dont-email.me> <hOednYMdvoBOQxrNnZ2dnUVZ7qWdnZ2d@lyse.net> <0.9cff3979e084d8b19322.20121024144334BST.87vce07zp5.fsf@bsb.me.uk>

Show all headers | View raw


Ben Bacarisse <ben.usenet@bsb.me.uk> writes:
[...]
> I commented on this a couple of days ago.  I image the fact that
> __int128 is in the compiler but int128_t is not it stdint.h is simply
> the desire to keep the number of versions of stdint.h to a minimum.
> Since C99 requires at least a 64-but int, limiting yourself to that
> length keeps stdint.h very simple.  However, I don't think gcc has the
> mechanisms in place to make intmax_t be the 128-bit type (see below) and
> that may be the real reason stdint.h stop st 64-bit types.

If gcc provided an implementation-defined macro that indicates
whether __int128 is available, then <stdint.h> could use that macro
to decide whether to define int128_t and friends, and how to define
intmax_t.  (<stdint.h> is provided by glibc, or by whatever C library
is used on a given system -- I don't know whether it uses fixincludes
to generate a compatible <stdint.h> on non-glibc systems).

Incidentally, gcc's syntax for its 128-bit unsigned type is

    unsigned __int128

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
    Will write code for food.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

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


Thread

Large number libraries/algorithms boltar2003@boltar.world - 2012-10-22 09:11 +0000
  Re: Large number libraries/algorithms Mark Bluemel <mark_bluemel@pobox.com> - 2012-10-22 10:15 +0100
  Re: Large number libraries/algorithms Heikki Kallasjoki <fis+usenet@zem.fi> - 2012-10-22 09:19 +0000
    Re: Large number libraries/algorithms boltar2003@boltar.world - 2012-10-22 09:40 +0000
  Re: Large number libraries/algorithms Noob <root@127.0.0.1> - 2012-10-22 11:24 +0200
  Re: Large number libraries/algorithms David Brown <david@westcontrol.removethisbit.com> - 2012-10-22 13:29 +0200
    Re: Large number libraries/algorithms boltar2003@boltar.world - 2012-10-22 11:53 +0000
      Re: Large number libraries/algorithms James Kuyper <jameskuyper@verizon.net> - 2012-10-22 08:01 -0400
        Re: Large number libraries/algorithms David Brown <david@westcontrol.removethisbit.com> - 2012-10-22 14:41 +0200
          Re: Large number libraries/algorithms James Kuyper <jameskuyper@verizon.net> - 2012-10-22 09:36 -0400
            Re: Large number libraries/algorithms Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-10-22 15:12 +0100
    Re: Large number libraries/algorithms Keith Thompson <kst-u@mib.org> - 2012-10-22 10:31 -0700
      Re: Large number libraries/algorithms Robert Wessel <robertwessel2@yahoo.com> - 2012-10-22 15:09 -0500
        Re: Large number libraries/algorithms Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-10-23 00:01 +0100
          Re: Large number libraries/algorithms David Brown <david@westcontrol.removethisbit.com> - 2012-10-23 09:38 +0200
            Re: Large number libraries/algorithms Steve Thompson <stevet810@gmail.com> - 2012-10-23 12:40 +0000
              Re: Large number libraries/algorithms David Brown <david@westcontrol.removethisbit.com> - 2012-10-23 16:23 +0200
                Re: Large number libraries/algorithms Steve Thompson <stevet810@gmail.com> - 2012-10-23 14:38 +0000
            Re: Large number libraries/algorithms Keith Thompson <kst-u@mib.org> - 2012-10-23 12:58 -0700
              Re: Large number libraries/algorithms David Brown <david@westcontrol.removethisbit.com> - 2012-10-24 09:01 +0200
                Re: Large number libraries/algorithms James Kuyper <jameskuyper@verizon.net> - 2012-10-24 07:18 -0400
                Re: Large number libraries/algorithms David Brown <david@westcontrol.removethisbit.com> - 2012-10-24 14:23 +0200
                Re: Large number libraries/algorithms Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-10-24 14:43 +0100
                Re: Large number libraries/algorithms Keith Thompson <kst-u@mib.org> - 2012-10-24 11:33 -0700
                Re: Large number libraries/algorithms Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-10-24 19:53 +0100
                Re: Large number libraries/algorithms James Kuyper <jameskuyper@verizon.net> - 2012-10-24 10:50 -0400
                Re: Large number libraries/algorithms Noob <root@localhost> - 2012-10-24 15:16 +0200
                Re: Large number libraries/algorithms Noob <root@localhost> - 2012-10-24 18:57 +0200
                Re: Large number libraries/algorithms Keith Thompson <kst-u@mib.org> - 2012-10-24 11:43 -0700
                Re: Large number libraries/algorithms David Brown <david@westcontrol.removethisbit.com> - 2012-10-25 09:05 +0200
  Re: Large number libraries/algorithms Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-10-22 08:23 -0400
    Re: Large number libraries/algorithms tom st denis <tom@iahu.ca> - 2012-10-22 11:40 -0700
      Re: Large number libraries/algorithms Keith Thompson <kst-u@mib.org> - 2012-10-22 17:05 -0700
        Re: Large number libraries/algorithms tom st denis <tom@iahu.ca> - 2012-10-23 07:10 -0700
  Re: Large number libraries/algorithms David Brown <david@westcontrol.removethisbit.com> - 2012-10-22 14:42 +0200
    Re: Large number libraries/algorithms Chad <cdalten@gmail.com> - 2012-10-23 14:39 -0700
  Re: Large number libraries/algorithms pete <pfiland@mindspring.com> - 2012-10-24 03:27 -0400

csiph-web