Open magnetophon opened 4 years ago
There are still several definitions in maths.lib that do no work with all non C/C++ backends. This INFINITY specific case can probably be solved by added the value explicitly, but this problem has to be revisited more deeply.
Here is a list of functions from maths.lib
that are not exist in wasm backend, calling them will result a calling foreign function [func_name] is not allowed in this compilation mode!
error.
They can be "polyfilled" manually, as examples in wasm backend:
isnan(x) = x != x;
isinf(x) = (x == inf) | (x == -inf) with { inf = 2 * ma.INFINITY; };
note: ma.INFINITY
returns singleprecision INFINITY = 3.402823466e+38;
but not the actual Infinity
value, while 2 * ma.INFINITY
does.
For example, when I try to compile
process = ba.slidingMinN(8,8);
I get: