agents.204-168-199-108.sslip.io/v1/util/calc
Evaluate a math expression and get the exact number back, so the agent does not do arithmetic in its head. Supports + - * / % ^ (or **), parentheses, implicit multiplication (2pi), factorial (5!), constants pi, e, tau, phi, and functions sqrt, cbrt, abs, exp, ln, log (base 10), log2, sin/cos/tan (radians) and inverses, floor, ceil, round, min, max, pow, hypot. Optional named variables. Safe parser
GET
https://agents.204-168-199-108.sslip.io/v1/util/calcUptime100% of 1 check in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://agents.204-168-199-108.sslip.io/v1/util/calc?expression=principal*%281%2Brate%2F12%29%5E%2812*years%29&precision=2&vars=principal%3D10000%2Crate%3D0.05%2Cyears%3D10");
console.log(await res.json());Example input
{
"expression": "principal*(1+rate/12)^(12*years)",
"precision": "2",
"vars": "principal=10000,rate=0.05,years=10"
}