On Sat, May 07, 2005 at 12:05:44AM -0500, Bradley Lucier wrote:
Marc:
There is a wonderful little book "Hacker's Delight" by Henry S. Warren Jr. (with a foreword by Guy Steele, BTW), that has a special section on "Overflow Detection" in Chapter 1, "Basics". The section begins on page 26. In this section you'll find all the tests for overflow of signed addition, subtraction, and multiplication that you need in ##+, ##-, and ##* and FIXADDP, FIXSUBP, and FIXMULP (which should all probably be merged (##+ with FIXADDP, etc., of course) in some way).
Would you like me to look at some of the implementation details?
Brad
I'll second that. It is one of the coolest books I own.
Ben