{"id":"float-ieee754-convert","version":"1.0.0","description":"Convert binary16/32/64 decimal values and exact hex bits, returning fields, class, and the exact stored decimal.","supported_operations":["IEEE 754 float32 to hexadecimal bits encode decode","show exact decimal stored by a float","decode binary64 hex sign exponent fraction","convert decimal to half precision binary16","classify NaN infinity subnormal negative zero","inspect floating point bit pattern","round decimal to nearest representable float"],"unsupported_operations":["decimal floating-point formats","alternative rounding modes","NaN payload selection when encoding decimal NaN"],"semantics":["Implements IEEE 754-2019 binary interchange encodings; standard_version is IEEE 754-2019; Python 3.12 struct.","Decimal finite input is parsed as an exact rational and rounded once to nearest representable binary16, binary32, or binary64 with ties to even; no JavaScript Number conversion is used.","exact_decimal is the exact finite dyadic value in ordinary decimal notation; special tokens are NaN, Infinity, -Infinity, and -0. Decoding preserves every NaN payload in hex while classifying it as nan.","max_input_bytes bounds the UTF-8 byte length of JSON.stringify(input), including keys, punctuation, and every field. Field bounds apply together with this whole-input bound.","The explicit decimal exponent e or E must be an integer from -400 through 400 inclusive; an exponent outside that range is invalid_input, including for zero-valued input. max_decimal_input_bytes bounds the decimal value string. Hex input has exactly 4, 8, or 16 characters according to format.","Every negative zero decimal spelling, including -0, -0.0, and -0e5, encodes only the sign bit and returns classification negative_zero, sign 1, and exact_decimal -0."],"limits":{"max_input_bytes":256,"max_decimal_input_bytes":128,"max_decimal_exponent":400,"max_output_bytes":8192},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["format","direction","value"],"properties":{"format":{"type":"string","enum":["binary16","binary32","binary64"]},"direction":{"type":"string","enum":["decimal_to_hex","hex_to_decimal"]},"value":{"type":"string","minLength":1,"maxLength":128}}},"output_schema":{"type":"object","additionalProperties":false,"required":["standard_version","format","hex","classification","sign","biased_exponent","exponent_bits","fraction_bits","exact_decimal"],"properties":{"standard_version":{"type":"string"},"format":{"type":"string","enum":["binary16","binary32","binary64"]},"hex":{"type":"string","minLength":4,"maxLength":16,"pattern":"^[0-9a-f]+$"},"classification":{"type":"string","enum":["zero","negative_zero","subnormal","normal","infinity","nan"]},"sign":{"type":"integer","minimum":0,"maximum":1},"biased_exponent":{"type":"integer","minimum":0,"maximum":2047},"exponent_bits":{"type":"string","minLength":5,"maxLength":11,"pattern":"^[01]+$"},"fraction_bits":{"type":"string","minLength":10,"maxLength":52,"pattern":"^[01]+$"},"exact_decimal":{"type":"string","minLength":1,"maxLength":1200}}},"examples":[{"input":{"format":"binary32","direction":"decimal_to_hex","value":"0.1"},"output":{"standard_version":"IEEE 754-2019; Python 3.12 struct","format":"binary32","hex":"3dcccccd","classification":"normal","sign":0,"biased_exponent":123,"exponent_bits":"01111011","fraction_bits":"10011001100110011001101","exact_decimal":"0.100000001490116119384765625"}},{"input":{"format":"binary16","direction":"hex_to_decimal","value":"8000"},"output":{"standard_version":"IEEE 754-2019; Python 3.12 struct","format":"binary16","hex":"8000","classification":"negative_zero","sign":1,"biased_exponent":0,"exponent_bits":"00000","fraction_bits":"0000000000","exact_decimal":"-0"}}],"execute_url":"/v1/tools/float-ieee754-convert/versions/1.0.0/execute"}