Re: [Faudiostream-devel] inconsistent simplification of 0-x and -1*x

2023-10-08 Thread yann orlarey
Hi Oleg, Thanks for discovering the problem. Mathematically equivalent Faust code should, as much as possible, result in the exact same generated code. It is clearly not the case here. We will take a look… Cheers, Yann Le dim. 8 oct. 2023 à 18:52, Oleg Nesterov a écrit : > Hello, > > simp

Re: [Faudiostream-devel] inconsistent simplification of 0-x and -1*x

2023-10-08 Thread Oleg Nesterov
sorry for the noise, forgot to mention ... Granted, I think that this special "ksub && izZero" case in simplification() should die and I would be happy to make a PR. But perhaps you can explain why is it useful or necessary? Thanks, On 10/08, Oleg Nesterov wrote: > > Hello, > > simplification()

[Faudiostream-devel] inconsistent simplification of 0-x and -1*x

2023-10-08 Thread Oleg Nesterov
Hello, simplification() does ... else if (isSigBinOp(sig, &opnum, t1, t2)) { BinOp* op = gBinOpTable[opnum]; Node n1 = t1->node(); Node n2 = t2->node(); ... else if (opnum == kSub && isZero(n1)) return sigBinOp(kMul, sigInt(-1), t