[R] variable values

David Winsemius dwinsemius at comcast.net
Fri Feb 13 15:27:29 CET 2009


Step 1: Read the R-FAQ 7.31:

Step 2: Ask yourself whether it is likely that such a small value can  
be sensibly distinguished from zero using a program that stores values  
in double precision.

Step 3: Consider alternate methods, perhaps logarithms or programs  
that are equipped to deal with arbitrary precision. There have been  
threads on such strategies. I got on-topic results with an r-search  
on : "very small" log probabilit*

-- 
David Winsemius

On Feb 12, 2009, at 2:09 PM, Tim Smith wrote:

> Hi all,
>
> I was working with some probabilities and wanted to store some small  
> values. For example:
>
>> x = 2e-250
>> x
> [1] 2e-250
>> y = 2e-300
>> y
> [1] 2e-300
>> z = 2e-350
>> z
> [1] 0
>
>
> Is there any way to store a small value (e.g. 2e-350) in R?
>
> thanks!
>
>
>
>
> 	[[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