MCPcopy Create free account
hub / github.com/documentdb/documentdb / IsBsonValueNaN

Function IsBsonValueNaN

pg_documentdb_core/src/query/bson_compare.c:939–952  ·  view source on GitHub ↗

returns true if bson value is (double)NaN or (Decimal128)NaN */

Source from the content-addressed store, hash-verified

937
938/* returns true if bson value is (double)NaN or (Decimal128)NaN */
939bool
940IsBsonValueNaN(const bson_value_t *value)
941{
942 if (value->value_type == BSON_TYPE_DECIMAL128)
943 {
944 return IsDecimal128NaN(value);
945 }
946 else if (value->value_type == BSON_TYPE_DOUBLE)
947 {
948 return isnan(BsonValueAsDouble(value));
949 }
950
951 return false;
952}
953
954
955/*

Callers 15

BsonValueGetCenterFunction · 0.85
BsonValueGetCenterSphereFunction · 0.85
SetGreaterThanBoundsFunction · 0.85
SetLessThanBoundsFunction · 0.85
HandleSliceInputDataFunction · 0.85
tdigest_add_doubleFunction · 0.85
tdigest_add_double_arrayFunction · 0.85

Calls 2

IsDecimal128NaNFunction · 0.85
BsonValueAsDoubleFunction · 0.85

Tested by

no test coverage detected