> 
> Following this idea, would it be good to have guards in tables and delays to 
> avoid seg_fault 11 when indexes are weird values such as NAN? INF doesn't 
> seem to be a problem for delay values in delay lines. For example:
> 
> import("stdfaust.lib");
> process = de.fdelay(16, del, no.noise), safefdel(16, del, no.noise), del
>     with {
>         del = log(no.noise);
>     };
> safefdel(s, d, x) = de.fdelay(s, delay, x)
>     with {
>         delay = ba.if(ma.isnan(d), _, d) ~ _;
>     };
> 
> channel 1,    channel 2,      channel 3
> 5.7485885944909363e-06,       5.7485885944909363e-06, -12.066556195113364
> nan,  -0.34484595169538912,   nan
> nan,  -0.6951856770064615,    nan
> nan,  -0.3250393664115292,    nan
> 0.10676848381141596,  0.10676848381141596,    -2.2370924914039843
> nan,  -0.48342555318187247,   nan
> 0.2113922806105179,   0.21139228061051793,    -0.71403105730027505
> nan,  -0.14381783171867368,   nan
> nan,  -0.56355247609807113,   nan
> 0.25666705810309715,  0.25666705810309715,    -1.3599755277266783
> 
> I'm not suggesting to change the delay lines implementations but to add new 
> ones. Perhaps also adding nan-safe math could be good.
> 
> 
> - « As far as I'm concerned, Faust should be double precision by default. :-) 
> from Dario »  I know that, I guess you should even write «  Faust should be 
> double precision running at 96kHz by default ((-; ». Well AFAICS floats are 
> sufficient for most of standard cases to stay the default, and Dario 
> especially for you (…), I’m working on adding double support in the 
> WebAssembly layer  to be able to have a « float/double » choice at some point 
> in the faust Web IDE.
> 

Since this is a recurring question and some partial answers have been given, 
I've just added a « Produced NaN or INFINITY values and table access » section 
in the FAQ here:
https://github.com/grame-cncm/faustdoc/blob/master/mkdocs/docs/manual/faq.md

And since I’m not a mathematician nor a floating-point computation expert, feel 
free people to propose corrections or comments on this section.

Stéphane 

PS : I want to be loved by you, just you, and nobody else but you… ((-;

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

Reply via email to