1
0
forked from Mirror/wren

Add Num.[max/min]SafeInteger (#874)

This commit is contained in:
Chayim Refael Friedman
2021-04-08 07:45:00 +03:00
committed by GitHub
parent 61cc6cb745
commit 28da4b449c
4 changed files with 18 additions and 0 deletions

View File

@ -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**