help-octave
[Top][All Lists]

## Re: how to work with arbitrary precision and accuracy?

 From: Paul Kienzle Subject: Re: how to work with arbitrary precision and accuracy? Date: Mon, 13 May 2002 10:30:08 -0400

```With octave-forge loaded (http://octave.sf.net)

octave:1> digits(50)
ans = 50
octave:2> Pi
ans =

3.141592653589793238462643383279502884197169399375105820975

pi = 3, 14159 26535 89793 23846 26433 83279 50288 41971 69399 37510
58209 74944
59230 78164 06286 20899 86280 34825 34211 70679 82148 08651 32823 06647
09384

Paul Kienzle

On Mon, May 13, 2002 at 10:10:49AM -0400, Mark Esplin wrote:
>       As far as I know, the precision of octave is controlled by the double
> precision floating point of the c library that octave is linked with?
> Changing output-precision changes how many digits are printed, but doesn't
> change the precision of calculations.
>
>                              -Mark Esplin
>
> On Monday 13 May 2002 09:21 am, William Kreamer wrote:
> > Octave only has pi and the calculations of its built-in functions
> > programmed to 16 digit accuracy. There is a work-around. You can obtain pi
> > or e to your desired accuracy from a mathematical reference book such as
> > the CRC Standard Mathematical Tables.
> >
> > To obtain the values of the elementary functions to 32 digit accuracy,
> > Octave can be programmed to calculate the functions from the series. Just
> > be careful not to use arguments that diverge (or converge very slowly) in
> > the series.
> >
> > ----- Original Message -----
> > Sent: Sunday, May 12, 2002 12:36
> > Subject: how to work with arbitrary precision and accuracy?
> >
> > > 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
> -------------------------------------------------------------
>

-------------------------------------------------------------
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
-------------------------------------------------------------

```