Skip to main content
Glama
agmonetti

mathmethods-mcp

by agmonetti

root_bisection

Find a root of f(x) = 0 on a given interval using the bisection method, requiring opposite signs at the endpoints to guarantee convergence.

Instructions

Find a root of f(x) = 0 in [a, b] using the bisection method.

Requires f(a) and f(b) to have opposite signs (Bolzano's theorem).

Args: func_str: Math expression in x, e.g. "x**2 - 4". a: Left endpoint of the interval. b: Right endpoint of the interval (must be > a). tol: Convergence tolerance on the residual/error. max_iter: Maximum number of iterations. precision: Rounding digits for the reported root.

Returns: Dict with the root, convergence flag, iteration table and errors.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes
tolNo
func_strYes
max_iterNo
precisionNo

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/agmonetti/mathmethods-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server