| Index: Source/WebCore/platform/Decimal.cpp
|
| ===================================================================
|
| --- Source/WebCore/platform/Decimal.cpp (revision 134891)
|
| +++ Source/WebCore/platform/Decimal.cpp (working copy)
|
| @@ -902,8 +902,8 @@
|
|
|
| Decimal Decimal::remainder(const Decimal& rhs) const
|
| {
|
| - const Decimal quotient = (*this / rhs).round();
|
| - return quotient.isSpecial() ? quotient : *this - quotient * rhs;
|
| + const Decimal quotient = *this / rhs;
|
| + return quotient.isSpecial() ? quotient : *this - (quotient.isNegative() ? quotient.ceiling() : quotient.floor()) * rhs;
|
| }
|
|
|
| Decimal Decimal::round() const
|
|
|