Indeed, the compiler is full of « not correctly solved corner-cases » ((-; 
You’ve found many, Dario also. They are probably still a lot we are even not 
aware of. 

We try to prioritise what we can possibly fix in a reasonable time, since some 
other much mode interesting developments take our time..

Guys if you can recrut an army of compiler competent developers, we would be 
interested… In the meantime having an extensive list of all the issues you have 
discovered can help ! 

Thanks.

Stéphane

> Le 8 févr. 2021 à 20:42, Oleg Nesterov <o...@redhat.com> a écrit :
> 
> On 02/08, Stéphane Letz wrote:
>> 
>> The ‘pow' operation computed on integer arguments was indeed incorrect at 
>> compile time. Should be fixed in 2.30.12 version on master-dev.
> 
> commit bb0bf13334e9a1320f0f90b6ae56da277b9d96a5 adds
> 
> +    Type1 ipow(Type1 a, Type2 ex)
> +    {
> +        if (0 == ex) return 1;
> +        else {
> +            Type1 z = a;
> +            Type1 y = 1;
> +            while (true) {
> +                if (ex & 1) y *= z;
> +                ex /= 2;
> +                if (0 == ex) break;
> +                z *= z;
> +            }
> +            return y;
> +        }
> +    }
> 
> Perhaps this is what PowPrim::generateCode() should generate when arg1 is 
> int/const?
> 
> Just look at the c++ code generated from
> 
>       process = ^(100000);
>       
> to me mydsp_faustpower100000_f() makes no sense.
> 
> -------------------------------------------------------------------------------
> and to remind,
> 
>       process = 100000000000000;
> 
> outputs 276447232 ;)
> 
> IIRC, simply because faust uses atoi() without any check, but I am not sure.
> 
> Oleg.
> 



_______________________________________________
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to