Octave is a just great free software, very good alternative to the expensive Matlab.
It does not handle multiprecision (to keep it simple, let's say that multiprecision is computation
with very high precision).
Aribas is a GNU free tool for multiprecision.
This page presents a simple tool for using Aribas within Octave.
- Multiprecision, high precision computing
- Opensource software (Octave, Aribas)
- Buggy source code
Why multiprecision matters ?
Sometimes, computation errors cumulate until reaching a very significant level.
It is widely claimed that the satelite-lifting rocket Ariane 5 exploded due to computation errors
(see www.intel.com/standards/floatingpoint.pdf for more on this example and other examples).
you just have to put the following lines in a file "aribas_eval.m",
in the exec path of octave:
============ aribas_eval.m ===================
chaine=(sprintf('echo "%s.\nexit" | sed ''s/\\^/**/g'' > /tmp/test%d%d.ari ',s,n,m));
system(sprintf("aribas -b /tmp/test%d%d.ari | tail -1 |sed 's/_//g' > /tmp/testb%d%d.ari",n,m,n,m));
system(sprintf('rm /tmp/test%d%d.ari /tmp/testb%d%d.ari',n,m,n,m));
How to use:
- Write your code with the Octave "eval" function for the computations that you want to see in multiprecision.
- Check that it works
- Replace "eval" by "aribas_eval"
==> this is supposed to be a multiprecision version
==> however, there are plenty of bugs
returns 0 (which is wrong --- precision error)
returns 255 (which is ok)
- no guarantee
- known bugs: handles only a very small subset of Octave's function
- this will be maintained and improved only as long as there is no better such functionality in Octave
- if you know a better way for doing this in octave just tell me and this page will disappear
olivier . teytaud
at gmail . com
I am the only responsible of any mistake in the code. The code is not guaranteed, it is even not guaranteed to do
anything which is useful for anyone - if you use it, you have to check yourself that it is ok for you.
The code is completely free (free code, free of charge).