feat: add Num.largest and Num.smallest static properties for float limits

Add two new static properties to the Num class: `Num.largest` returns `DBL_MAX`
and `Num.smallest` returns `DBL_EPSILON`. Include corresponding documentation
in the core module markdown and register the primitives in the VM core
initialization.
This commit is contained in:
Bob Nystrom
2016-08-28 00:18:21 +00:00
2 changed files with 21 additions and 0 deletions
+8
View File
@@ -13,6 +13,14 @@ It is a runtime error if `value` is not a string.
The value of π.
### Num.**largest**
The highest representable value of `Num`.
### Num.**smallest**
The difference between 1.0 and the next representable value for `Num`.
## Methods
### **abs**