Changeset 987


Ignore:
Timestamp:
Sep 27, 2011, 7:09:21 PM (11 years ago)
Author:
sam
Message:

real: fix a bug in the real number multiplication when one of the arguments
is zero.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/real.cpp

    r986 r987  
    263263{
    264264    real ret;
     265
     266    if (m_signexp << 1 == 0 || x.m_signexp << 1 == 0)
     267    {
     268        ret = (m_signexp << 1 == 0) ? *this : x;
     269        ret.m_signexp ^= x.m_signexp & 0x80000000u;
     270        return ret;
     271    }
    265272
    266273    ret.m_signexp = (m_signexp ^ x.m_signexp) & 0x80000000u;
Note: See TracChangeset for help on using the changeset viewer.