<div dir="ltr"><div><div><div><div><div><div><div>Ok thanks for pointing out the actual decimal precision limit, I get it, according to my understanding of 32-bit floats type.<br><br></div>I was also wondering why this kind of common function isn't implemented in vanilla, in the form of an objet, or even as standardized abstraction (like the list-abs ?) ?<br> Because, it's like everyone has to :<br></div>- download an external library (and get other extra objects)<br></div>- or build it's own abstraction which make patch less "standardized" (different names, in/outlets) and subject to errors in conception (like here, not using maximum range).<br><br></div>I know this might be a delicate debate, but I feel like this kind of function (like "floating-point random" but one  could find other examples) could be provided as abstractions, since it's already useable but anyone who wants to learn can check the inner patch ?<br><br></div>Don't want to start a messy troll, but at least IMHO this feature really misses in vanilla,<br><br></div>++<br><br></div>Raphaël<br><div><div><div><div><br><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-05-31 17:12 GMT+02:00 Matt Barber <span dir="ltr"><<a href="mailto:brbrofsvl@gmail.com" target="_blank">brbrofsvl@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Your maximum [random] resolution is 2^24. You can send [1 (—[<< 24] to the right inlet of [random] and the right inlet of [/ ] and you'll have the max float resolution (assuming uniform distribution) between 0 and 1.</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, May 31, 2016 at 10:44 AM, Raphaël Ilias <span dir="ltr"><<a href="mailto:phae.ilias@gmail.com" target="_blank">phae.ilias@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div><div><div>Hello list,<br><br></div>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></div>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></div>The two solutions i foresee are : <br></div><br></div><div>solution #1 :<br></div><div><br>[random 1e+06]<br> |<br></div>[/ 1e+06]<br><br></div>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></div># solution #2 :<br><br></div>[noise~]<br>  |<br></div>[snapshot~]<br><br></div>but this won't work if DSP/audio is turned off.<br><br><br><br></div>so I wondered if there are other vanilla and efficient solutions?<br></div>...or if I just have to get the external from deken... ?<br>:)<br><br></div>thanks,<br><br></div>Raphaël<br></div>
<br></div></div><span class="">_______________________________________________<br>
<a href="mailto:Pd-list@lists.iem.at" target="_blank">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></span></blockquote></div><br></div>
</blockquote></div><br></div>