[R] erratic behavior of match()?

Alberto Monteiro albmont at centroin.com.br
Thu Apr 19 22:42:40 CEST 2007


Bernhard Klingenberg wrote:
>
> Thank you! Is floating point arithmetic also the reason why
> 
> 1 %% 0.1
> 
> gives the "surprising" answer 0.1 
>
Floating point arithmetic is one of the most Evil things 
computer science imposed against the mathematicians; any
reasonable person, back when computer languages were developed,
would use integer and rational numbers by default, only using
floating point approximations when the integers became too big
or when forced to use irrational numbers.

But I don't think we can now repair the damage that was done
so long ago.

Alberto Monteiro



More information about the R-help mailing list