8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 15:23:02 +01:00
This commit is contained in:
AlexPeshkoff 2017-03-16 17:44:21 +03:00
parent 0fc68ab8ea
commit 13796677e3

View File

@ -407,6 +407,15 @@ short Decimal64::totalOrder(Decimal64 op2) const
return decDoubleToInt32(&r, &context2, DEC_ROUND_HALF_UP);
}
/*
* decCompare() implements SQL function COMPARE_DECFLOAT() which has non-traditional return values.
* COMPARE_DECFLOAT (X, Y)
* 0 - X == Y
* 1 - X < Y
* 2 - X > Y
* 3 - values unordered
*/
short Decimal64::decCompare(Decimal64 op2) const
{
if (decDoubleIsNaN(&dec) || decDoubleIsNaN(&op2.dec))
@ -867,6 +876,15 @@ short Decimal128::totalOrder(Decimal128 op2) const
return decQuadToInt32(&r, &context2, DEC_ROUND_HALF_UP);
}
/*
* decCompare() implements SQL function COMPARE_DECFLOAT() which has non-traditional return values.
* COMPARE_DECFLOAT (X, Y)
* 0 - X == Y
* 1 - X < Y
* 2 - X > Y
* 3 - values unordered
*/
short Decimal128::decCompare(Decimal128 op2) const
{
if (decQuadIsNaN(&dec) || decQuadIsNaN(&op2.dec))