The basic calculation of big data is simulated to solve the limitation of the number of data calculated by conventional calculators.
Project name large Calculator
* * *
The bottom layer of large number calculation uses string object storage to convert integer data into character type for storage operation addition and subtraction; bit by bit addition and subtraction, design mark bit, mark carry and borrow; multiplication and division control the number of cycles on the basis of addition and subtraction to complete the data processing.
# include#include#include#includeusing namespace std;#define INT_64 long long#define UN_INIT 0xcccccccccccccccc// cannot be separated # define MIN_INT 0xffffffffffffffff#define MAX_INT (unsigned) 0x7fffffffffffffffclass BigData {public: BigData (): _ data (0), _ pdata (") {} BigData (INT_64 data): _ data (data) {INT_64 tmp = _ data; char cSymbol ='+' If (tmp