MCPcopy Create free account
hub / github.com/ElementsProject/elements / simplicity_maj_1

Function simplicity_maj_1

src/simplicity/jets.c:157–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155
156/* maj_1 : TWO * TWO * TWO |- TWO */
157bool simplicity_maj_1(frameItem* dst, frameItem src, const txEnv* env) {
158 (void) env; /* env is unused. */
159 bool x = readBit(&src);
160 bool y = readBit(&src);
161 bool z = readBit(&src);
162 writeBit(dst, (x && y) || (y && z) || (z && x));
163 return true;
164}
165
166#define MAJ_(bits) \
167/* maj_n : TWO^n * TWO^n * TWO^n |- TWO^n */ \

Callers

nothing calls this directly

Calls 2

readBitFunction · 0.85
writeBitFunction · 0.85

Tested by

no test coverage detected