Reputation: 452
I'm trying to do math calculations that they require more than 100 decimals of precision. C data types cannot go beyond 16 bytes (long double), so I cannot compute more than ~17 decimals. Is there a way to create a variable in C that can get more precision?
Upvotes: 0
Views: 114
Reputation: 7864
Realistically you need an arbitrary-precision arithmetic library, see Wikipedia for some options. I personally have found GNU MPFR to be fairly reliable, though I have also heard good things about Arb.
Upvotes: 3