Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
18
template <typename T>
19
T
20
RandomFloat(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
28
template <typename T>
29
void
Callers
nothing calls this directly
Calls
1
rand
Function · 0.85
Tested by
no test coverage detected