On Mon, 30 Oct 2023 at 01:21, Oleg Nesterov <o...@redhat.com> wrote:

> Dario, I don't understand you, so let me ask...
>
> On 10/30, Dario Sanfilippo wrote:
> >
> > Perhaps we can include that "^" (pow()) can also be both int or float
> > depending on the operands.
>
> but it already depends on the type of operands ?
>

Yes. I'm suggesting to add that to the documentation for clarity.


>
> > perhaps to do everything in
> > double when using -double, and keeping ints when using single-precision.
>
> Please no ;) but I guess this is hardly possible so I'm calm.
>
> > In
> > that case; functions such as ba.time would also get an improvement.
>
> Why do you think so??
>
> perhaps you meant that ba.time can overflow? Yes it can, but I don't
> think this should depend on -double.
>
> And why is "^" your only concern? Say,
>
>         I = 2147483647;
>         process = I, I+1, I*2;
>
> compiles to
>
>         output0[i0] = FAUSTFLOAT(2147483647);
>         output1[i0] = FAUSTFLOAT(-2147483648);
>         output2[i0] = FAUSTFLOAT(-2);
>
> Oleg.


Those are all my concerns, not just pow().

>From what I understand, a double can represent correctly a larger range of
ints than an int32_t can, so if Faust assumed all signals to be float when
using -double, we would avoid the issues above.

Other than it shouldn't be determined by the -double flag, do we agree that
dealing with ints using double would be better than using int32_t? Genuine
question.

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

Reply via email to