Skip to content

Commit f38cabf

Browse files
committed
Updating documentation
1 parent ca9a176 commit f38cabf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/TECHNICAL_DOCUMENTATION.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,13 @@ The rounding operation applies a power-of-10 scaling factor:
176176
Where $r$ is the number of decimal places specified by the `round` parameter.
177177

178178
#### Significant Digits (Precision)
179-
When precision is specified, the value is adjusted to show $p$ significant digits:
179+
When precision is specified ($p > 0$), the value is adjusted to show $p$ significant digits after rounding:
180180

181181
```math
182-
\text{precise\_value} = \text{toPrecision}(\text{value}, p)
182+
\text{precise\_value} = \text{toPrecision}(\text{rounded\_value}, p)
183183
```
184184

185-
This uses JavaScript's built-in precision formatting rather than mathematical rounding.
185+
The precision parameter takes precedence over round when both are specified. If scientific notation results (contains 'E'), the exponent is incremented and the calculation is repeated to avoid exponential notation in output.
186186

187187
### Overflow Handling
188188

0 commit comments

Comments
 (0)