[Rd] What should dnorm(0, 0, -Inf) return?

Weigand, Stephen D. We|g@nd@Stephen @end|ng |rom m@yo@edu
Sat Dec 7 23:05:24 CET 2019


Hi,
Apropos of a recent Inf question, I've previously wondered if dnorm "does the right thing" with

  dnorm(0, 0, -Inf)

which gives zero. Should that be zero or NaN (or NA)? 

The help says "'sd < 0' is an error and returns 'NaN'" and since -Inf < 0 is TRUE, then... is this a bug?

Thank you,
Stephen
Rochester, MN USA



More information about the R-devel mailing list