<div dir="ltr"><div><div><div><div><div><div>Sorry my error, I tried :<br><br></div>random 1e+08 / 1e+08<br><br>..and it works. Don't know how I got this wrong results.<br></div>It evens work until 1e+09, the precision error (that outputs 0) starts from 1e+10.<br></div><br></div>Is 1e+09 using the full decimal precision of pd's 32-bits floats ?<br><br></div>thanks<br><br></div><div>Raphaël<br></div><br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-05-31 17:00 GMT+02:00 Miller Puckette <span dir="ltr"><<a href="mailto:msp@ucsd.edu" target="_blank">msp@ucsd.edu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I just tried "random 1e8" and "/ 1e8" and it seems to work for me.  If it<br>
doens't for you that's a bug I should look at :)<br>
<br>
cheers<br>
<span class="HOEnZb"><font color="#888888">Miller<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Tue, May 31, 2016 at 04:48:59PM +0200, <a href="mailto:apvague@gmail.com">apvague@gmail.com</a> wrote:<br>
><br>
><br>
> Sent from my iPhone<br>
><br>
> > On May 31, 2016, at 4:44 PM, Raphaël Ilias <<a href="mailto:phae.ilias@gmail.com">phae.ilias@gmail.com</a>> wrote:<br>
> ><br>
> > Hello list,<br>
> ><br>
> > I want to do a simple task : pick a random float in a defined range (let's say between 0.0 and 1.0).<br>
> > I know there are this kind of objects in external libraries (something like [randomF] if remember), but since the collapse of Pd-Extended, I generally prefer to make vanilla abstractions.<br>
> ><br>
> > The two solutions i foresee are :<br>
> ><br>
> > solution #1 :<br>
> ><br>
> > [random 1e+06]<br>
> >  |<br>
> > [/ 1e+06]<br>
> ><br>
> > but this way, it doesn't use the full floating-point resolution ?... and going over that range (like 1e_07) will result in errors (outputs 0) I guess because of floating-point complexity.<br>
> ><br>
> ><br>
> > # solution #2 :<br>
> ><br>
> > [noise~]<br>
> >   |<br>
> > [snapshot~]<br>
> ><br>
> > but this won't work if DSP/audio is turned off.<br>
> ><br>
> ><br>
> ><br>
> > so I wondered if there are other vanilla and efficient solutions?<br>
> > ...or if I just have to get the external from deken... ?<br>
> > :)<br>
> ><br>
> > thanks,<br>
> ><br>
> > Raphaël<br>
> > _______________________________________________<br>
> > <a href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br>
> > UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">https://lists.puredata.info/listinfo/pd-list</a><br>
><br>
> _______________________________________________<br>
> <a href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br>
> UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">https://lists.puredata.info/listinfo/pd-list</a><br>
</div></div></blockquote></div><br></div>