IsXsFloat🔗

Type: Transpilable verification function
Check that text is a valid xs:float.

We check that the text matches the pattern of xs:float, and that it does not overflow, i.e. , that it does not round to infinity unless it is INF or -INF. See XsFloatOverflowThreshold.

See: https://www.w3.org/TR/xmlschema-2/#float

text🔗
Text to be checked
Return🔗
True if the text is a valid xs:float

Code

if not matches_xs_float(text):
    return False

if text == "INF" or text == "-INF" or text == "NaN":
    return True

return _is_decimal_magnitude_below(text, Xs_float_overflow_threshold)