Re: 128 bit integer code needed
- From: Keith Thompson <kst-u@xxxxxxx>
- Date: Tue, 29 Apr 2008 14:32:06 -0700
jacob navia <jacob@xxxxxxxxxx> writes:
Keith Thompson wrote:
jacob navia <jacob@xxxxxxxxxx> writes:
I am incorporating 128 Bit integer code into lcc-win and it would be
nice to have some code to test this feature.
Sounds interesting. Out of curiosity, just how are you defining your
128-bit integer types?
__int128
There is no unsigned as yet. Many other things must be done first:
o printing them with printf. Format "%I128d"
o scanning them with scanf. Same format
As long as you provide the proper macros in <inttypes.h> and typedefs
in <stdint.h>, users won't have to know what format strings you use
for printf and scanf. If I can refer to int128_t (or intleast128_t or
intfast128_t), I don't have to worry about whether the underlying type
is called __int128 or __longlonglong.
(To be clear, this is not a criticism of your choice of "__int128" or
"%I128d".)
[snip]
--
Keith Thompson (The_Other_Keith) <kst-u@xxxxxxx>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
.
- References:
- 128 bit integer code needed
- From: jacob navia
- Re: 128 bit integer code needed
- From: Keith Thompson
- Re: 128 bit integer code needed
- From: jacob navia
- 128 bit integer code needed
- Prev by Date: Re: Integer to string conversion
- Next by Date: Re: 128 bit integer code needed
- Previous by thread: Re: 128 bit integer code needed
- Next by thread: Re: 128 bit integer code needed
- Index(es):
Relevant Pages
|