Forums : Ohloh General Discussion

Dear Open Hub Users,

We’re excited to announce that we will be moving the Open Hub Forum to https://community.blackduck.com/s/black-duck-open-hub. Beginning immediately, users can head over, register, get technical help and discuss issue pertinent to the Open Hub. Registered users can also subscribe to Open Hub announcements here.


On May 1, 2020, we will be freezing https://www.openhub.net/forums and users will not be able to create new discussions. If you have any questions and concerns, please email us at [email protected]

what formula used to generate the constants for below polynomial (0x18BB70000)

Hi All ,

i want to understand how did the below 20 constants were defined for the polynomial ( 0x18BB70000) , as i am using the same asm code in my project with different poly (A2EB) . can any one help me on this

Thanks in advance
Shankar

please refer below site
http://code.ohloh.net/file?fid=vCyMga37ILumU46twFO09V9mrn8&cid=6NGO2C2fa5k&s=&fp=306559&mp=&projSelected=true#L0

precomputed constants

these constants are precomputed from the poly:

0x8bb70000 (0x8bb7 scaled to 32 bits)

.align 16

Q = 0x18BB70000

rk1 = 2^(32*3) mod Q << 32

rk2 = 2^(32*5) mod Q << 32

rk3 = 2^(32*15) mod Q << 32

rk4 = 2^(32*17) mod Q << 32

rk5 = 2^(32*3) mod Q << 32

rk6 = 2^(32*2) mod Q << 32

rk7 = floor(2^64/Q)

rk8 = Q

rk1:
.quad 0x2d56000000000000
rk2:
.quad 0x06df000000000000
rk3:
.quad 0x9d9d000000000000
rk4:
.quad 0x7cf5000000000000
rk5:
.quad 0x2d56000000000000
rk6:
.quad 0x1368000000000000
rk7:
.quad 0x00000001f65a57f8
rk8:
.quad 0x000000018bb70000

rk9:
.quad 0xceae000000000000
rk10:
.quad 0xbfd6000000000000
rk11:
.quad 0x1e16000000000000
rk12:
.quad 0x713c000000000000
rk13:
.quad 0xf7f9000000000000
rk14:
.quad 0x80a6000000000000
rk15:
.quad 0x044c000000000000
rk16:
.quad 0xe658000000000000
rk17:
.quad 0xad18000000000000
rk18:
.quad 0xa497000000000000
rk19:
.quad 0x6ee3000000000000
rk20:
.quad 0xe7b5000000000000

shankarsrinivasj over 11 years ago