[PD-dev] signal division with scalar values

Matt Barber brbrofsvl at gmail.com
Sat Aug 26 17:21:54 CEST 2023


Hello,

I'm finding some bugs in patches due to the different implementation of
division in the scalar versions of the /~ object. The scalar versions
precalculate the reciprocal of the scalar and then multiply by the incoming
signal vector. The problem is that in floating point, y*(1/x) is not always
equal to y/x. In fact, for some floats, x*(1/x) is not always equal to
1.0f, which can cause problems for e.g. wrap~. It's possible to work around
by using sig~, but as far as I know it's not in the documentation.

[image: image.png]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20230826/ff0c910d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 13468 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20230826/ff0c910d/attachment.png>


More information about the Pd-dev mailing list