exponentiation - Store and work with Big numbers in C -
i need working big numbers. according windows calc, exponent
174^55 = 1.6990597648061509725749329578093e+123
how store using c (c99 standard)?
int main(){ long long int x = 174^55; //result 153 printf("%lld\n", x); }
normal types in c can store 64 bits, you'll have store big numbers in array, example, , write mathematical operations yourself. shouldn't reinvent wheel here - try gnu multiple precision arithmetic library purpose.
and comments pointed out, ^
operation binary xor. exponentiation, have use mathematical functions pow
.
Comments
Post a Comment