Porcentaje de un valor
percent-ofCalcula el p% de un valor y el valor aumentado o disminuido en p%. 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: Computes p% of a value, and optionally the value increased or decreased by p%. 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 |
|---|---|---|---|
| value | Yes | Base value (number; required). | |
| percent | Yes | Percent (number; required). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | No | any JSON value | |
| decreased | No | ||
| increased | No |