forked from Mirror/wren
Add Num.[max/min]SafeInteger (#874)
This commit is contained in:
committed by
GitHub
parent
61cc6cb745
commit
28da4b449c
@ -35,6 +35,17 @@ The largest representable numeric value.
|
||||
|
||||
The smallest positive representable numeric value.
|
||||
|
||||
### Num.**maxSafeInteger**
|
||||
|
||||
The largest integer that Wren can safely represent. It's a constant value of `9007199254740991`.
|
||||
|
||||
This is relevant because Wren uses double precision [floating-point format](https://en.wikipedia.org/wiki/IEEE_floating_point)
|
||||
for numbers, which can only safely represent integers between <code>-(2<sup>53</sup> - 1)</code> and <code>2<sup>53</sup> - 1</code>.
|
||||
|
||||
### Num.**minSafeInteger**
|
||||
|
||||
The smallest integer Wren can safely represent. It's a constant value of `-9007199254740991`.
|
||||
|
||||
## Methods
|
||||
|
||||
### **abs**
|
||||
|
||||
Reference in New Issue
Block a user