MCPcopy Create free account
hub / github.com/codr7/hacktical-c / hc_fix

Function hc_fix

fix/fix.c:23–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23hc_fix_t hc_fix(const uint8_t exp, const int64_t val) {
24 return (hc_fix_t)hc_bitmask(exp, HC_FIX_EXP) +
25 (hc_fix_t)(((val < 0) ? 1 : 0) << HC_FIX_EXP) +
26 (hc_fix_t)(hc_abs(val) << HC_FIX_HDR);
27}
28
29uint8_t hc_fix_exp(const hc_fix_t x) {
30 return hc_bitmask(x, HC_FIX_EXP);

Callers 11

test_addFunction · 0.85
test_divFunction · 0.85
test_mulFunction · 0.85
test_newFunction · 0.85
test_subFunction · 0.85
hc_fix_addFunction · 0.85
hc_fix_subFunction · 0.85
hc_fix_mulFunction · 0.85
hc_fix_divFunction · 0.85
fix_benchmarksFunction · 0.85
emit_testsFunction · 0.85

Calls

no outgoing calls

Tested by 6

test_addFunction · 0.68
test_divFunction · 0.68
test_mulFunction · 0.68
test_newFunction · 0.68
test_subFunction · 0.68
emit_testsFunction · 0.68