retroforth/book/Programming-Techniques-Working-With-Floating-Point
crc 82ac0e1227 more work on the book
FossilOrigin-Name: b4d7f3d85ae7c64c9977d43675afc61347635edf0b3f6d4a7f12e38c0ccc151e
2019-03-15 14:23:47 +00:00

22 lines
518 B
Text

# Working With Floating Point
Some RETRO systems include support for floating point numbers.
When present, this is built over the system `libm` using the
C `double` type.
Floating point values are typically 64 bit IEEE 754 double
precision (1 bit for the sign, 11 bits for the exponent, and
the remaining 52 bits for the value), i.e. 15 decimal digits
of precision.
## Prefix
Floating point numbers start with a `.`
Examples:
Token Value
.1 1.0
.0.5 0.5
.-.4 -0.4
.1.3 1.3