Possible rounding error of large float values? - Mailing list pgsql-sql

From Adam Lancaster
Subject Possible rounding error of large float values?
Date
Msg-id 8758F8D58219684FAB0239EE8967048A010807@calculon.preventsys.com
Whole thread Raw
Responses Re: Possible rounding error of large float values?
List pgsql-sql
<p><font face="Arial" size="2">When setting a float column to this value:</font><p><font face="Arial"
size="2">9223372036854775807</font><p><fontface="Arial" size="2">It gets selected out as:</font><p><font face="Arial"
size="2">9.22337203685478E18</font><p><fontface="Arial" size="2">Which appears to be rounded. When we cast it to
numerictype we get:</font><p><font face="Arial" size="2">9223372036854780000</font><p><font face="Arial" size="2">Which
alsois rounded. It is still possible to find the row using the original value</font><p><font face="Arial"
size="2">select* from <table> where <col> = 9223372036854775807</font><p><font face="Arial" size="2">Is
thisexpected behavior?</font><br /><p><font face="Arial" size="2">Thanks,</font><br /><font face="Arial"
size="2">Adam</font>

pgsql-sql by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Disable trigger with Postgresql 7.4.x?
Next
From: Josh Berkus
Date:
Subject: Re: Possible rounding error of large float values?