{"uid":"cap_wzxwh7tIVfer25oh3hVAJ","slug":"foundry-math-expression-evaluator-4a8dce0c","name":"Foundry Math Expression Evaluator","description":"Math calculator: safely evaluates an expression with + - * / % ^, parentheses, pi, e and functions like sqrt, sin, log. Input: '2^10 + sqrt(16)'.","url":"https://minty-sprout.onrender.com/v1/math-eval?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"input":{"type":"string","maxLength":8000,"description":"A math expression"}}},"responseSchema":{"type":"json","example":{"result":1028,"expression":"2^10 + sqrt(16)","result_str":"1028"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_C26sFziFPffn2sLEjZ6pD","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Safely evaluates mathematical expressions including arithmetic, exponentiation, trigonometry, logarithms, and constants like pi and e.","exampleAgentPrompt":"Can you calculate the result of 2^10 + sqrt(16) for me?","exampleUseCases":[{"title":"Scientific formula quick check","prompt":"What's the value of sin(pi/6) + log(100) divided by sqrt(25)?"},{"title":"Compound interest manual calculation","prompt":"Can you work out 1000 * (1 + 0.05)^12 for me so I know what my investment grows to?"},{"title":"Engineering unit conversion math","prompt":"Compute (180 / pi) * 1.5708 for me — I need to convert that radian value to degrees."}],"resultDescription":"Returns a JSON object containing the evaluated numeric result as a number, the original expression echoed back, and the result formatted as a string — e.g. {result: 1028, expression: '2^10 + sqrt(16)', result_str: '1028'}.","failureModes":["Invalid or malformed expression returns an error response","Division by zero in the expression may return an error or infinity","Unsupported functions or operators not in the allowed set will fail","Expressions exceeding 8000 characters will be rejected","Attempts to inject code or non-math constructs are safely blocked"],"whenToPreferThis":"Choose this endpoint when you need safe, sandboxed evaluation of math expressions that supports standard arithmetic operators, exponentiation, modulo, parentheses, common math constants (pi, e), and functions like sqrt, sin, cos, log — especially when you cannot or should not use a general-purpose code interpreter. Prefer it over a full code execution environment when the task is purely numerical and safety/sandboxing is a concern.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-01T06:57:42.756Z","isFirstParty":false,"canonicalSlug":"foundry-math-expression-evaluator-4a8dce0c"}