<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>

I think Pd uses %g which probably means %.6g by default, but it looks more like %.5g.<br><br>You're right, the precision is only lost when the patcher is written out somewhere.<br><br>In the attached patcher clicking on [1( calculates pi, which gets printed to a number box and the screen in 5 digit precision as 3.14159, but the subsequent [sin] object gives a value much closer to zero than when you click on [3.14159(, so the numbber box is hiding some extra precision.<br><br>Martin <br><div><pre>&gt; But whatever the theoretical precision of a float, I think the thing that <br>&gt; makes Pd floats less precise than Max floats lies in the use of the %g format <br>&gt; specifier to print them out, which can result in a lower precision than the <br>&gt; float is capable of.<br> <br>The %g specifier is able to print at full precision, if you instruct it <br>to, but pd only uses something like %.6g, whereas you'd need %.8g to <br>conserve all the binary precision (%.7g is slightly not enough, %.8g is <br>too much, but there's not a %.7½g).<br> <br>To conserve the decimal precision, however, you flip it around&nbsp;: in a <br>32-bit float, you can only load a %.7g without loss, and a %.8g won't fit. <br>But this only applies if the data really has %.8g precision to start with, <br>which is not the case with %.8g numbers that came from float32, which <br>really have only 7.2247 decimals of precision, which fits exactly in <br>float32.<br> <br>&gt; This makes it possible to use maximum precision float calculations <br>&gt; inside of objects but not between them.<br> <br>Between two objects communicating by float messages from outlet to inlet, <br>things happen only in binary, and you already know that. This means that <br>you can have 24-bit float32 precision between objects. The drop to 19.93 <br>bits of precision (%.6g) occurs only when converting to decimal ascii text <br>and back.<br> <br>Right&nbsp;?<br> <br>  ______________________________________________________________________<br>| Mathieu BOUCHARD ----- téléphone&nbsp;: +1.514.383.3801 ----- Montréal, QC<br></pre><br>_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -&gt; http://lists.puredata.info/listinfo/pd-list</div>                                               </div></body>
</html>