<div dir="ltr"><div><div><div><div><div>Hello list, i'm excited about some possibilities of double precision, and i had some ideas, but instead of making an issue on github, i think that would be interesting to put here, so maybe this would create some discussion if these make sense before asking a feature request haha<br><br></div>As this is implemented now, I noticed that when you type on boxes, numbers get truncated so you lose precision and there was a good argument on github that is best to show 440 instead of <code>439.99999243521<font face="arial,sans-serif"> or something like that. But what if we could type an extra d to show to pd that we want to keep that number in full precision?<br><br></font></code></div><code><font face="arial,sans-serif">It would be, for example [* 3.1415926535d<span style="font-family:arial,sans-serif"><code><font face="arial,sans-serif">] and voila, pd doesn't truncate to [* 3.14159]<br><br></font></code></span></font></code></div><code><font face="arial,sans-serif"><span style="font-family:arial,sans-serif"><code><font face="arial,sans-serif">and this could be used in other contexts, print could receive a flag -d to show full precision on console, so [print -d] would be the decision of the user to not truncate numbers, and maybe number boxes could have one flag in the properties so the user could choose if he want to see the number full or truncated, what do you think?<br><br></font></code></span></font></code></div><code><font face="arial,sans-serif"><span style="font-family:arial,sans-serif"><code><font face="arial,sans-serif">But one thing that i missed that is the really the reason that i am thinking about this, is that in data structures, the numbers are also truncated, and i was excited to see pd double precision to be able to record these numbers in data structures, so, what about introducing double to force data structures to keep these as double? the struct object could be, for example [struct foo float x float y double piJustForExample double myAnotherNumber] and then in the file maybe this large number would be in this other format, 3.1415926535d with d appended.<br><br></font></code></span></font></code></div><code><font face="arial,sans-serif"><span style="font-family:arial,sans-serif"><code><font face="arial,sans-serif">In my use case, i have an old patch that used data structures to calculate frequencies from ratios, and this keep the ratios as a fraction, numerator and denominator separately, so i could show the ratios and do some crazy math with harmonics and subharmonics, and when i multiply many times these numbers were truncated by lost in precision, so i wasn't able to multiply and then come back as the numbers were getting large and start to give errors (not real errors, just wrong numbers, as they were lost in the process), i know this is confusing and over simplified,  but if i could keep these numbers with full precision i would be very happy haha <br></font></code></span></font></code></div>