Hi Luis,<br><br>Yes, the test result has been obtained by executing on Linux & Windows on the same CPU (Intel Pentium 4 processor).<br><br>The rounding off might help. It's just that the Query 1 result value appends a lengthy chunk of precision number. That may affect some client code e.g., functions that convert the output to strings may require more buffer size than anticipated.<br>
<br>-Ahmed<br><br><br><div class="gmail_quote">2010/7/28 Luís de Sousa <span dir="ltr"><<a href="mailto:luis.a.de.sousa@gmail.com">luis.a.de.sousa@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi Ahmed,<br><br>Are we talking about the same CPU? Those differences are small enough to be the result of different assembler code fed into different processors.<br><br>Personally, I wouldn't worry much about it. Rounding both results gets you equal results.<br>
<br>Luís<br><br> <br><br><div class="gmail_quote"><div><div></div><div class="h5">On Wed, Jul 28, 2010 at 5:25 PM, Ahmed Shinwari <span dir="ltr"><<a href="mailto:ahmed.shinwari@gmail.com" target="_blank">ahmed.shinwari@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div class="h5">
Hi All,<br><br>I am using Postgres Plus 8.4 and the PostGIS 1.4 along with it. The problem is that I get different results on Windows XP & Linux-32 (Red Hat 5) from the same query.<br><br>The SQL script is a bit lengthy so I have attached it with this email. Please run that SQL script file on psql terminal so that all of the pre-requisite Tables and Functions are created. At the end of this script there are two queries. I have pasted below the two queries and there results with respect to the two OS'.<br>
<br><br>QUERY 1: SELECT area(the_geom) FROM buildings;<br>-- Result on Windows XP<br> area<br>------------------<br> 205.548500000002<br>(1 row)<br><br>-- Result on Linux32 (Red Hat 5)<br> area<br>
------------------<br> 205.5485 <br>
(1 row)<br><br><br>QUERY 2: SELECT length(geom) FROM roads;<br>-- Result on Windows XP<br> length<br>-----------------<br> 14.142135623731<br>(1 row)<br><br>-- Result on Linux32 (Red Hat 5)<br> length<br>
-----------------<br>
14.1421356237309<br>
(1 row)<br><br><br>The output from Query 1 is a bit bizarre. Instead of rounding and truncating it on Windows, '00000002' is appended to it. Is this normal? Or is it a bug. And also the output from Query 2 is different as well.<br>
<br>Thanking in advance for any assistance.<br><br><br>Regards,<br><font color="#888888">Ahmed<br><br><br>
</font><br></div></div>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br></blockquote></div><br>
<br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br></blockquote></div><br>