<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Hi,</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">My guess is that the problem is a difference in the exact floating point representation of each 0.8f which gets propagated through the multiplication, which will unfortunately give you index trouble with these very large indices.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">The closest binary representation of 0.8 is:</div><div class="gmail_default" style="font-family:verdana,sans-serif">0.800000012 = 13421773/2^24</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Based on the content of your files, the [hsv2rgb] seems to be outputting something like this, which gets printed as 0.8:</div><div class="gmail_default" style="font-family:verdana,sans-serif">0.80000025 = 13421777/2^24</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">I'm not sure there's anything you can do about this, unfortunately.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 11, 2015 at 8:43 PM, mick mengucci <span dir="ltr"><<a href="mailto:misturapura@gmail.com" target="_blank">misturapura@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"><div><div><div><div>Hi lists,<br>we are making a new abstraction in Pd to convert from color space RGB to CIE-Lch using a look up table. We map all the RGB triplets to an index of the LUT that points to the correct conversion to CIE-Lch.<br clear="all"><br></div>The problem is that when using [hsv2rgb] we get the same index number as inputting directly the rgb triplet but different result from the look up table.<br><br></div>How is that possible??? <br><br>Here's a simplification of the patch to illustrate the problem (warning: there are three tables with 1.65814e+07 values)<br><br><a href="https://drive.google.com/file/d/0B6MlQyl-quuaYnEzQmtDOFFyckU" target="_blank">https://drive.google.com/file/d/0B6MlQyl-quuaYnEzQmtDOFFyckU</a><br><br></div>I hope somebody will have the patience to explain this very strange behaviour of an apparently simple message to expression and look up table operation. Maybe the size of the table and of the index is the reason for it? We run Xubuntu and Pd 64bits.<br><br></div>Cheers<span class="HOEnZb"><font color="#888888"><br><div><div><div><div><br>-- <br><div><div dir="ltr"><div><a href="http://mickmengucci.bandcamp.com" target="_blank">mickmengucci.bandcamp.com</a><br></div><a href="http://facebook.com/mickmengucci3" target="_blank">facebook.com/mickmengucci3</a><br><div><a href="http://facebook.com/Labio.pt" target="_blank">facebook.com/Labio.pt</a><br><a href="http://WWW.MISTURAPURA.NET" target="_blank"></a><a href="http://WWW.MISTURAPURA.NET" target="_blank">MISTURAPURA.NET</a><br>pure mixture vibration since 1995</div></div></div>
</div></div></div></div></font></span></div>
<br>_______________________________________________<br>
<a href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
<br></blockquote></div><br></div>