1

Im using pow from cmath.h for the power of function. Im using the line of code pow(80,7). Int and long are to small to give me the right value. Im going to use printf or cout to display the result

what data type can I use

terry
  • 41
  • 5
  • I don't know cmath so forgive me if this is an overly simple question but are there any reason that you need to use a non decimal number such as long or int rather then say [double](http://en.wikipedia.org/wiki/Double_precision) ? – Karl-Henrik May 06 '14 at 04:36
  • Do you really need to store the entire product, or are you eventually going to reduce it modulo some much smaller number? – Jim Lewis May 06 '14 at 04:36
  • Does this answer your question? [How to work on big integers that don't fit into any of language's data structures](https://stackoverflow.com/questions/5544293/how-to-work-on-big-integers-that-dont-fit-into-any-of-languages-data-structure) – Karl Knechtel Mar 20 '23 at 20:14

1 Answers1

1

Maybe you should have a look at GNU GMP (https://gmplib.org/).

HTH!

c-garcia
  • 598
  • 1
  • 9
  • 17