Closed olleharstedt closed 5 years ago
I saw IntArith module, but no FloatArith. If you give me some guidlines, I can try to implement it.
At the moment, there's just no support for floats in malfunction. It's on my list, though! It'll need to be added in quite a few places: lexer, parser, interpreter, compiler, spec and testsuite.
Better to use vectors of length 1 for references?
Correct, since blocks are immutable. (Currently, there's no support for OCaml's records of mixed mutable and immutable fields).
OK, good info. Yes, I understand it will be a deep change.
FYI, I forked your project and started to work on float values.
@stedolan I would greatly appreciate if you add float values to the spec. In fact , I am only interested in float literals, since I can already use any Ocaml function.
It is for an agda backend. It is starting to work . It just needs floats (and unicode strings which can be mapped into MLF strings , and uchars which can be mapped to MLF Ints.)
Floating-point support just added! Testsuite is limited, though, there's no serious testing of rounding / precision / conversions, etc.
Hi!
How about adding a chapter to the spec about floats? This is what I've tried so far:
but
The malf code (trying to make
ref a = 1.0
):Better to use vectors of length 1 for references?