# Internal Precision - Symbolic

6 messages
Open this post in threaded view
|

## Internal Precision - Symbolic

 Hi. I am a college student and I have some exercises to do. One of them need me to implement Gaussian elimination with 3 digit-chopping arithmetic. It's not that my answer must have only three-digit precision, but all values that are being calculated must have this precision. The exercise wants this particularly requirement to compare with the real solution and compute the error provided by this poor precision. I've done the implementation of the method, but as I was able to see, Octave uses all it's internal precision, and that makes the error null. I didn't find any way to reduce it's internal precision. Actually, I've installed the symbolic package, but it didn't work out well. With matrices it didn't change anything and with numbers, even making digits(3) it insists to give me five digits. I know that Octave is efficient with precision, but how can I change that in order to make this computational error and compare it to the real value? Thanks in advance.
Open this post in threaded view
|

## Re: Internal Precision - Symbolic

 On 13 October 2012 10:36, EduardoHenrique <[hidden email]> wrote: > I know that Octave is efficient with precision, but how can I change that in > order to make this computational error and compare it to the real value? No. Octave's precision is defined by your CPU's implementation of double precision, i.e. it's defined by your hardware. It can't be changed in software. The vpa function from the symbolic package is very limited and nearly useless. The symbolic package for example doesn't work with matrices. I recommend you use another program. I know in Maxima you can set the fprec variable to use variable-precision for floating point arithmetic. - Jordi G. H. _______________________________________________ Help-octave mailing list [hidden email] https://mailman.cae.wisc.edu/listinfo/help-octave
Open this post in threaded view
|

## Re: Internal Precision - Symbolic

 Thanks for your answer. I know it would be easier to go to a symbolic software. But I've my scripts all set in Octave. Unfortunately Maxima programming language differs a lot of Octave/Matlab/Scilab and isn't "comfortable". It seems that Matlab offers this tool (VPA), but it happen to use Maple (comercial symbolic tool) to do the symbolic calculations. Isn't there a way that Octave could be integrated with Maxima? Or is there a numerical software which language is similar to Octave/Matlab and supports this variable precision arithmetic? If not, I was thinking about one solution to my problem, see if you agree: Suppose I want to use VPA in every calculation in Octave. Would it be possible to force Octave to execute a script after every calculation it does? If so, I could force him to eliminate any digits beyond the ones I want. The doubt is: where (in the source code) can I add the code to force it to execute a function after any evaluation it does? Thanks for your help!
Open this post in threaded view
|

## Re: Internal Precision - Symbolic

 Hi, On 21/10/12 17:40, EduardoHenrique wrote: > Thanks for your answer. > > I know it would be easier to go to a symbolic software. But I've my scripts > all set in Octave. Unfortunately Maxima programming language differs a lot > of Octave/Matlab/Scilab and isn't "comfortable". The syntax of maxima is certainly different from the one used in octave. I wouldn't call it "uncomfortable". It serves a different purpose and for that one it's probably better suited than octave's. > > It seems that Matlab offers this tool (VPA), but it happen to use Maple > (comercial symbolic tool) to do the symbolic calculations. Isn't there a way > that Octave could be integrated with Maxima? Or is there a numerical > software which language is similar to Octave/Matlab and supports this > variable precision arithmetic? If I remember right, Matlab uses a software called Mupad for symbolic computations. Mupad used to be a standalone software package for symbolic computations. Mathworks bought the company that developed it years ago and integrated into the symbolic math toolbox. See http://de.wikipedia.org/wiki/MuPADMaybe you could take a look at Sage (http://www.sagemath.org/) It combines several packages for numerical as well as symbolic computations under a single frontend. As far as I know, you can call octave as well as maxima from it. But be warned, the thing is very large in terms of necessary disk space. > > If not, I was thinking about one solution to my problem, see if you agree: > Suppose I want to use VPA in every calculation in Octave. Would it be > possible to force Octave to execute a script after every calculation it > does? If so, I could force him to eliminate any digits beyond the ones I > want. The doubt is: where (in the source > code) can I add the code to force it to execute a function after any > evaluation it does? I'm not familiar enough with octave's source code but I doubt anything like this is possible. > > Thanks for your help! > > > > > -- > View this message in context: http://octave.1599824.n4.nabble.com/Internal-Precision-Symbolic-tp4645257p4645568.html> Sent from the Octave - General mailing list archive at Nabble.com. > _______________________________________________ > Help-octave mailing list > [hidden email] > https://mailman.cae.wisc.edu/listinfo/help-octave> Regards, Laurent _______________________________________________ Help-octave mailing list [hidden email] https://mailman.cae.wisc.edu/listinfo/help-octave