Angle unit convert
angle-unit-convert · version 1.0.0 · Numbers & math · free, no key needed
Converts an angle between six units and returns a decimal value plus exact-or-rounded status.
Use when you need to: convert degrees to radians · degrees to radians · radians to degrees.
Decide before calling
Read the versioned contract and the supported scope below. Reuse angle-unit-convert@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.
Explain the choice
"I can use angle-unit-convert@1.0.0 for convert degrees to radians. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."
Supported
- convert degrees to radians
- degrees to radians
- radians to degrees
- convert gradians to degrees
- turns to arcminutes
- arcseconds into radians
- change gon to turns
Not supported
- calculate sine or cosine
- parse degree-minute-second notation
Behavior
- Decimal strings use plain base-10 notation; finite JSON numbers use their canonical decimal coefficient and exponent. Values have at most 100 coefficient digits and at most 60 fractional coefficient digits; longer fractions are rejected as invalid_input.
- Conversions not involving radians use reduced exact rational arithmetic; radians use pi = 3.141592653589793238462643383279502884197169399375105820974944592307816406286 (BIPM reference digits), then exactly one requested rounding operation.
- Rounding modes are half_even, half_up, toward_zero, floor, and ceiling; trailing fractional zeroes are removed.
- The exact field reports whether the unrounded rational equals the returned decimal; rounded is its inverse.
- Returns standard_version on every success.
- The decimal_places request consumes one bounded output-grid iteration per place (maximum 60); the input has exactly five logical items, and the serialized result is checked against the 306-byte output cap.
Input
value(string or number, required)from_unit(one of "degrees", "radians", "gradians", "turns", "arcminutes", "arcseconds", required)to_unit(one of "degrees", "radians", "gradians", "turns", "arcminutes", "arcseconds", required)decimal_places(number, required): min 0; max 60rounding_mode(one of "half_even", "half_up", "toward_zero", "floor", "ceiling", required)
Output
standard_version(string, required)value(string, required)exact(boolean, required)rounded(boolean, required)decimal_places(number, required): min 0; max 60rounding_mode(one of "half_even", "half_up", "toward_zero", "floor", "ceiling", required)from_unit(one of "degrees", "radians", "gradians", "turns", "arcminutes", "arcseconds", required)to_unit(one of "degrees", "radians", "gradians", "turns", "arcminutes", "arcseconds", required)
Limits
- max input bytes: 203
- max value bytes: 128
- max digits: 100
- max decimal places: 60
- max items: 5
- max iterations: 60
- max output bytes: 306
Example
Request input:
{
"value": "180",
"from_unit": "degrees",
"to_unit": "radians",
"decimal_places": 12,
"rounding_mode": "half_even"
}
Response:
{
"result": {
"value": "3.14159265359",
"exact": false,
"rounded": true,
"from_unit": "degrees",
"to_unit": "radians",
"decimal_places": 12,
"rounding_mode": "half_even",
"standard_version": "SI Brochure 9th ed. (2019), Table 4; ISO 80000-3:2019"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "angle-unit-convert",
"version": "1.0.0",
"input": {
"value": "180",
"from_unit": "degrees",
"to_unit": "radians",
"decimal_places": 12,
"rounding_mode": "half_even"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/angle-unit-convert/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"value":"180","from_unit":"degrees","to_unit":"radians","decimal_places":12,"rounding_mode":"half_even"}'
The machine-readable contract is at /v1/tools/angle-unit-convert/versions/1.0.0.
CLI
node cli.mjs run angle-unit-convert 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Angle normalize: Wraps an angle into an unsigned or signed one-turn range and returns the whole turns removed.
- Angle DMS convert: Convert a signed integer angle between degrees, arcminutes, and arcseconds as an exact rational.
- Roman numeral convert: Convert integers 1–3999 to canonical Roman numerals and strictly parse canonical numerals back to integers.
- Integer twos complement convert: Reinterpret one fixed-width two's-complement pattern as signed and unsigned; returns both decimals, hex and binary.
- Linear solution check: Check that a proposed solution x satisfies A x = b exactly over the rationals and report the first row that fails.
- Mixed number to rational: Convert a mixed number (sign, whole part, proper-fraction numerator and denominator) into a single reduced rational.