This looks like numerical failure in the optimization by the Faust compiler. You can see it approaching this situation in the following simplified case:
process=(_*cos(ma.PI/2),_,_*cos(0-ma.PI/2)):>_; which compiles to output0[i] = (FAUSTFLOAT)(6.123234e-17f * (((1.633124e+16f * (float)input1[i]) + (float)input0[i]) + (float)input2[i])); Since cos(PI/2) = 0, the input coefficients are approximately 0,1,0, which become (numerically) eps,1,eps, where eps = 6.123234e-17f in this particular case. Factoring out eps gives 1/eps for the coefficient of input1, which became infinity in the previous example (numerical bug... 1/eps should possibly go to MAX_FLOAT, but not inf). If there were a third signal multiplied by eps, then this factoring would save a multiply, but in this case there are two multiplies either way. I would personally like to be able to set a magnitude threshold below which numbers are flushed to zero. Then the compiler would see coefficients (0,1,0) in this case and not try to factor out the 0. - Julius On Fri, Sep 23, 2016 at 7:26 AM, Stéphane Letz <l...@grame.fr> wrote: > The generated C++ code is incorrect (see this "(inf.0f * (float)input1[i]))) > » subexpression), so probably a bug in the compiler. > > Stéphane > > >> Le 23 sept. 2016 à 13:28, Pierre Lecomte <pierre.leco...@gadz.org> a écrit : >> >> import("stdfaust.lib"); >> process=(_*cos(1/2*ma.PI)^3,_,_*cos(-1/2*ma.PI)^3):>_; > > > ------------------------------------------------------------------------------ > _______________________________________________ > Faudiostream-users mailing list > Faudiostream-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/faudiostream-users > > -- Julius O. Smith III <j...@ccrma.stanford.edu> Professor of Music and, by courtesy, Electrical Engineering CCRMA, Stanford University http://ccrma.stanford.edu/~jos/ ------------------------------------------------------------------------------ _______________________________________________ Faudiostream-users mailing list Faudiostream-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/faudiostream-users