best_rational_approximation
Find the best rational approximation to a decimal number with a denominator limit, using continued fractions for precise arithmetic calculations.
Instructions
Find best rational approximation to x with denominator ≤ max_denom. (Domain: arithmetic, Category: continued_fractions)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"x": "<x>",
"max_denom": "<max_denom>"
},
"name": "best_rational_approximation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| max_denom | Yes |