bad floating point exception

Mike - EMAIL IGNORED m_d_berger_1900 at yahoo.com
Fri Jul 27 20:55:17 UTC 2007


On Fri, 27 Jul 2007 13:20:46 -0700, stan wrote:

> On Fri, 27 Jul 2007 14:26:39 -0400
> Mike - EMAIL IGNORED <m_d_berger_1900 at yahoo.com> wrote:
> 
>> On FC4, with:
>> $ g++ --version
>> g++ (GCC) 4.0.2 20051125 (Red Hat 4.0.2-8)
>> 
>> I ran, in essence:
>> 
>>    unsigned    x = <seconds in the epoch>;
>>    unsigned    y = 0; // an error
>>    if (x % y == 0)
>>       ...
>> 
>> I got a floating point exception.  Peculiar?
>> 
>> Mike.
>> 
>> 
> Division by zero.  Normal.

But it is not a floating point operation, they
are unsigned integers.  At least on older systems
that I am familiar with, it is different hardware.

Mike.





More information about the users mailing list