<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div dir="ltr" id="yui_3_16_0_1_1422720584492_3590"><span id="yui_3_16_0_1_1422720584492_3597">I erroneously sent my last reply to a single recipient-- here's the gist...</span></div><div id="yui_3_16_0_1_1422720584492_18707" dir="ltr"><br><span id="yui_3_16_0_1_1422720584492_3597"></span></div><div id="yui_3_16_0_1_1422720584492_6118" dir="ltr"><span id="yui_3_16_0_1_1422720584492_3597">There's a hidden premise in this thread that Pd's representation of float atoms in the GUI must be exactly the same as the representation in the Pd file.  Not only is that false, but AFAICT the only sane way to solve the problem is to decouple the two.  I can display floats as an abacus widget in a GUI without storing a blurry base64 jpeg representation in a patch file, so surely Pd can display the same user-friendly number representation people are used to, and store a lossless representation in a patch file.</span></div><div id="yui_3_16_0_1_1422720584492_12904" dir="ltr"><br><span id="yui_3_16_0_1_1422720584492_3597"></span></div><div id="yui_3_16_0_1_1422720584492_12905" dir="ltr"><span id="yui_3_16_0_1_1422720584492_3597">What I didn't say in my single-recipient reply is that making a change like that would probably be a pain.  I haven't investigated the details, but I'll guess that it either requires introducing some asymmetry in the parser, or parsing object box text a second time to convert from hex (or whatever it would be in the patch file) to readable numbers to display in the GUI.  Plus the current patch file number representation would need to carry forward, so that adds more complexity.</span></div><div id="yui_3_16_0_1_1422720584492_18708" dir="ltr"><br><span id="yui_3_16_0_1_1422720584492_3597"></span></div><div id="yui_3_16_0_1_1422720584492_19668" dir="ltr"><span id="yui_3_16_0_1_1422720584492_3597">Finally-- since we're not  building financial systems with Pd, it's unclear to me which category of bug this is.  Is this actually breaking patches in subtle ways?  On the one hand I notice when I lose precision in an iemcolor after setting some color and reloading a patch.  On the other I've never noticed a timbre changing in an analogous way when producing audio.  I guess if you're doing something like saving/reloading a message box full of sine frequency/amplitude pairs you'd notice?</span></div><div id="yui_3_16_0_1_1422720584492_19669" dir="ltr"><br><span id="yui_3_16_0_1_1422720584492_3597"></span></div><div id="yui_3_16_0_1_1422720584492_20149" dir="ltr"><span id="yui_3_16_0_1_1422720584492_3597">-Jonathan<br></span></div><div class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_quoted"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"> <font size="2" face="Arial"> On Saturday, January 31, 2015 3:35 AM, Cyrille Henry <ch@chnry.net> wrote:<br> </font> </div>  <br><br> <div class="y_msg_container"><br clear="none"><br clear="none">Le 31/01/2015 07:46, Alexandre Torres Porres a écrit :<br clear="none">> So, cant we raise the bit resolution of pd to more than what's there? how?<br clear="none">by replacing float by double.<br clear="none">katja made a lot's of work around this<br clear="none"><a shape="rect" href="http://www.katjaas.nl/doubleprecision/doubleprecision.html" target="_blank">http://www.katjaas.nl/doubleprecision/doubleprecision.html</a><br clear="none">there are lot's of mail in this list to read, search the archive for pd double.<br clear="none"><br clear="none"><br clear="none">but this ill not solve the precision problem, just move it...<br clear="none"><br clear="none">cheers<br clear="none">c<br clear="none"><br clear="none">><br clear="none">> Martin, about the pi in lua, i never got to see it, but supercollider prints the value of pi as<br clear="none">><br clear="none">> 3.1415926535898<br clear="none">><br clear="none">> so thats more than 24 bit float, but what is it?<br clear="none">><br clear="none">> cheers<br clear="none">><br clear="none">> 2015-01-29 15:47 GMT-02:00 Martin Peach <<a shape="rect" ymailto="mailto:chakekatzil@gmail.com" href="mailto:chakekatzil@gmail.com">chakekatzil@gmail.com</a> <mailto:<a shape="rect" ymailto="mailto:chakekatzil@gmail.com" href="mailto:chakekatzil@gmail.com">chakekatzil@gmail.com</a>>>:<br clear="none">><br clear="none">>     Here's a patch using pdlua that shows the value of pi in various ways. I get 48 decimal places in a symbol.<br clear="none">><br clear="none">>     Martin<br clear="none">><br clear="none">>     On Thu, Jan 29, 2015 at 12:36 PM, Alexandre Torres Porres <<a shape="rect" ymailto="mailto:porres@gmail.com" href="mailto:porres@gmail.com">porres@gmail.com</a> <mailto:<a shape="rect" ymailto="mailto:porres@gmail.com" href="mailto:porres@gmail.com">porres@gmail.com</a>>> wrote:<br clear="none">><br clear="none">>         >more that 7 digit but less than 8 digits<br clear="none">>         ...<br clear="none">>         > so, 4/3 =! 1.33333<br clear="none">>         > but 4/3 == 1.33333333 (8 "3")<br clear="none">><br clear="none">>         I don't get it. More than 7 decimal digits but less than 8 decimal digits? How does that work? In practice, is it 7 or 8?<br clear="none">><br clear="none">>         In the example we see that 4/3 == 1.33333333 (8 "3") - so it's 8 decimal digits...<br clear="none">><br clear="none">>         I have a work around using expr. Just put the number in parenthesis.<br clear="none">><br clear="none">>         Try [expr 4./3 == (1.33333333)] (8 "3")<br clear="none">><br clear="none">>         but the thing is that this is also true - [expr 4./3 == (1.3333333)] - also equal to 7 "3"<br clear="none">><br clear="none">>         cheers<br clear="none">><br clear="none">>         2015-01-29 14:58 GMT-02:00 Cyrille Henry <<a shape="rect" ymailto="mailto:ch@chnry.net" href="mailto:ch@chnry.net">ch@chnry.net</a> <mailto:<a shape="rect" ymailto="mailto:ch@chnry.net" href="mailto:ch@chnry.net">ch@chnry.net</a>>>:<br clear="none">><br clear="none">>             hello,<br clear="none">><br clear="none">>             ok, claude was faster to answer, but since i already write my mail, i send it anyway...<br clear="none">><br clear="none">><br clear="none">>             pd internal resolution is float32.<br clear="none">>             (i.e, 23 bit, so a bit less than 17 millions, i.e more that 7 digit but less than 8 digits)<br clear="none">>             pd graphical representation is 6 digits<br clear="none">><br clear="none">>             so, 4/3 =! 1.33333 but 4/3 == 1.33333333 (8 "3")<br clear="none">>             even if both are represented with the same number of 3...<br clear="none">>             this is a generic problem of computer float.<br clear="none">><br clear="none">>             the only odd thing concerning pd is that number are also saved with 6 digit.<br clear="none">>             (so precision can be lost when a patch is saved)<br clear="none">><br clear="none">>             try the attachment patch.<br clear="none">>             then save the patch, and open it back, and see that precision is lost.<br clear="none">>             (I have to modifies the patch as text file to have this behaviors, but you can also have the save precision when creating an object... until you save/load the patch)<br clear="none">><br clear="none">>             you can also have a look on the top right of the patch: a weird effect of float precision...<br clear="none">><br clear="none">>             cheers<br clear="none">>             c<br clear="none">><br clear="none">>             Le 29/01/2015 17:17, Alexandre Torres Porres a écrit :<br clear="none">><br clear="none">>                 Well, thanks everyone.<br clear="none">><br clear="none">>                 And now for some related issues.<br clear="none">><br clear="none">>                 Pd can only represent up to 6 significant digits, so they say. For example, in a message, you can have a number with up to 5 decimal places, like: -5.29314e+12<br clear="none">><br clear="none">>                 but it does have a better internal resolution, if you compare 4 / 3 to 1.33333 you'll see 4 / 3 is higher ( try [expr 4./3 > 1.33333] and check).<br clear="none">><br clear="none">>                 So, what's this internal resolution? And why can't you have the same resolution in a message?<br clear="none">><br clear="none">>                 thanks<br clear="none">><br clear="none">>                 2015-01-28 16:06 GMT-02:00 Martin Peach <<a shape="rect" ymailto="mailto:chakekatzil@gmail.com" href="mailto:chakekatzil@gmail.com">chakekatzil@gmail.com</a> <mailto:<a shape="rect" ymailto="mailto:chakekatzil@gmail.com" href="mailto:chakekatzil@gmail.com">chakekatzil@gmail.com</a>> <mailto:<a shape="rect" ymailto="mailto:chakekatzil@gmail.com" href="mailto:chakekatzil@gmail.com">chakekatzil@gmail.com</a> <mailto:<a shape="rect" ymailto="mailto:chakekatzil@gmail.com" href="mailto:chakekatzil@gmail.com">chakekatzil@gmail.com</a>>>__>:<br clear="none">><br clear="none">>                      On Wed, Jan 28, 2015 at 12:00 PM, Cyrille Henry <<a shape="rect" ymailto="mailto:ch@chnry.net" href="mailto:ch@chnry.net">ch@chnry.net</a> <mailto:<a shape="rect" ymailto="mailto:ch@chnry.net" href="mailto:ch@chnry.net">ch@chnry.net</a>> <mailto:<a shape="rect" ymailto="mailto:ch@chnry.net" href="mailto:ch@chnry.net">ch@chnry.net</a> <mailto:<a shape="rect" ymailto="mailto:ch@chnry.net" href="mailto:ch@chnry.net">ch@chnry.net</a>>>> wrote:<br clear="none">><br clear="none">><br clear="none">><br clear="none">>                          Le 28/01/2015 17:47, Alexandre Torres Porres a écrit :<br clear="none">><br clear="none">>                                > it's a limitation of 32 bit float<br clear="none">><br clear="none">>                              I thought so, but same happens when I use the new Pd Vanilla 64 bits...<br clear="none">><br clear="none">>                          this mean that it's compiled for 64 bit CPU, not that float are store on 64 bits<br clear="none">><br clear="none">>                      Also last time I checked, Pd saves floats by first printing them to 6 digit precision, so they have even less range than a 'float' type.<br clear="none">>                      You could use an object made with pdlua to manipulate large floating-point numbers, as there is no(?) limit to the size of a float in lua.<br clear="none">><br clear="none">>                      Martin<br clear="none">><br clear="none">>                      _________________________________________________<br clear="none">>                 <a shape="rect" ymailto="mailto:Pd-list@lists.iem.at" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> <mailto:<a shape="rect" ymailto="mailto:Pd-list@lists.iem.at" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a>> <mailto:<a shape="rect" ymailto="mailto:Pd-list@lists.iem.at" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> <mailto:<a shape="rect" ymailto="mailto:Pd-list@lists.iem.at" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a>>> mailing list<br clear="none">>                      UNSUBSCRIBE and account-management -> <a shape="rect" href="http://lists.puredata.info/__listinfo/pd-list" target="_blank">http://lists.puredata.info/__listinfo/pd-list </a><<a shape="rect" href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a>><div class="yqt6734639858" id="yqtfd87707"><br clear="none">><br clear="none">><br clear="none">><br clear="none">><br clear="none">><br clear="none">><br clear="none">><br clear="none">> _______________________________________________<br clear="none">> <a shape="rect" ymailto="mailto:Pd-list@lists.iem.at" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br clear="none">> UNSUBSCRIBE and account-management -> <a shape="rect" href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br clear="none">><br clear="none"><br clear="none">_______________________________________________<br clear="none"><a shape="rect" ymailto="mailto:Pd-list@lists.iem.at" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br clear="none">UNSUBSCRIBE and account-management -> <a shape="rect" href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br clear="none"></div><br><br></div>  </div> </div>  </div> </div></body></html>