Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/coreboot/coreboot
/ gcd
Function
gcd
src/commonlib/bsd/gcd.c:7–23 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
5
#include <stdint.h>
6
7
uint64_t gcd(uint64_t a, uint64_t b)
8
{
9
uint64_t c;
10
11
if (a == 0 || b == 0)
12
return MAX(a, b);
13
14
c = a % b;
15
16
while (c > 0) {
17
a = b;
18
b = c;
19
c = a % b;
20
}
21
22
return b;
23
}
Callers
9
permute_args
Function · 0.85
timer_us
Function · 0.85
timer_monotonic_get
Function · 0.85
anx7625_reduction_of_a_fraction
Function · 0.85
lcm
Function · 0.85
compute_frequence_ratios
Function · 0.85
rkclk_configure_i2s
Function · 0.85
rkclk_configure_i2s
Function · 0.85
test_gcd
Function · 0.85
Calls
no outgoing calls
Tested by
1
test_gcd
Function · 0.68