Closed magnetophon closed 4 years ago
I understand the code does some computation at compile time that produce an INFINITY value. Then the C++ generated code indeed is incorrect and does not compile, which is a bug that we have to fix in the compiler, that is detect this INFINITY value, and returns a proper error message to the user.
But on your side, for now, you'll have to fix your DSP source to make it avoid this INFINITY case.
How would I find it in the first place? I'm not using INFINITY in that function and I just grepped the libraries and the only use of it is in my sliding min and max functions.
Some computation done at compile time (pattern matching I guess....), that makes a computation goes out of the float range. INFINITY (see here https://en.cppreference.com/w/c/numeric/math/INFINITY) probably appears as a result of a computation.
I can't imagine why
maxMeanNr = pow(2,14);
(_*2:slidingGeometricMean(maxMeanNr,maxMeanNr)/2);)
would produce INFINITY at compile time, when
maxMeanNr = pow(2,14);
process =
slidingGeometricMean(maxMeanNr,maxMeanNr);
works fine.
I know very little about the internals of faust, but that doesn't make sense. Also that it only happens with bigger blocksizes baffles me.
I'll have to look more deeply.
Thanks!
After some discussions here:
When I compile this:
I get:
If I slightly change the code, it works:
1) same code, smaller blocksize.
or same blocksize, no mult and div
or using Mean instead of Geometric Mean, which are very similar functions:
This one breaks in another way:
It gives:
I'm not sure how to narrow it down further.