API & MCP
Everything a person can do on Floating-Point Explorer, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://floatingpointexplorer.usefulweb.site/api/v1/calculate– run Floating-Point ExplorerGET https://floatingpointexplorer.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Floating-Point Explorer
Shows the sign, exponent and fraction bits of a decimal number in IEEE-754 binary16, binary32 or binary64, the exact decimal value that is actually stored (computed with big integers), the rounding error, the ULP and the neighbouring representable numbers. Evaluates expressions such as 0.1 + 0.2 step by step and explains subnormals, infinities and NaN.
| Field | Type | Default | Description |
|---|---|---|---|
value (required) | text | "0.1" | Number, expression or bit pattern. A decimal (0.1, -6.02e23), an expression with + − * / and parentheses, NaN / Infinity, or a bit pattern 0x… / 0b…. |
format | select (binary64, binary32, binary16) | "binary64" | Format |
Example request
0.1 as a double
curl -X POST https://floatingpointexplorer.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"value":"0.1","format":"binary64"}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://floatingpointexplorer.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
floating_point_explorer - Local stdio connector:
node src/mcp-stdio.ts --tool=floating-point-explorer
{
"mcpServers": {
"floating-point-explorer": { "type": "http", "url": "https://floatingpointexplorer.usefulweb.site/mcp" }
}
}