Qué porcentaje es X de Y
percent-ratioDevuelve qué porcentaje representa una parte de un total. Cuándo: un resultado numérico tiene que ser exacto o reproducible y no estimado. No para: calcular la variación porcentual entre un valor anterior y uno nuevo (percent-change). 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: Returns what percentage a part is of a whole (part / whole × 100). When: a numeric result has to be exact or reproducible instead of estimated. Not for: computing the percentage change from an old value to a new value (percent-change). 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 |
|---|---|---|---|
| part | Yes | Part (number; required). | |
| whole | Yes | Whole (number; required). | |
| decimals | No | Decimals (integer; optional; default 4; min 0; max 12). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| percent | No |