{"uid":"cap_gV0uyswzG19jUv3jyXzKX","slug":"x402-utils-arithmetic-expression-evaluator-f4f8e25d","name":"x402 Utils – Arithmetic Expression Evaluator","description":"Evaluate an arithmetic expression with 64 significant digits (no floating point surprises): operators, parentheses, powers, roots, logs, trigonometry, percentages, constants, units (5 inch to cm) and simple statistics.","url":"https://utils.kagurazaka.dev/v1/math?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","description":"the expression, such as 0.1 + 0.2 or sqrt(2) * 10^20 (up to 500 characters)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"expr":{},"type":{},"number":{},"result":{}}}}}}},"responseSchema":{"type":"json","example":{"expr":"0.1 + 0.2","type":"BigNumber","number":0.3,"result":"0.3"}},"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_csjtqyHJl86DaC97JS7Dj","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":"Evaluates arithmetic expressions with 64 significant digits of precision, supporting operators, functions (sqrt, log, trig), constants, units, and statistics","exampleAgentPrompt":"What is sqrt(2) * 10^20 calculated with high precision — I need the full accurate result, not a floating-point approximation?","exampleUseCases":[{"title":"Precise financial arithmetic","prompt":"Calculate 0.1 + 0.2 + 0.3 for me with full precision — I keep getting floating point rounding errors in my code and need the exact result."},{"title":"Unit conversion in expression","prompt":"What is 5 inches plus 3 centimeters expressed in centimeters? I need a precise numeric answer."},{"title":"Scientific formula evaluation","prompt":"Can you evaluate log(1000) + sin(pi/6) - sqrt(144) for me with at least 10 significant digits of precision?"}],"resultDescription":"Returns a JSON object containing the original expression (expr), the result type (e.g. 'BigNumber'), a standard JavaScript number approximation (number), and a high-precision string result (result) with up to 64 significant digits.","failureModes":["Expression exceeds 500 characters — server returns error","Invalid or malformed expression syntax — server returns parse error","Unsupported function or operator — server returns error","Division by zero — server returns error or Infinity","Missing required 'expr' query parameter — returns 400 error"],"whenToPreferThis":"Choose this endpoint when floating-point precision matters — e.g. financial calculations, scientific computing, or any scenario where standard IEEE 754 double precision is insufficient. It also handles unit conversions inline (e.g. '5 inch to cm') and supports a wide range of functions (trig, log, sqrt, percentages, statistics) making it a one-stop math evaluator without needing a full compute environment.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T07:07:48.699Z","isFirstParty":false,"canonicalSlug":"x402-utils-arithmetic-expression-evaluator-f4f8e25d"}