[R] Increase R precision

Petr PIKAL petr.pikal at precheza.cz
Wed Oct 27 15:32:37 CEST 2010


Hi

r-help-bounces at r-project.org napsal dne 27.10.2010 14:21:14:

> So?
> Do you imply that I do not need to change the precision.. and if yes how 
to 
> change the default display settings?

> (18-46)/(45-93)
[1] 0.5833333
> (18-46)/(45-93)*1e12
[1] 583333333333

So the computation use machine precision. Display is changed by options

Regards
Petr



> 
> Best regards
> Alex
> 
> 
> 
> 
> 
> ________________________________
> From: Alain Guillet <alain.guillet at uclouvain.be>
> 
> Cc: Rhelp <r-help at r-project.org>
> Sent: Wed, October 27, 2010 1:58:46 PM
> Subject: Re: [R] Increase R precision
> 
> Hi,
> 
> It is not a problem of precision but a problem of display.
> 
> > options(digits=15)
> > (18-46)/(45-93)
> [1] 0.583333333333333
> 
> 
> Alain
> 
> 
> On 27-Oct-10 13:49, Alaios wrote:
> > Hello everyone.
> >
> > When I execute the following in R
> >> (18-46)/(45-93)
> > [1] 0.5833333
> >
> > I get small precision for what I am trying to deal with .  Is it 
possible to
> > increase the precision for this and for other operations?
> >
> > For example openoffice calc for this operation returns
> >
> >
> > 0.58333333333333300000
> >
> >
> > I
> >
> >
> >
> >
> > I would like to thank you for your help
> >
> >
> >
> >
> >     [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide 
http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
> 
> -- 
> Alain Guillet
> Statistician and Computer Scientist
> 
> SMCS - IMMAQ - Université catholique de Louvain
> Bureau c.316
> Voie du Roman Pays, 20
> B-1348 Louvain-la-Neuve
> Belgium
> 
> tel: +32 10 47 30 50
> 
> 
> 
>    [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list