在GIS视图上发现部分小区不能正常呈现,经过跟踪异常小区发现其所属基站的经纬度坐标都是-1.#QNAN00000000000无效值,致使小区绘制失败,这些小区均属新入网的3G基站,资源数据尚未维护起来,数据库中对应字段为空,通过TUXEDO接口后数据反映为QNAN无效值。在基础数据完善以前,可在SQL取数据时将空值转化为0,或在接收数据时对此类数据做进一步的过滤。 此处的1.#QNAN是一个打印呈现,QNAN是指Quiet Not a Number,相似的浮点错误还有SNaN(Signaling Not a Number),一般如0.0/0.0、给负数开平方根等溢出或无效运算就会产生一个NAN结果的表示值,NaN及两种浮点错误的说明以下: The value NaN (Not a Number) is used to represent a value that does not represent a real number. NaN’s are represented by a bit pattern with an exponent of all 1s and a non-zero fraction. There are two categories of NaN: QNaN (Quiet NaN) and SNaN (Signalling NaN). A QNaN is a NaN with the most significant fraction bit set. QNaN’s propagate freely through most arithmetic operations. These values pop out of an operation when the result is not mathematically defined. An SNaN is a NaN with the most significant fraction bit clear. It is used to signal an exception when used in operations. SNaN’s can be handy to assign to uninitialized variables to trap premature usage. Semantically, QNaN’s denote indeterminate operations, while SNaN’s denote invalid operations. If a return value is a QNaN, it means that it is impossible to determine the result of the operation, a SNaN means that the operation is invalid. 这样的特殊浮点数还有INF和IND:INF就是Infinity,表示一个无穷大的数,包括正无穷和负无穷;IND则表示无限小,但不肯定。如1.0/0.0会产生一个INF无穷大,-1.0/0.0会产生一个负无穷大。