[R] Logical inconsistency

Wacek Kusnierczyk Waclaw.Marcin.Kusnierczyk at idi.ntnu.no
Mon Dec 8 13:13:33 CET 2008

Berwin A Turlach wrote:
> I am not surprised about CS guys never learning about these issues.  As
> long as you play around with data bases (their organisation &c),
> sorting algorithms, artificial intelligence (at least when I attended a
> lecture on this) you do not need to know about these issues.  And,
> unfortunately, it seems nowadays a lot of teaching is on a
> "need-to-know" and "just-in-time" basis.  
> It just became criminal when CS guys who were into compiler design
> started to construct compilers that analysed the code and rearranged
> the calculations based on an analysis that assumed infinite precision
> arithmetic.  Such compilers optimised away code that was designed to
> deal with finite precision arithmetic.  I believe this was one of the
> motivations of Goldberg's article.

you'd probably enjoy hacker's delight by warren [1], where tricks are
presented that allow you to use computer arithmetic efficiently when you
know the details of the representations.

from the foreword by g.l. steele jr:

"Many books on algorithms and data structures teach complicated
techniques for sorting and
searching, for maintaining hash tables and binary trees, for dealing
with records and pointers. They
overlook what can be done with very tiny pieces of data—bits and arrays
of bits. It is amazing what
can be done with just binary addition and subtraction and maybe some
bitwise operations; the fact
that the carry chain allows a single bit to affect all the bits to its
left makes addition a peculiarly
powerful data manipulation operation in ways that are not widely

Yes, there ought to be a book about these techniques. Now it is in your
hands, and it's terrific. If you
write optimizing compilers or high-performance code, you must read this


[1] http://www.hackersdelight.org/

More information about the R-help mailing list