[Rd] 0.45<0.45 = TRUE (PR#10744)

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Wed Feb 13 13:40:48 CET 2008

hadley wickham wrote:

> It's more than that as though, as floating point addition is no longer
> guaranteed to be commutative or associative, and multiplication does
> not distribute over addition.  Many concepts that are clear cut in
> pure math become fuzzy in floating point math - equality, singularity
> of matrices etc etc.

  I've just noticed that R doesn't calculate e^pi - pi as equal to 20:

  > exp(pi)-pi == 20
  [1] FALSE

  See: http://www.xkcd.com/217/


More information about the R-devel mailing list