Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bslatkin/effectivepython
/ dot_product
Function
dot_product
example_code/item_095/my_library/my_library.c:20–26 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
18
#include
"my_library.h"
19
20
double dot_product(int length, double* a, double* b) {
21
double result = 0;
22
for (int i = 0; i < length; i++) {
23
result += a[i] * b[i];
24
}
25
return result;
26
}
Callers
1
main
Function · 0.70
Calls
no outgoing calls
Tested by
1
main
Function · 0.56