{"uid":"cap_2d-TCv2d-qOTXjX-Vplgf","slug":"saylor-innovations-math-expression-evaluator-7d9c2431","name":"Saylor Innovations Math Expression Evaluator","description":"Math expression evaluator - arithmetic, powers, percent, factorial and functions like sqrt, log and sin","url":"https://saylorinnovations.com/api/math/eval?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["expr"],"properties":{"expr":{"type":"string","examples":["(2+3)*sqrt(16)/7","5! + log10(1000)","15% * 2400"],"maxLength":500,"description":"Arithmetic expression: + - * / ^ ( ) ! %, functions such as sqrt, abs, ln, log10, sin, cos, round, min, max, and constants pi, e"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"json"},"example":{"type":"object","required":["expression","result"],"properties":{"method":{"type":"string","description":"Parser used and the supported functions"},"result":{"type":"number","description":"Exact double-precision result"},"rounded":{"type":"number","description":"Result rounded to 12 significant digits"},"checked_at":{"type":["string","null"],"description":"Time the check was run (UTC)"},"expression":{"type":"string","description":"The expression that was evaluated"},"is_integer":{"type":"boolean","description":"True when the result is a whole number"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_inJkeExKevGz7MyWhdY-P","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Evaluates arithmetic math expressions including operators, powers, percentages, factorials, and functions like sqrt, log, and sin","exampleAgentPrompt":"Can you calculate (2+3)*sqrt(16)/7 for me and tell me the exact result?","exampleUseCases":[{"title":"Percentage discount calculation","prompt":"What is 15% of 2400? Can you evaluate that expression and give me the precise number?"},{"title":"Factorial plus logarithm","prompt":"Compute 5! + log10(1000) for me and tell me whether the result is a whole number."},{"title":"Trigonometric formula evaluation","prompt":"I need to evaluate sin(pi/6) + cos(pi/3) — what does that come out to?"}],"resultDescription":"Returns a JSON object with the original expression string, the exact double-precision floating-point result, a result rounded to 12 significant digits, a boolean indicating whether the result is a whole number, the parser/method used, and a UTC timestamp of when the evaluation ran.","failureModes":["Invalid or malformed expression returns an error — e.g. unmatched parentheses or unknown function names","Expression exceeds 500-character limit results in rejection","Division by zero or undefined mathematical operations may return an error or Infinity","Missing required 'expr' query parameter causes a 400-level error"],"whenToPreferThis":"Choose this endpoint when an agent needs to evaluate a user-supplied math expression server-side without running code locally, especially for expressions involving scientific functions (sqrt, log, sin, cos), factorials, percentages, or constants like pi and e. Ideal for sandboxed environments where executing arbitrary code is unsafe or unavailable.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-17T12:41:18.962Z","isFirstParty":false,"canonicalSlug":"saylor-innovations-math-expression-evaluator-7d9c2431"}