Euclidean algorithm on two positive numbers */
| 1067 | |
| 1068 | /* Euclidean algorithm on two positive numbers */ |
| 1069 | static npy_uint64 |
| 1070 | _uint64_euclidean_gcd(npy_uint64 x, npy_uint64 y) |
| 1071 | { |
| 1072 | npy_uint64 tmp; |
| 1073 | |
| 1074 | if (x > y) { |
| 1075 | tmp = x; |
| 1076 | x = y; |
| 1077 | y = tmp; |
| 1078 | } |
| 1079 | while (x != y && y != 0) { |
| 1080 | tmp = x % y; |
| 1081 | x = y; |
| 1082 | y = tmp; |
| 1083 | } |
| 1084 | |
| 1085 | return x; |
| 1086 | } |
| 1087 | |
| 1088 | /* |
| 1089 | * Computes the conversion factor to convert data with 'src_meta' metadata |
no outgoing calls
no test coverage detected