Rank: 65445 based on 0 downloads (last 30 days) and 0 file submitted
Personal Profile:

Graduate student in evolutionary genetics and statistics.

Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Nigel
Updated File Comments Rating
30 Sep 2009 Multiple Precision Toolbox for MATLAB This toolbox defines a new mp class allowing multiple precision objects in MATLAB. Author: Ben Barrowes

I just reinstalled this package for a windows 7 64 bit computer (running 64 bit matlab). It was a bit of work so I thought I would share the process, or offer to email anyone the binaries/toolbox as I have it.
The first issue is that building mpfr/gmp for x64 is quite hard. Apparently, there is a new ming compiler out for 64 bit, but no one has had it work so far (and I didn't try it). The second option, SUA is also useless as there is no gcc compiler for x64 with it, and you would be forced to make a 32 bit version. So, in order to get the libraries I had to use MPIR (which can substitute for GMP) and then compile mpfr with this instead of gmp. To do this, you need to do the following:
Download MPFR ad MPIR :
http://www.mpfr.org/
http://www.mpir.org/
Now, both of these are hard to build, but someone has setup a way to build them with either visual studio or visual studio express that is reasonably painless. Go here to get the build instructions.
http://gladman.plushost.co.uk/oldsite/computing/gmp4win.php
Note that in order to get the visual studio build to work, you have to install a yasm assembler program and integerate it into visual studio (follow the 3 step instructions on their website).
http://www.tortall.net/projects/yasm/
One you are setup to go, first build mpir using visual studio. Note that there is a vcbuild directory included with the mpir program that you can use directly to make the files. This program can substitute for gmp in the next linking step, so use the gmp.h header file that comes with it next. With that done, you can now open the VS project from the gladman site and get ready to compile mpfr. Note that the project files he hands out do not include the actual code, so you will have to move the mpfr source files and reference mpir library files around to make sure they appear in their correct locations relative to the what is in the .sln file gladwell gives out. Once this is done, you are all set to build and things should compile just fine.
Next, compile the .mex files (which should be pretty straightforward now that the libraries are built). Now the package is up and running, however it did not work right away for me. It appears that for whatever reason if matlab saw this type of code:
length(x)==1
in the toolbox .m files, it would call the eq.m method of this toolbox instead of the builtin method, and this broke the dang thing as it would not know how to work with two double types. The same was true for <, >, etc.. This seemed very strange to me and I am not sure if it is due to matlab upgrades or to some odd system setting on my machine. In any event, changing the relevant files to check for a double and go to the builtin method seemed to work around the problem okay, and so far the code is working fine.

Great package overall!!! Certainly a lot of work must have gone into it, only giving it 4 out of 5 because I just spent 6 hours getting it to work, but I am sure if I had gone the 32 bit route it would have been much easier.

Contact us