curatedapi

Scientific calculator

Roots, powers, logarithms, exponentials, trig and hyperbolic functions, and factorials, correctly rounded to up to 50 significant digits.

Function to apply. Options: sqrt: √x; cbrt: ∛x (real cube root); nth_root: the real y-th root of x (y a whole number from 2 to 1000); power: x^y; reciprocal: 1/x; exp: e^x; ln: natural logarithm of x; log10: base-10 logarithm of x; log2: base-2 logarithm of x; log_base: logarithm of x to base y; sin: sine of x; cos: cosine of x; tan: tangent of x; asin: inverse sine of x; acos: inverse cosine of x; atan: inverse tangent of x; sinh: hyperbolic sine of x; cosh: hyperbolic cosine of x; tanh: hyperbolic tangent of x; factorial: x! (x a whole number from 0 to 1000)
The argument.
Second argument for power, nth_root and log_base.
Unit for trig inputs and inverse-trig outputs. Options: radians: radians; degrees: degrees
More options: rounding and decimals
Precision and rounding
Rounding mode applied once to each result. Default half_even.
Round results to this many digits after the decimal point.
Round results to this many significant digits.

Examples

Result: sin(30°)

Result
The function value.
0.5 exact

Rounding: Half even, 20 significant digits. Calculator math/scientific@1.

How it is calculated

see function

Each function is evaluated with certified interval arithmetic and rounded correctly, so every returned digit is right. Exact cases stay exact: sqrt(2.25) is 1.5, log10(1000) is 3, sin(30°) is 0.5 and the cube root of -8 is -2.

  • Results larger than 1e100 in magnitude are rejected; results smaller than 1e-100 are reported as 0 with a warning.

References

Results follow each calculator's documented rules and the sources listed. They are not financial, tax or legal advice. Check that the rules fit your case before you rely on a result. See the terms.

Use it from your code

POST /v1/calc/math/scientificVersion 1
curl https://api.curatedapi.com/v1/calc/math/scientific \
  -H "Authorization: Bearer $CURATEDAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "function": "sin",
    "x": "30",
    "angle_unit": "degrees"
  }'
The same call in Python
import os

import requests

payload = {
    "function": "sin",
    "x": "30",
    "angle_unit": "degrees",
}
response = requests.post(
    "https://api.curatedapi.com/v1/calc/math/scientific",
    headers={"Authorization": f"Bearer {os.environ['CURATEDAPI_KEY']}"},
    json=payload,
    timeout=10,
)
print(response.json()["result"])
The same call in JavaScript
const payload = {
    "function": "sin",
    "x": "30",
    "angle_unit": "degrees",
};
const response = await fetch("https://api.curatedapi.com/v1/calc/math/scientific", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.CURATEDAPI_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify(payload),
});
console.log((await response.json()).result);

MCP tool calc_math_scientific at https://mcp.curatedapi.com. Inputs, outputs and errors in the API reference.

Put it on your website

<div data-curatedapi-widget="math/scientific" data-key="capi_public_…"></div>
<script src="https://widgets.curatedapi.com/v1/widget.js" async></script>

Use a public key registered for your site. Calculations are billed like API calls. How widgets work.

Related calculators

Add this calculator to your website

Paste two lines into your page and your visitors get this calculator. Each use counts as one call on your plan, the same as the API.

Free for up to 1,000 uses a month. 50,000 uses a month cost $9.00 on the Starter plan.