<div dir="ltr"><div>So, cant we raise the bit resolution of pd to more than what's there? how?<br></div><div><br></div><div>Martin, about the pi in lua, i never got to see it, but supercollider prints the value of pi as </div><div><br></div><div>3.1415926535898<br></div><div><br></div><div>so thats more than 24 bit float, but what is it?</div><div><br></div><div>cheers</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-01-29 15:47 GMT-02:00 Martin Peach <span dir="ltr"><<a href="mailto:chakekatzil@gmail.com" target="_blank">chakekatzil@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Here's a patch using pdlua that shows the value of pi in various ways. I get 48 decimal places in a symbol.<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888">Martin<br></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 29, 2015 at 12:36 PM, Alexandre Torres Porres <span dir="ltr"><<a href="mailto:porres@gmail.com" target="_blank">porres@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span>> <span style="font-size:12.8000001907349px">more that 7 digit but less than 8 digits</span><br style="font-size:12.8000001907349px"></span>...<span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">> so, 4/3 =! 1.33333 </span><div><span style="font-size:12.8000001907349px">> but 4/3 == 1.33333333 (8 "3")</span></div><div><span style="font-size:12.8000001907349px"><br></span></div></span><div><span style="font-size:12.8000001907349px">I don't get it. More than 7 decimal digits but less than </span><span style="font-size:12.8000001907349px">8 decimal digits? How does that work? In practice, is it 7 or 8?</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">In the example we see that </span><span style="font-size:12.8000001907349px">4/3 == 1.33333333 (8 "3") - so it's </span><span style="font-size:12.8000001907349px">8 decimal digits...</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">I have a work around using expr. Just put the number in parenthesis.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Try [expr 4./3 == (1.33333333)] (8 "3")</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">but the thing is that this is also true - </span><span style="font-size:12.8000001907349px"> </span><span style="font-size:12.8000001907349px">[expr 4./3 == (1.3333333)]</span><span style="font-size:12.8000001907349px"> -</span><span style="font-size:12.8000001907349px"> also equal to 7 "3"</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">cheers</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-01-29 14:58 GMT-02:00 Cyrille Henry <span dir="ltr"><<a href="mailto:ch@chnry.net" target="_blank">ch@chnry.net</a>></span>:<div><div><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">hello,<br>
<br>
ok, claude was faster to answer, but since i already write my mail, i send it anyway...<br>
<br>
<br>
pd internal resolution is float32.<br>
(i.e, 23 bit, so a bit less than 17 millions, i.e more that 7 digit but less than 8 digits)<br>
pd graphical representation is 6 digits<br>
<br>
so, 4/3 =! 1.33333 but 4/3 == 1.33333333 (8 "3")<br>
even if both are represented with the same number of 3...<br>
this is a generic problem of computer float.<br>
<br>
the only odd thing concerning pd is that number are also saved with 6 digit.<br>
(so precision can be lost when a patch is saved)<br>
<br>
try the attachment patch.<br>
then save the patch, and open it back, and see that precision is lost.<br>
(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>
<br>
you can also have a look on the top right of the patch: a weird effect of float precision...<br>
<br>
cheers<br>
c<br>
<br>
Le 29/01/2015 17:17, Alexandre Torres Porres a écrit :<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>
Well, thanks everyone.<br>
<br>
And now for some related issues.<br>
<br>
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>
<br>
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>
<br>
So, what's this internal resolution? And why can't you have the same resolution in a message?<br>
<br>
thanks<br>
<br></span>
2015-01-28 16:06 GMT-02:00 Martin Peach <<a href="mailto:chakekatzil@gmail.com" target="_blank">chakekatzil@gmail.com</a> <mailto:<a href="mailto:chakekatzil@gmail.com" target="_blank">chakekatzil@gmail.com</a>><u></u>>:<span><br>
<br>
    On Wed, Jan 28, 2015 at 12:00 PM, Cyrille Henry <<a href="mailto:ch@chnry.net" target="_blank">ch@chnry.net</a> <mailto:<a href="mailto:ch@chnry.net" target="_blank">ch@chnry.net</a>>> wrote:<br>
<br>
<br>
<br>
        Le 28/01/2015 17:47, Alexandre Torres Porres a écrit :<br>
<br>
              > it's a limitation of 32 bit float<br>
<br>
            I thought so, but same happens when I use the new Pd Vanilla 64 bits...<br>
<br>
        this mean that it's compiled for 64 bit CPU, not that float are store on 64 bits<br>
<br>
    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>
    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>
<br>
    Martin<br>
<br>
    ______________________________<u></u>_________________<br></span>
    <a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> <mailto:<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a>> mailing list<span><br>
    UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/<u></u>listinfo/pd-list</a><br>
<br>
<br>
</span></blockquote>
</blockquote></div></div></div><br></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>