Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

The basic calculation of big data is simulated to solve the limitation of the number of data calculated by conventional calculators.

Shulou Source: shulou.com Published: 2022-06-03 06:17:58 09月30日 Update

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

Tags: Data large numbers tags storage calculators character types multiplication and division names bases characters objects underlying modes times items processing loops control design operations Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Xiaomi OPPO Reno MySQL Apple