[R] help for the first poster- a simple question
jim holtman
jholtman at gmail.com
Mon Mar 3 18:54:35 CET 2008
FAQ 7.31 (You need to understand what floating point numbers are)
On 3/3/08, Xuejun Qin <xjq at chg.duhs.duke.edu> wrote:
> Hi, there,
> I cannot get accurate value for calculation.
> for example:
> ld<-sqrt(1*0.05*0.95*0.05*0.95)
> 0.05*0.95-ld=-6.938894e-18
> 0.05*0.95-ld==0 is False.
>
> I met this problem in my program, how can I handle it. Thanks.
>
>
> xj.
>
> ______________________________________________
> 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.
>
--
Jim Holtman
Cincinnati, OH
+1 513 646 9390
What is the problem you are trying to solve?
More information about the R-help
mailing list