stern_brocot_tree
Find a rational approximation for a positive number using the Stern-Brocot tree and continued fractions, with an optional maximum denominator.
Instructions
Find best rational approximation using the Stern-Brocot tree and 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": {
"target": "<target>"
},
"name": "stern_brocot_tree"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | Positive number to approximate | |
| max_denominator | No | Maximum denominator allowed (default 1000) |