Bril has an extension for computing on floating-point numbers.
The floating point extension adds one new base type:
Floating point numbers are 64-bit, double-precision IEEE 754 values. (There is no single-precision type.)
There are the standard arithmetic operations, which take two
float values and produce a new
It is not an error to
fdiv by zero; as in IEEE 754, the result is infinity.
There are also comparison operators, which take two
float values and produce a
float values with 17 decimal digits of precision, including trailing zeros.
(This is like using the
%.17lf format specifier in C’s
Positive and negative zero, while they are equal according to
feq, look different when printed.
Not-a-number values are printed as
NaN; infinite values are printed as the strings