calculator
Evaluate mathematical expressions and perform statistical calculations using Python syntax. Supports arithmetic operations, math functions, and custom variables for cryptocurrency data analysis.
Instructions
Safely evaluates a mathematical or statistical expression string using Python syntax.
Supports arithmetic operations (+, -, *, /, **, %, //), list expressions, and a range of math and statistics functions:
abs, round, min, max, len, sum, mean, median, stdev, variance, sin, cos, tan, sqrt, log, exp, floor, ceil, etc.
Custom variables can be passed via the 'variables' dict, including lists for time series data.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
expression | Yes | ||
variables | Yes |
Input Schema (JSON Schema)
{
"properties": {
"expression": {
"title": "Expression",
"type": "string"
},
"variables": {
"additionalProperties": true,
"title": "Variables",
"type": "object"
}
},
"required": [
"expression",
"variables"
],
"type": "object"
}