14 std::cout <<
"TESTING ARITHMETIC OPERATIONS\n" << std::endl;
45 float y = 9743298223.945;
46 float z = 34895542235.8854;
51 int arr[] = {1, 2, 3, 4, 5};
52 int n =
sizeof(arr) /
sizeof(arr[0]);
54 std::cout << ar.
arr_add(arr, n) <<
'\n';
55 std::cout << ar.
arr_sub(arr, n) <<
'\n';
56 std::cout << ar.
arr_mlt(arr, n) <<
'\n';
65 printf(
"The greatest power of %d that divides %d! = %d\n", r10, r11, r12);
70 printf(
"The greatest power of %d that divides %d! = %d\n", r13, r14, r15);
75 printf(
"The GCD of %d & %d = %d\n", r16, r17, r18);
80 printf(
"The GCD of %d & %d = %d\n", r19, r20, r21);
User API for openGPMP ARITHMETIC MODULE.
T arr_sub(T arr[], int64_t n)
T arr_add(T arr[], int64_t n)
T arr_mlt(T arr[], int64_t n)
int64_t greatest_power(int64_t n, int64_t p)
Find greatest power of 2 itegers.
int64_t op_gcd(int64_t x, int64_t y)
Find Greatest Common Divisor of 2 integers.