Skip to main content

Module value

Module value 

Source
Expand description

NaN-boxed values.

A Value is one 64-bit word. Doubles are stored as themselves; the negative quiet-NaN space with the top 16 bits in 0xFFF9..=0xFFFC encodes everything else:

top 16 bitspayload
0xFFF948-bit heap pointer
0xFFFA48-bit signed small integer
0xFFFBspecial: nil (0), false (2), true (3), and internal markers

Every NaN produced by arithmetic is canonicalized to 0x7FF8_0000_0000_0000, so no float ever collides with a tag.

Structs§

Value

Constants§

SMALL_INT_MAX
SMALL_INT_MIN

Functions§

fits_small