The example shows adding many floating numbers. Division by zero is not valid in JSON, although zero is valid, but the output shown of the example does not include zero.
I had written a C library which can encode DER and has a similar interface.
compressedgas · 3h ago
The float array should contain three nulls as that is what JSON.stringify would encode. The example and its results are out of sync with the actual code. They do not match what the code as of tsoding-jim-6e9a8f9 which would produce the expected results as jim_float checks for NaN and Inf and produces a null.
I had written a C library which can encode DER and has a similar interface.