<div dir="ltr">well, let me ask this again.<div><br></div><div>Will we have for download both the single and double-precision Pds?</div><div><br></div><div>Makes sense to me it'd be officially either single or double - hence double it'd be, so we could enjoy more precision. </div><div><br></div><div>So, what's the plan?</div><div><br></div><div>And what would we need to adapt and compile externals that can run in double precision Pd?</div><div><br></div><div>cheers<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em qua., 26 de fev. de 2020 às 06:10, IOhannes m zmoelnig <<a href="mailto:zmoelnig@iem.at">zmoelnig@iem.at</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">(i'm not sure how this ended on pd-list, m oving it back to pd-dev)<br>
<br>
On 25.02.20 23:53, Dan Wilcox wrote:<br>
>> On Feb 25, 2020, at 11:41 PM, Christof Ressie wrote:<br>
>><br>
>> I think there's no configure flag (yet). In the meantime you can<br>
>> compile Pd with<br>
>><br>
>> make CPPFLAGS="-DPD_FLOATSIZE=64"<br>
><br>
> I'd suggest --enable-double or --enable-double-precision<br>
> <br>
<br>
TL;DR adding a configure-flag opens a whole can of worms that are not<br>
related to double-precision<br>
<br>
long version:<br>
<br>
the reason why i have not added a configure flag to enable/disable<br>
double-precision builds is, that i was not satisfied with the<br>
implications of such a flag.<br>
<br>
enabling a feature via a configure-flag is (at least for me) a way of<br>
saying that "from now on, whatever i do with the so-generated project<br>
(Pd) will have this feature enabled".<br>
<br>
however, this is not the case in for a double-precision build.<br>
why?<br>
<br>
a double-precision Pd changes two fundamental things:<br>
- the precision of the Pd-core<br>
- the interface to externals<br>
<br>
the former is obvious, as this is what double-precision is about.<br>
the latter is not a problem per se, as we have taken steps to make sure<br>
to neither break API (so you can compile any well-written external with<br>
double-precision) nor ABI (so externals built for one precision won't<br>
fail *catastrophically* in a runtime of a different precision).<br>
<br>
however, the main expectation from any API is, that if you compile<br>
something against a given version of header-files, then the result<br>
outght to work *flawlessly* (which is much more strict than "not<br>
catastrophically") with the corresponding runtime (of the same version).<br>
<br>
with double-precision this is currently *not* the case:<br>
if you build Pd in double-precision mode, its headers will still be<br>
identical to a single-precision build. compiling an external against<br>
these headers will therefore produce a single-precision binary - which<br>
will not work properly in the double-precision Pd.<br>
<br>
if we want to pass the selected precision on to the entire ecosystem<br>
that depends on a given Pd runtime (that is: all externals that are<br>
built against a specific version of Pd), than the only solution is to<br>
replace the default value for PD_FLOATSIZE in m_pd.h.<br>
<br>
i have not done that, because traditionally Pd never modified (or<br>
generated) any headers during build.<br>
implementing that would not be hard, but it would be a major change in<br>
the build-system, which i didn't feel like proposing or even discussing<br>
(and i'm sure there are zillions of pitfalls where such a change would<br>
result in failing builds).<br>
<br>
<br>
otoh, adding a pre-processor flag to the build process is much more<br>
ephemeral.<br>
it basically says "i'm hacking some properties of the build-system to do<br>
what i want".<br>
nobody^Wi wouldn't expect such a temporary hack to be picked up by any<br>
external that happens to build against the given runtime (unless of<br>
course i apply the same or similar hack to those externals).<br>
<br>
<br>
which is exactly what we get with the current way to enable<br>
double-precision.<br>
<br>
the actual overhead for compiling a double-precision build is not that high.<br>
cf<br>
> configure CPPFLAGS="-DPD_FLOATSIZE=64"<br>
vs<br>
> configure --enable-double-precision<br>
<br>
<br>
mfgasdr<br>
IOhannes<br>
<br>
PS: i'm absolutely sure i write this up before (months, years ago?) but<br>
cannot find it anymore :-(<br>
<br>
_______________________________________________<br>
Pd-dev mailing list<br>
<a href="mailto:Pd-dev@lists.iem.at" target="_blank">Pd-dev@lists.iem.at</a><br>
<a href="https://lists.puredata.info/listinfo/pd-dev" rel="noreferrer" target="_blank">https://lists.puredata.info/listinfo/pd-dev</a><br>
</blockquote></div>