MCPcopy Create free account
hub / github.com/c3d/tao3D / AtomicInverseModPower2

Function AtomicInverseModPower2

libcryptopp/cryptopp/integer.cpp:89–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88
89static word AtomicInverseModPower2(word A)
90{
91 assert(A%2==1);
92
93 word R=A%8;
94
95 for (unsigned i=3; i<WORD_BITS; i*=2)
96 R = R*(2-R*A);
97
98 assert(R*A==1);
99 return R;
100}
101
102// ********************************************************
103

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected