[PD] vanilla solution for random float

IOhannes m zmoelnig zmoelnig at iem.at
Thu Jun 2 17:01:10 CEST 2016


On 2016-06-02 09:25, Claude Heiland-Allen wrote:
> On 02/06/16 08:09, IOhannes m zmölnig wrote:
>> On 05/31/2016 05:50 PM, IOhannes m zmoelnig wrote:
>>> i really like the powers of the new [osc*] objects for these kind of
>>> things.
>>
>> here's an updated example, that properly generates numbers in to 0..1
>> range.
>>
>> it has full 24bit of (pseudo) randomness.
> 
> But the distribution is not uniform (lower third is twice as likely as
> the upper two thirds of the range).  See attached for a test.

sigh indeed.
it also misses a few values altogether.

so here's an update which i think has these issues fixed.
at least your probability plot shows no anomalies, and it now uses all
23bit of the mantissa for randomness rather than just 20bit.

fgasdrm
IOhannes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: randF.pd
Type: text/x-puredata
Size: 643 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20160602/52de245e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20160602/52de245e/attachment.sig>


More information about the Pd-list mailing list