Alan Simpson on Wed, 28 Sep 2005 00:28:14 +0200


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

RE: setting output precision



hello Professor Cremona (and others),

I had some code where I wanted to do something similar.

I used the following:
default(realprecision,100);
default(format,"g0.10");

I hope that helps.

From: "Prof. J. E. Cremona" <John.Cremona@nottingham.ac.uk>
To: pari-users@list.cr.yp.to
Subject: setting output precision
Date: Tue, 27 Sep 2005 17:42:31 +0100

Is there an easy way in gp to do computations to high precision (say, 100) but only output in low precision (say, 10)? I know that I can achieve this by adding lots of lines like
default(realprecision,100);
default(realprecision,10);
in my script, but thought there might be a better way of just turning down the precision for output only.

This is in a computation where intermerdiate stages have to be done to high precision but (of course) I only need the result to low precision.

John
--
 Prof. J. E. Cremona             |
 University of Nottingham        | Tel.:  +44-115-9514920
 School of Mathematical Sciences | Fax:   +44-115-9514951
 University Park                 | Email: John.Cremona@nottingham.ac.uk
 Nottingham NG7 2RD, UK          |