# x402 Utils – Arithmetic Expression Evaluator

> x402 Utils – Arithmetic Expression Evaluator is a paid API for AI agents from utils.kagurazaka.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-30).

Evaluates arithmetic expressions with 64 significant digits of precision, supporting operators, functions (sqrt, log, trig), constants, units, and statistics

## Facts

- Endpoint: GET https://utils.kagurazaka.dev/v1/math?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-utils-arithmetic-expression-evaluator-f4f8e25d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gV0uyswzG19jUv3jyXzKX

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402-utils-arithmetic-expression-evaluator-f4f8e25d
```

Example prompt: What is sqrt(2) * 10^20 calculated with high precision — I need the full accurate result, not a floating-point approximation?

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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": {}
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "expr": "0.1 + 0.2",
  "type": "BigNumber",
  "number": 0.3,
  "result": "0.3"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-utils-arithmetic-expression-evaluator-f4f8e25d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from utils.kagurazaka.dev](https://www.zero.xyz/host/utils.kagurazaka.dev/llms.txt)
