IsXsDouble🔗
Check that
text is a valid xs:double.
We check that the text matches the pattern of xs:double, and
that it does not overflow,
i.e.
, that it does not round to infinity unless it
is INF or -INF. See XsDoubleOverflowThreshold.
Code
if not matches_xs_double(text):
return False
if text == "INF" or text == "-INF" or text == "NaN":
return True
return _is_decimal_magnitude_below(text, Xs_double_overflow_threshold)