Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker.mit.edu!hsdndev!husc6!encore!pinocchio.encore.com From: jkenton@pinocchio.encore.com (Jeff Kenton) Newsgroups: comp.sys.m88k Subject: Re: floating point exceptions Message-ID: <13380@encore.Encore.COM> Date: 30 Nov 90 14:30:17 GMT References: Sender: news@Encore.COM Lines: 23 From article , by meissner@osf.org (Michael Meissner): > > I had forgotten about this gem when I sent mail to somebody comparing > MIPS and 88k from a compiler writer's viewpoint. If the number is >= > 2**30 and <= 2**31 it traps. It traps if the exponent is anything >= 30. This *could* cause an overflow of the range of 32-bit integers when the exponent is exactly 30 or 31, and always if the exponent is >= 32. It's up to the exception software in the kernel to decide. If the number is positive and the exponent is == 30, you can have overflow if the number is 0x7fffffff and rounding adds 1 to it. If the exponent is 31, you always have overflow unless the number is negative and equal to 0x80000000 after rounding. There -- I'm sure that makes everyone feel better. What would you have done if you didn't know that. ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ----- ----- jeff kenton: consulting at jkenton@pinocchio.encore.com ----- ----- until 11/30/90 -- always at (617) 894-4508 ----- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -----