> SS> 1. Decimal or Numeric is used for to keep exact accuracy. > SS> If you don't need this accuracy use float point data types. > > You didn't get the point. There is no loss of accuracy. The data types > will continue working as is. Remember, as I said, today you already have to > cast > if you want to make the formula work, so, you are already "loosing" > digits. Yes, but now you have to told to FB explicitly which part of number have to be discarded.
If engine do it implicitly instead of error, you will receive some result, but it can be incorrect. For this purpose (unpredictable rounding errors), use DOUBLE PRECISION data type. Can you give me real example with decimal casting? > SS> 2. System that will produce unpredictable results in math is really hard > SS> to use. > SS> Some numbers will rounded, truncated or modified. > SS> There will lot of risk in financial calculation because real result > SS> will depend > SS> on server config. > > What risks? As I said, currently formulas will keep working in the > exact same way. About server config, personally, I think that > parameter is not needed. You write something about hidden conversion from decimal to IEEE (I read as IEEE float point). Some numbers in decimals don't have representation in float point. See here: https://en.wikipedia.org/wiki/Floating_point#IEEE_754:_floating_point_in_modern_computers > > SS> From my point of view, this auto casting will generate more problems > SS> than helps. > > Do you have a better solution for the proposed problem? > Some notes about float point match and fixed point match: 1. Fixed point is more accurate, it always produce same result on all HW. Useful as price, count, taxes ... 2. Float point is more flexible, but low accurate and can produce different results on different HW. Useful as measured values and common situation where you don't care about some errors. In normal situations, real error is out of scope. But in some special situation can be relevant f.e. statistical computing. The final solution will be support for high precision arithmetics. https://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic Slavek ------------------------------------------------------------------------------ Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel