[PD] Status of PD double precision
katjavetter at gmail.com
Wed Dec 19 12:42:35 CET 2018
On 12/17/18, Thomas Grill <gr at grrrr.org> wrote:
> No time to check deeper now, but to my surprise
> CFLAGS "-D PD_FLOATSIZE=64" ./configure && make
> does indeed compile from the vanilla git repo (but doesn't link with
> portmidi and portaudio for other reasons).
> The definitions in m_pd.h suggest that t_float becomes double...
Successful compilation with 64 bit floats is a first step but doesn't
tell so much in itself. By the way it is better to override CPPFLAGS,
not CFLAGS (which holds important flags):
$ make CPPFLAGS="-D PD_FLOATSIZE=64"
This builds Pd with 64 bit floats indeed. The question is, to what
extent does it work? This page provides a .zip with some test patches
that illustrate hotspots of precision problems:
The patches were made in 2011 to test pd-double but they are still
useful. For example patch "03precision-tests/limits.pd" gives proof of
double precision when showing very small and large numbers that single
precision can't do.
Though Pd 0.49 compiled as above shows those small and large numbers,
it can't show all significant decimals in the GUI. This of course
limits the usefulness of double precision and also complicates the
interpretation of other tests.
More information about the Pd-list