chsasank / llama.lisp

Lisp dialect designed for HPC and AI
GNU Lesser General Public License v2.1
15 stars 6 forks source link

Floating-point support #18

Closed GlowingScrewdriver closed 5 months ago

GlowingScrewdriver commented 5 months ago

Support for floating-point numbers in Brilisp. We will use double-precision floats, and ordered comparison for logic. There is also a new runtime function, fprint, used to print floating-point numbers.

Fix #17

GlowingScrewdriver commented 5 months ago

The following tests are ported and passing from BRIL:

GlowingScrewdriver commented 5 months ago

Currently, the floating-point comparisons are ordered. This means if either (or both) of the operands is a QNaN value ("Quiet NaN"), the result is false.

GlowingScrewdriver commented 5 months ago

Added a new test that isn't in Bril: float_nan_detect. Used to ensure that NaN values can be detected by the program. This depends on the fact that comparisons are ordered.