Re: 128 bit integer code needed



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
o Algebraic simplifications in the compiler

C99 introduced the concept of "extended
integer types" (C99 6.2.5); are you using that? If not, I encourage
you to do so. And are you making intmax_t and uintmax_t 128 bits?


Very probably but that is too son. I have to get the basics right first.

In 32 bits I use operator overloading and there is no printf support...
This is different.


--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
.



Relevant Pages

  • Re: 128 bit integer code needed
    ... 128-bit integer types? ... o printing them with printf. ... Format "%I128d" ... scanning them with scanf. ...
    (comp.lang.c)
  • Re: Conformance
    ... You use the same format for qfloat as for double? ... How does printf ... jacob at jacob point remcomp point fr ...
    (comp.std.c)
  • Re: portable printf of different size types
    ... code for systems that have different ranges on integer types etc? ... I wrote a wrapper around printf that adds a format character to ... never just use a const format string, i have to copy the format string ...
    (comp.lang.c)
  • Re: 128 bit integers
    ... jacob navia wrote: ... for conforming implementations. ... of providing more portable names to get at the format ... in with other integer types. ...
    (comp.std.c)
  • Re: portable printf of different size types
    ... What is the easiest way to use printf when you are writing portable ... code for systems that have different ranges on integer types etc? ... Chuck F (cbfalconer at maineline dot net) ...
    (comp.lang.c)