#329 __int128 constant or operators problems

v1.0 (example)
open
nobody
5
2017-01-10
2013-01-10
No

Hello,
I tested the following 2 compress/decompress source code files with "tdm64-gcc-4.7.1-3.exe" and "CodeBlock 10.5".
The main aim of these source files is to test the possibility to go below the Hutter Prize Limit of 15932968 of enwik8 file.
The main input for the compress program is the "archive8.dat" file of 15932968 bytes, renamed into "in.txt".

I wanted to test these source codes with __int128 type instead __int64.
I modified all constants, numbers and indexes accordingly to 128 bits in the code but I obtain invalid decompress data even I add only one "F" to the hexa constants and modify the indexes accordingly.

I want to ask you how you suggest to proceed to use correctly the constants and __int128 type?

Is there an inside error specific to __int128 type? because after compression the file became smaller if only one "F" is added to the constants.
Should it be used the __int128 constants and operators in an other way?
It is hard to belive that the file 15932968 can be compressed again.

Thank you very much for the attention,
Best regards,
Adrian,

Discussion

  • BOCUT Adrian Sebastian

    compress + decompress in the same txt file

     
  • FX

    FX - 2017-01-10

    __int128 is not a standard type, so it has limitations. One of these documented limitations is that there is no way to write constants directly in C: "There is no support in GCC for expressing an integer constant of type __int128 for targets with long long integer less than 128 bits wide" (https://gcc.gnu.org/onlinedocs/gcc/_005f_005fint128.html)

    You have to write your constant with casts, like this:

    __int128 mybigval = ((__int128) 0xfffff) << 64

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks