#include <cassert>
#include <iostream>
#include <stdio.h>
#include <time.h>
#include <vector>
std::cout << "TESTING ARITHMETIC OPERATIONS\n" << std::endl;
int a = 10;
int b = 8;
int c = 3;
double d = 1.25;
float e = 1.85;
float f = 2.75;
long g = 1.35;
float y = 9743298223.945;
float z = 34895542235.8854;
int arr[] = {1, 2, 3, 4, 5};
int n = sizeof(arr) / sizeof(arr[0]);
std::cout << ar.
arr_add(arr, n) <<
'\n';
std::cout << ar.
arr_sub(arr, n) <<
'\n';
std::cout << ar.
arr_mlt(arr, n) <<
'\n';
int r10 = 10;
int r11 = 3;
printf("The greatest power of %d that divides %d! = %d\n", r10, r11, r12);
int r13 = 7;
int r14 = 3;
printf("The greatest power of %d that divides %d! = %d\n", r13, r14, r15);
int r16 = 2;
int r17 = 4;
printf("The GCD of %d & %d = %d\n", r16, r17, r18);
int r19 = 232;
int r20 = 96;
printf("The GCD of %d & %d = %d\n", r19, r20, r21);
return 0;
}
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.