# Any FOSS MATLAB/Octave toolbox for high-speed variable precision arithmetic?

I need to use variable precision arithmetic in MATLAB for an expensive set of computation.

The vpa function provided by the symbolic math toolbox is very slow. I found a non-free alternative toolbox known as "Advanpix" (http://www.advanpix.com/) ,which sped up things by an order of magnitude, using a trial version.

However, my funding body does not allow purchase of any additional software for this project.

Is there a viable/fast alternative to advanpix/vpa for MATLAB ?

While I do not know of a toolbox which fits the bill, a good open source alternative to MATLAB and Octave which does have a good solution to this problem is Julia. The linear algebra syntax from MATLAB/Octave almost transfers over to Julia directly, though you need to swap indexing like A(i) to A[i]. But after a quick translation, you can use Julia's BigFloats for variable precision numbers. That's a wrapper of the MPFR library which is pretty standard and does okay. A faster implementation for bitsizes <500 is given in ArbFloats.jl which is based on the Arb library. Lastly, if you just want 128-bit numbers, DecFP.jl gives some good implementations.
What's nice about going this route is that Julia's dispatch system makes these just stand-in for standard numbers, so you can use them in most well written libraries. So you can take these high-speed variable precision numbers and just call generic matrix multiplication, SVD factorization, \, differential equation solvers, optimization routines, etc. and expect them to work in place of Float64s.