[PD] bug in wrap~?

IOhannes m zmoelnig zmoelnig at iem.at
Thu Mar 7 11:15:54 CET 2019

On 07.03.19 10:53, Orm Finnendahl wrote:
> Hi,
>  today I encountered something which seems to be a bug in wrap~
> (pd-0.49.0) on my architecture.

probably not a bug in [wrap~].

> The attached patch shows that wrap~
> ist outputting a 1 instead of the expected 0 when inputting the
> division of 880 by 220. Inputting the value 4 with sig~ to wrap~
> doesn't cause this, so I assume the result of the division is
> represented differently internally.


just connect:

[< 1]

to see that what you perceive as "1" is really a wee bit smaller.

after that, try getting the error by replacing the above with:

[* 262144]
[- 262144]

any big number would do, but 262144 is a power of two (2^18), so it
keeps additional errors (introduced by the scaling) low.

the scale/subtraction gives an error of "-0.0625" (it should be "0", if
"1" really was "1"), which is -1/16.

unscaling gives an (absolute) error of 2^-22, which is about to be
expected when dealing with numbers in the 128-1024 range.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20190307/d72b5fc1/attachment.sig>

More information about the Pd-list mailing list