Check if a number equals exactly zero with precise floating-point handling. Use via MCP in Cursor or Windsurf, or call GET /v1/math/is-zero directly. Returns boolean true/false for any numeric input. Handles edge cases like -0.0, scientific notation, and floating-point precision that simple equality checks miss.
curl "https://tinyfn.io/v1/math/is-zero" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/math/is-zero', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/math/is-zero',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's math tools:
{
"mcpServers": {
"tinyfn-math": {
"url": "https://tinyfn.io/mcp/math",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
It performs exact zero comparison, distinguishing between 0.0 and values like 1e-15 that appear zero but aren't mathematically zero.
Yes, both positive and negative zero return true, following IEEE 754 standards for zero equality.
Absolutely — AI agents in Cursor, Windsurf, or Cline can call is-zero to verify calculations or validate numeric inputs in your code.
It accepts integers, decimals, and scientific notation (like 0e10) as query parameters or JSON payload.
It provides deterministic results across languages and handles edge cases consistently, preventing bugs from language-specific zero comparison quirks.