mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 04:03:03 +01:00
Another try to fix CORE-5570 - Negative infinity (double) shown incorrectly without sign in isql - without breaking MSVC build.
This commit is contained in:
parent
6af61deaf9
commit
830372f0b9
@ -232,4 +232,15 @@ inline bool isinf(F x)
|
||||
#endif // isinf
|
||||
#endif // WIN_NT
|
||||
|
||||
namespace Firebird {
|
||||
inline bool isNegativeInf(double x)
|
||||
{
|
||||
#ifdef WIN_NT
|
||||
return _fpclass(x) == _FPCLASS_NINF;
|
||||
#else
|
||||
return x == -INFINITY;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#endif //CLASSES_FPE_CONTROL_H
|
||||
|
@ -6894,7 +6894,7 @@ static bool checkSpecial(TEXT* const p, const int length, const double value)
|
||||
if (isnan(value))
|
||||
t = "NaN";
|
||||
else if (isinf(value))
|
||||
t = "Infinity";
|
||||
t = Firebird::isNegativeInf(value) ? "-Infinity" : "Infinity";
|
||||
else
|
||||
return false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user