MCPcopy Create free account
hub / github.com/numpy/numpy / RandomFloat

Function RandomFloat

numpy/core/tests/data/generate_umath_validation_data.cpp:19–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17
18template <typename T>
19T
20RandomFloat(T a, T b)
21{
22 T random = ((T)rand()) / (T)RAND_MAX;
23 T diff = b - a;
24 T r = random * diff;
25 return a + r;
26}
27
28template <typename T>
29void

Callers

nothing calls this directly

Calls 1

randFunction · 0.85

Tested by

no test coverage detected