Reputation: 36649
I would like to explore numeric accuracy of a few different implementations of my algorithm (which works using standard double precision arithmetic). Unfortunately in many cases I don't know the correct result in closed form, so I need to find a way to calculate a benchmark result using some very high precision computations.
This is a fun project, so my constraints are: no budget for tools and preferably Linux platform. I know that Mathematica offers automatic error tracking and arbitrary-precision arithmetic, but I don't have the license. Execution speed is not an issue, because these high precision calculations are only going to be used for calculating the benchmarks.
What is the best way to code these high precision computations? I am looking for at least quad precision, but preferably even higher. My only idea so far was to use quad precision floating point types in C++.
Upvotes: 1
Views: 249
Reputation: 7864
I find Julia great for this task. Among the advantages
BigFloat
type, which wraps the MPFR library, and a BigInt
which wraps the GMP library.Upvotes: 1