[R] log of small values in R
dw|n@em|u@ @end|ng |rom comc@@t@net
Mon Jan 11 09:12:20 CET 2021
> On Jan 10, 2021, at 11:38 PM, Jeff Newmiller <jdnewmil using dcn.davis.ca.us> wrote:
> On January 10, 2021 12:53:14 AM PST, Shaami <nzshaam using gmail.com> wrote:
>> Dear Friends I am facing the problem of log values in R. The
>> log(1-0.99999999999999999) is giving -Inf while log(1e-18) gives finite
>> answer. Any suggestion to deal with this problem? Thank you
Jeff answers the specific question (of how to deal with the issue) but as to why?
> 0.9999999999999999999 == 1
And you should switch your mail client to plain text in future contributions to Rhelp.
>> [[alternative HTML version deleted]]
>> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> PLEASE do read the posting guide
>> and provide commented, minimal, self-contained, reproducible code.
> Sent from my phone. Please excuse my brevity.
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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