c++

You haven't broken it, it simply rounded the fraction because the number was too big.
I finished adding the final functions, it can now add, multiply, divide and raise fractions to a power for any integer value +- 2^32 -1
 
Last edited:
The fraction entered by Ace Modder was too big as it can only handle up to 9 figures, then it goes mad. I just discovered this __int64 which should improve things, EDIT cin doesn't like it now. What is the most efficient way to compute really big numbers, say 512-bits or more?
 
Last edited:
I heard it was originally intended as a joke as ++ means an increment of 1 in the language. C++ is an object orientated programming language which allows efficient, but not perfect, program code to be compiled in a fraction of the time it would take using machine code.
 
I keep stumbling because I can't get the string that is entered in a useful form.
int A[77];
char string[77];
for(int i=0; i<length_of_the_string; i++)
A[length_of_the_string-1-i] = string;
No matter what I do it refuses to store the numbers in the string in my array called A and when I check what is in A it reads garbage.
Even if I get an array there is still lots of complicated algebraic calculations I must perform before even the simplest arithmetic operations can be done.
 
I'm now creating a class where there are two functions. One creates a large integer, the other adds two large integers. How do I get the answer (which is an 256 integer array) outside the function? Before I used to use the & symbol but it won't work with arrays.
The large integers are stored as a long array of signed single numbers of increasing powers of ten, the first number is the length of the array, thus the arrays are around 1Kb in size.
 
Back
Top Bottom