mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-12 17:32:32 +00:00
handle nan
This commit is contained in:
parent
33704888e5
commit
d0bfb4e1f5
@ -190,6 +190,8 @@ struct QuantileApproximateWeighted
|
||||
g = std::numeric_limits<UnderlyingType>::max();
|
||||
else if (yl + (dy / dx) * (level - xl) < std::numeric_limits<UnderlyingType>::min())
|
||||
g = std::numeric_limits<UnderlyingType>::min();
|
||||
else if (isNaN(yl + (dy / dx) * (level - xl)))
|
||||
g = std::numeric_limits<UnderlyingType>::quiet_NaN();
|
||||
else
|
||||
g = yl + (dy / dx) * (level - xl);
|
||||
|
||||
@ -312,6 +314,8 @@ struct QuantileApproximateWeighted
|
||||
g = std::numeric_limits<UnderlyingType>::max();
|
||||
else if ((yl + (dy / dx) * (level - xl)) < std::numeric_limits<UnderlyingType>::min())
|
||||
g = std::numeric_limits<UnderlyingType>::min();
|
||||
else if (isNaN(yl + (dy / dx) * (level - xl)))
|
||||
g = std::numeric_limits<UnderlyingType>::quiet_NaN();
|
||||
else
|
||||
g = yl + (dy / dx) * (level - xl);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user