1

I'm working on a program where I have to deal with numbers that are up to 200 digits long. I also have to do simple math operations with them. But how can I store those numbers? Is there a variable for it? Because normal Integers are way to small. Maybe you can help me. Thank you so much already :)

Thank you Anton

  • possible duplicate of [Store and perform operations with huge numbers in iOS](http://stackoverflow.com/questions/14160974/store-and-perform-operations-with-huge-numbers-in-ios) – Caleb Apr 03 '14 at 14:49
  • http://rypress.com/tutorials/objective-c/data-types/primitives.html might help. – Hackmodford Apr 03 '14 at 14:50
  • Thank you :) I googled but didn't really know how to describe it. – user3207681 Apr 03 '14 at 14:52

1 Answers1

0

Like most languages, Objective-C doesn't have any native type that supports math on 200-digit numbers. However, there are libraries for C and C++ that provide data types and operations for working with arbitrarily large numbers. Search for things like "big int library" or "big number C++". A few options are listed in the duplicate question.

Community
  • 1
  • 1
Caleb
  • 124,013
  • 19
  • 183
  • 272