Redondear a cifras significativas
significant-figuresRedondea un número a N cifras significativas, en notación normal y científica. Cuándo: un resultado numérico tiene que ser exacto o reproducible y no estimado. No para: redondear a N decimales con aritmética decimal exacta y modos half_up, half_even (round-number). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.
EN: Rounds a number to N significant figures and returns it in plain and scientific notation. When: a numeric result has to be exact or reproducible instead of estimated. Not for: rounding a number to N decimal places using exact decimal arithmetic (round-number). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | Number (number; required). | |
| digits | Yes | Significant figures (integer; required; min 1; max 17). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | No | any JSON value | |
| scientific | No |