help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to work with arbitrary precision and accuracy?


From: Arnau Mir Torres
Subject: Re: how to work with arbitrary precision and accuracy?
Date: Mon, 13 May 2002 11:45:59 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc1) Gecko/20020417

Paul Kienzle wrote:

You could try the symbolic extensions in octave-forge (http://octave.sf.net).
See main/symbolic/doc/symbolic.html, wherein it says:

  In  order to do exact arithmetic you need to deal with strings and the vpa
  command.   For  example:   vpa("1")/vpa("7")  is represented internally as
  exactly  1/7.   However,  vpa("1")/7 or 1/vpa("7")  is an approximation to
  1/7  that  is  accurate  to  roughly  the accuracy of the current value of
  digits.

  Pi is the symbolic value of pi.

Paul Kienzle
address@hidden

On Sun, May 12, 2002 at 06:36:16PM +0200, address@hidden wrote:
Hello.
I don't know if octave can do this. My question is about to work with an arbitrary precission and accuracy with octave.
For example, if I do:
output_precision = 32
and next I do
pi
octave responses:
3.1415926535897931159979634685442e+00
but this number only has 16 numbers correctly.
What have to do if I work with 32 numbers?

Thanks in advance,

Arnau.




-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------

Thank you for your response.
I don't want to make symbolic calculations. I want to do numerical calculations using 32 numbers of precission, for example.
So, If I do

output_precision = 32

and netx, I do
sqrt(2)*2,
octave only shows 16 numbers correcty, not 32.

Thanks in advance,

Arnau.

--
Arnau Mir Torres
Departament de Matem?tiques i Inform?tica
Universitat de les Illes Balears
Edifici A. Turmeda
Ctra. de Valldemossa, km. 7,5
E-07071 Palma de Mallorca
Spain
Phone: 00 34 971 172561
Fax: 00 34 971 173003
e-mail: address@hidden
http://dmi.uib.es/people/dmiamt0





-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]