#### History of Idiom 74 > diff from v45 to v46

Edit summary for version 46 :

[C++] clarification in comment

[C++] clarification in comment

↷

#### Version 45

2020-12-24, 16:23:40

#### Version 46

2020-12-24, 20:20:52

# Idiom #74 Compute GCD

Compute the greatest common divisor x of big integers a and b. Use an integer type able to handle huge numbers.

# Idiom #74 Compute GCD

Compute the greatest common divisor x of big integers a and b. Use an integer type able to handle huge numbers.

##### Variables

x,a,b##### Variables

x,a,b##### Imports

#include <numeric>

##### Imports

#include <numeric>

##### Code

auto x = std::gcd(a, b);

##### Code

auto x = std::gcd(a, b);

##### Comments bubble

##### Comments bubble

C++17 or later

Uses the absolute values of a and b in calculations

Uses the absolute values of a and b in calculations

Converts a and b to their absolute values