On Thu, 01 Nov 2012 14:32:35 +0100, Dimitry Sibiryakov <s...@ibphoenix.com>
wrote:
> 01.11.2012 14:26, Dmitry Yemanov wrote:
>> The obvious one (though not necessarily meaning the only one) is to
have
>> even longer numerics and use them in cases when an int64 based
>> intermediate result is likely to overflow.
> 
>    Way to nowhere. No matter how long new datatype is, 1/3 won't be
>    precise.
> 
>    IMHO, division should produce double precision result. Always.

IMHO it shouldn't and afaik the SQL standard agrees with me here. For most
calculations double is less precise than the existing NUMERIC/DECIMAL
calculations, not to mention BCD solutions with larger sizes and scales.
For example: there is no precise result of 1/10 in double:
http://www.math.okstate.edu/~yqwang/teaching/math4513_fall12/Notes/0point1.pdf

If you want double, use double, but don't force its imprecision where it
isn't needed.

Mark

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to