[PD-dev] [ pure-data-Patches-3438338 ] change float to t_float in Pd 'extra'

SourceForge.net noreply at sourceforge.net
Wed Nov 16 11:28:56 CET 2011


Patches item #3438338, was opened at 2011-11-15 07:17
Message generated for change (Comment added) made by katjav
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=3438338&group_id=55736

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: puredata
Group: None
Status: Open
Resolution: None
Priority: 7
Private: No
Submitted By: Katja  (katjav)
Assigned to: Miller Puckette (millerpuckette)
Summary: change float to t_float in Pd 'extra'

Initial Comment:
0001-change-float-to-t_float-in-Pd-extra.patch converts instances of 'float' to 't_float' in all classes of vanilla Pd's 'extra'. Also, a few constants and literals are defined with more decimals, and some float suffixes removed. The patch is intended for Pd-043.1test5. 

Type 't_float' is already used in most of pd core code. The changes in the 'extra' classes would make them compliant with the core in this sense.



----------------------------------------------------------------------

>Comment By: Katja  (katjav)
Date: 2011-11-16 02:28

Message:
I've checked the case of bonk~ once more because the difference was
remarkable there (that is, in terms of a test situation). It is fully due
to a more precise definition of pi, 3.141592653589793 instead of 3.14159.
Since a literal without float suffix is a double anyway, 3.14159 for pi is
a waste of precision even when t_float is float. And even when this waste
is considered unimportant, a more precise definition can not spoil the
intended calculation result. 

So to answer IOhannes' question: the differences can be considered an
improvement (albeit probably an unimportant one) of the situation. In
practice, no one will be dependent on an exact output of bonk~, it is even
quite hard to create a reproducible test situation. The same holds for
fiddle~ and sigmund~. In this sense, the patch can be safely applied as
is.

By the way, the test patches can be opened to see results in detail,
they're not dependent on a script to run them.




----------------------------------------------------------------------

Comment By: IOhannes m zmölnig (zmoelnig)
Date: 2011-11-16 00:41

Message:
i guess the question is: are the differences an _improvment_ of the
situation (e.g. because [bonk~] historically produced slightly "off" values
and the patch now fixes that)?

in this case i think one could argue, that your patch is fixing a minor
bug, and should be applied, even if it breaks 100% compatibility (and then:
if somebody relies on an exact value output in float-domain, they should
re-think their patch anyhow)

----------------------------------------------------------------------

Comment By: Hans-Christoph Steiner (eighthave)
Date: 2011-11-15 21:14

Message:
That answers my somewhat stupid question: your unittest patch will show the
differences.

----------------------------------------------------------------------

Comment By: Katja  (katjav)
Date: 2011-11-15 11:50

Message:
The more precise constants and removal of float suffixes originate from my
attempts to make Pd work in single and double precision. Maybe I should
make a patch file without these changes for the moment, till I've reviewed
them better.

Hans I do not understand your question 'how can we see what those
differences are?' If you build a patched Pd-0.43.1test5 and run the tests
which are also attached below, you'll see that the differences are in the
analysis objects,  notably bonk~.

----------------------------------------------------------------------

Comment By: Hans-Christoph Steiner (eighthave)
Date: 2011-11-15 09:20

Message:
These changes would complete the t_float/t_sample clean up that happened
with the core back in 0.42 (I think).  I think it should be included in
0.43 if possible.

Katya, how can we see what those differences are?

----------------------------------------------------------------------

Comment By: Katja  (katjav)
Date: 2011-11-15 07:36

Message:
correction: the reference for the unit test patches was pd-0.43.0 vanilla
release

----------------------------------------------------------------------

Comment By: Katja  (katjav)
Date: 2011-11-15 07:33

Message:
Accompanying the patch file, I've produced unit test patches. The reference
was pd-043.1 vanilla release. The tests indicate slightly altered output
for some of the classes, probably due to more precise constants and removal
of float suffixes. See attached 'unittests-pdextras.zip'.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=3438338&group_id=55736



More information about the Pd-dev mailing list