Validates whether a number falls within specified bounds using precise mathematical comparison. Access via MCP in Cursor or Windsurf, or call GET /v1/math/is-between with parameters. Returns boolean true/false with configurable inclusive/exclusive boundaries. Eliminates floating-point comparison errors that plague manual range checks.
curl "https://tinyfn.io/v1/math/is-between" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/math/is-between', {
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-between',
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"
}
}
}
}
Set inclusive=true (default) when calling is-between. For example, checking if 5 is between 1 and 10 inclusively returns true.
Inclusive bounds include the boundary values (≤, ≥), while exclusive bounds exclude them (<, >). Use inclusive=false for exclusive checking.
Yes, AI agents can call is-between to validate inputs like ages (18-65), percentages (0-100), or temperature ranges before processing.
Yes, it uses proper numeric comparison that avoids common floating-point arithmetic errors that occur with manual range checking.
The function will return false since no number can logically fall within an invalid range where min > max.