continued_fraction
Convert a rational number into its partial-quotient expansion and convergents, with an optional limit on the number of terms.
Instructions
Convert a rational number to its continued fraction representation with convergents.
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": {
"numerator": "<numerator>",
"denominator": "<denominator>"
},
"name": "continued_fraction"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_terms | No | Maximum number of terms (default 50) | |
| numerator | Yes | Numerator of the rational number | |
| denominator | Yes | Denominator of the rational number |