I'm trying to implement a calculator function in my app, and the values will usually be very large along with decimal precision up to 12 digits. I understand the NSDecimalNumber
has the decimalNumberWithMantissa
function which could be useful although it doesn't seem easy to implement, especially when trying to work with basic arithmetic as well as advanced arithmetic. I know the built in iOS calculator can work with very large numbers, and although they are expressed in scientific notation, that's fine for my purposes. Is there any type I'm missing? I've tried float, double, long double, etc. but nothing seems to work. Any ideas are appreciated.
Asked
Active
Viewed 141 times
0

Milo
- 5,041
- 7
- 33
- 59
-
This might be helpful http://rypress.com/tutorials/objective-c/data-types/nsdecimalnumber – Sabby Aug 10 '16 at 08:51
1 Answers
0
I used to work with GMP with C, I haven't done further research about the availability of this library for Objective-C especially for iOS "out of the box"
This link might help: Linear Programming library for iOS