sw23.github.io
Convert between FP64, FP32, FP16, BF16, TF32, FP8, FP6, FP4, MX and integer formats. See bits, hex and precision loss under all five IEEE 754 rounding modes.
First seen 2026-11-05 · Last seen 2026-11-05 · Source: webmcp.com
Answer 2 · Act 3 · Transact 0 · Score: Not yet scored
Tool inspector
encode_number
Encode a decimal number (or special value like Infinity / NaN) into a specified floating-point or integer format. Returns binary, hex, and component breakdown.
Page: /fp-conv/
Input schema
| Property | Type | Required | Description |
|---|---|---|---|
value |
number,string | yes | The value to encode. Accepts a number, hex string (e.g. "0xFF"), or keyword ("infinity", "-infinity", "nan"). |
format |
string,object | yes | 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 |
string | no | Rounding mode for encoding the value. Options: "tiesToEven" (default, IEEE 754), "tiesToAway", "towardZero", "towardPositive", "towardNegative". |
overflowMode |
string | no | 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. |
Raw JSON schema
{
"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"
]
}
Similar websites
morphus.myles4miles.chatgpt.site
Morphus is an AI-native workspace for designing worlds and generating playable game experiences.
damnpdfs.com
Install the DamnPDFs Codex plugin, pair a browser workspace and use PDF, image and file tools from your coding agent. Includes setup and privacy limits.
insignifi4nt.github.io
broCAD/M: local-first CAD and CAM for parametric design, wire EDM planning, simulation and controller export.
cabinet.varera.studio
The Cartographer's Cabinet