decimal place



Hello,

in addition it is sometimes good to know that there is a flag 
which has an effect when using floats. It is fpprintprec:

(%i1) fpprintprec: 4 $
(%i2) 22/7, numer;
(%o2)                                3.143

This is just a display property. The computations are still 
carried out with the typical 64 bit accuracy of 2e-16

Volker van Nek


David Neubelt schrieb:
> Maybe this is what you want?
>
> (%i1) bfloat(22/7), fpprec:4;
> (%o1) 3.143b0
>
> -----Original Message-----
> From: Friedrich Hattendorf [mailto:friedrich at hattendoerfer.de] 
> Sent: Friday, March 13, 2009 1:22 PM
> To: maxima mailing list
> Subject: decimal place
>
> I am not shure this Item is correct; I found it as a 
> translation of the german "Nachkommastelle"
>
> Example:
>
> (%i61) float(22/7);
> (%o61) 3.142857142857143
> (%i62) round(float(22/7));
> (%o62) 3
>
> but I want:
> (%i63) ???(22/7);
> (%o63) 3.143
>
> Hoy may I manage this?
>
>