MCPcopy Create free account
hub / github.com/git/git / get_prn

Function get_prn

bisect.c:597–601  ·  view source on GitHub ↗

* This is a pseudo random number generator based on "man 3 rand". * It is not used properly because the seed is the argument and it * is increased by one between each call, but that should not matter * for this application. */

Source from the content-addressed store, hash-verified

595 * for this application.
596 */
597static unsigned get_prn(unsigned count)
598{
599 count = count * 1103515245 + 12345;
600 return (count/65536) % PRN_MODULO;
601}
602
603/*
604 * Custom integer square root from

Callers 1

skip_awayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected