Tool tree
gradeNot graded
list_formatsAnswer
List all available floating-point and integer format presets supported by this converter. Returns format keys, names, categories, and parameters (bits, exponent, mantissa, etc.).
View tool JSON
{
"name": "list_formats",
"kind": "answer",
"impl": "imperative",
"description": "List all available floating-point and integer format presets supported by this converter. Returns format keys, names, categories, and parameters (bits, exponent, mantissa, etc.).",
"inputSchema": {
"type": "object",
"properties": {},
"required": []
},
"page": "/fp-conv/"
}encode_numberAction
Encode a decimal number (or special value like Infinity / NaN) into a specified floating-point or integer format. Returns binary, hex, and component breakdown.
View tool JSON
{
"name": "encode_number",
"kind": "act",
"impl": "imperative",
"description": "Encode a decimal number (or special value like Infinity / NaN) into a specified floating-point or integer format. Returns binary, hex, and component breakdown.",
"inputSchema": {
"type": "object",
"properties": {
"value": {
"type": [
"number",
"string"
],
"description": "The value to encode. Accepts a number, hex string (e.g. \"0xFF\"), or keyword (\"infinity\", \"-infinity\", \"nan\")."
},
"format": {
"type": [
"string",
"object"
],
"description": "Format preset key (e.g. \"fp32\", \"int8\") or custom format object. For floating-point: { signBits, exponentBits, mantissaBits, bias?, hasInfinity?, hasNaN?, hasSubnormals? }. For integer: { bits, signed, fractionBits?, symmetric? }."
},
"roundingMode": {
"type": "string",
"description": "Rounding mode for encoding the value. Options: \"tiesToEven\" (default, IEEE 754), \"tiesToAway\", \"towardZero\", \"towardPositive\", \"towardNegative\".",
"enum": [
"tiesToEven",
"tiesToAway",
"towardZero",
"towardPositive",
"towardNegative"
]
},
"overflowMode": {
"type": "string",
"description": "What an out-of-range magnitude becomes. \"overflow\" produces Infinity (or NaN when the format has no Infinity); \"saturate\" clamps to the largest finite value. Omit to use the per-format default (overflow for formats with Infinity, saturate otherwise). IEEE 754 §7.4 directed rounding still clamps finite overflow regardless of this setting.",
"enum": [
"saturate",
"overflow"
]
}
},
"required": [
"value",
"format"
]
},
"page": "/fp-conv/"
}decode_bitsAction
Decode a binary or hexadecimal bit-pattern into a specified format. Returns the decimal value and full component breakdown.
View tool JSON
{
"name": "decode_bits",
"kind": "act",
"impl": "imperative",
"description": "Decode a binary or hexadecimal bit-pattern into a specified format. Returns the decimal value and full component breakdown.",
"inputSchema": {
"type": "object",
"properties": {
"bits": {
"type": "string",
"description": "Bit-pattern as a binary string (e.g. \"0100000001001000\") or hex string with 0x prefix (e.g. \"0x4048\")."
},
"format": {
"type": [
"string",
"object"
],
"description": "Format preset key (e.g. \"fp16\") or custom format object."
}
},
"required": [
"bits",
"format"
]
},
"page": "/fp-conv/"
}convert_formatAction
Convert a value or bit pattern from one floating-point or integer format to another. Returns full encoding details for both formats and precision loss analysis.
View tool JSON
{
"name": "convert_format",
"kind": "act",
"impl": "imperative",
"description": "Convert a value or bit pattern from one floating-point or integer format to another. Returns full encoding details for both formats and precision loss analysis.",
"inputSchema": {
"type": "object",
"properties": {
"value": {
"type": [
"number",
"string"
],
"description": "The value to convert. Accepts a number, hex string (read as an integer, e.g. \"0xFF\" is 255), or keyword. Exactly one of \"value\" and \"bits\" is required."
},
"bits": {
"type": "string",
"description": "The source as a bit pattern in the input format, binary (e.g. \"0011110000000000\") or hex with 0x prefix (e.g. \"0x3C00\"), read as decode_bits reads it and converted exactly as given. Use it to convert an exact encoding such as a NaN with a sign and payload. Exactly one of \"value\" and \"bits\" is required."
},
"inputFormat": {
"type": [
"string",
"object"
],
"description": "Source format preset key or custom format object."
},
"outputFormat": {
"type": [
"string",
"object"
],
"description": "Target format preset key or custom format object."
},
"roundingMode": {
"type": "string",
"description": "Rounding mode for encoding into the output format; the source operand is built with the input format's defaults. Options: \"tiesToEven\" (default, IEEE 754), \"tiesToAway\", \"towardZero\", \"towardPositive\", \"towardNegative\".",
"enum": [
"tiesToEven",
"tiesToAway",
"towardZero",
"towardPositive",
"towardNegative"
]
},
"overflowMode": {
"type": "string",
"description": "What an out-of-range output magnitude becomes; the source operand is built with the input format's defaults. \"overflow\" produces Infinity (or NaN when the format has no Infinity); \"saturate\" clamps to the largest finite value. Omit to use the per-format default. IEEE 754 §7.4 directed rounding still clamps finite overflow regardless.",
"enum": [
"saturate",
"overflow"
]
},
"nanMode": {
"type": "string",
"description": "What a NaN source operand becomes; it has no effect on any other input. \"canonical\" gives the output format's canonical quiet NaN. \"preserve\" keeps the sign and as many high-order payload bits as fit, and quiets the result (IEEE 754-2019 §6.2.3). Default \"canonical\". Only a \"bits\" source has a payload to keep.",
"enum": [
"canonical",
"preserve"
]
}
},
"required": [
"inputFormat",
"outputFormat"
]
},
"page": "/fp-conv/"
}get_format_infoAnswer
Get detailed information about a floating-point or integer format, including value range (max/min normal, subnormal), bias, and special value support.
View tool JSON
{
"name": "get_format_info",
"kind": "answer",
"impl": "imperative",
"description": "Get detailed information about a floating-point or integer format, including value range (max/min normal, subnormal), bias, and special value support.",
"inputSchema": {
"type": "object",
"properties": {
"format": {
"type": [
"string",
"object"
],
"description": "Format preset key (e.g. \"bf16\") or custom format object."
}
},
"required": [
"format"
]
},
"page": "/fp-conv/"
}