MCPcopy Create free account
hub / github.com/MultithreadedJSBook/code-samples / random64

Function random64

ch1-c-threads/happycoin-threads.c:13–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11};
12
13uint64_t random64(uint32_t * seed) {
14 uint64_t result;
15 uint8_t * result8 = (uint8_t *)&result;
16 for (size_t i = 0; i < sizeof(result); i++) {
17 result8[i] = rand_r(seed);
18 }
19 return result;
20}
21
22uint64_t sum_digits_squared(uint64_t num) {
23 uint64_t total = 0;

Callers 1

get_happycoinsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected