Open kengruven opened 3 years ago
There's a bug in the value printer somewhere. I had to put special code in for float16 values since it's not a native format, so something broke along the way I bet.
Hmm, you're right that most of these issues are f16-specific. Even with f32/f64, though:
$ echo 'c1 |f32 -1|' | ./enctool convert -df cte
c0
|f32x 1|
Perhaps that's a separate bug.
Just to confirm, are |f32 1|
and |i32 1.0|
both considered valid?
In float arrays, enctool sometimes tries to write numbers in base-16, but doesn't quite use valid syntax:
The enctool parser correctly reports this as an error:
My first thought was that "1" is an int, not a float, and "f16" might be expecting only a float (despite there being only one 'numeric type'?). But it fails the same way for some floats, too:
It's not just forgetting the ".0" when writing base-16 values inside an array, though. There's something weirder going on. Here, it prints an invalid number, and also flips the sign: