473,396 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to store numbers greater than 64bit in c++

Please help,I'm kinda new to c++ programming
Aug 5 '18 #1
2 4165
weaknessforcats
9,208 Expert Mod 8TB
This is too difficult for a beginner.

The conceptual answer is that you design for a large data item. Like maybe a string where each character is a digit of your number. Or perhaps a struct (class) whose data members are the number. Or maybe just a memory allocation where each bit is part of your number.

Then you write code to add/subtract/divide/multiply the data in your design. Then you overload the + - / * operators.


Lastly, all this work has already been done so you would just purchase large number code products and use those.
Aug 5 '18 #2
YangLi
2
Maybe you need some libraries like GSL, Boost or Eigen to represent huge numbers and their calculations. These libraries are widely used for many years and they are safe and efficient, so nothing to worry about the huge numbers technology, and you can pay more attentions on business request.
Aug 21 '18 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Elliot Chance | last post by:
Hi, I want to store very big numbers (eg. 2^1024) Does any know how to store numbers like this, so they can then be manipulated, (+-*/) Thanks, Elliot
28
by: MLH | last post by:
The largest integer A97 can deal with is 2,147,483,647, as I understand it from HELP. I would be content to represent larger integers as strings. For example, "2147483648" would suit me fine. I...
33
by: patrick_woflian | last post by:
hey guys, im just writing a basic calculation at the moment, before building on it for an A-Level piece of work. i can add/divide etc... two numbers together yet i am having a major problem with...
24
by: Tuvas | last post by:
Okay, I'm working on devoloping a simple, cryptographically secure number, from a range of numbers (As one might do for finding large numbers, to test if they are prime). My function looks like...
3
by: candexis | last post by:
Well, If I am using the command __int64, wich is a variable of 64 bits, how can show this variable in the computer screen, for example using cout _int64 x = . . . . .. . . cout << x; If I...
2
by: AboutJAV | last post by:
Hi, In my code, I accept very long string, which may be greater than 2046 bytes. String can not exceed this limit. What else can I use to store these very long string? Thanks,
12
by: pallavi27 | last post by:
hii, i am working in c and my problem is that i have created a file which contains numbers,i want to store these numbers in an array.,please guide me how to go about it this is the part of code that...
11
by: Dmaccess | last post by:
Hello all, I've been working on refining an established MS access database. There is a priority field in an import table, and it gets reset when you re-import data that matches entries already...
2
by: skippygirl | last post by:
Hi, I am an engineering student who just started my first C++ module. I am doing my assignment that will calculate total tax amount per day and per week and finally sum those up. One of the...
5
by: Linish Francis | last post by:
In a program which adds two numbers of integer data type and prints the result, numbers greater than 32767 can neither be given as input nor obtained as output. for eg: if the operends are a and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.