07.12.2015 19:21, Carlos H. Cantu wrote:

> With currently logic, the result of multiplications or divisions will
> have Scale = Sum of the scale of its members. This cause nonsense
> situations like the following:
>
> select 1.000000000 / 1.0000000000 from rdb$database
>
> resulting in:
> Arithmetic overflow or division by zero has occurred. arithmetic
> exception, numeric overflow, or string truncation. numeric value is
> out of range.

I suppose this particular case (and maybe some others of the same kind) 
can be worked around. Perhaps we could truncate intermediate results to 
fit the maximum supported bitness if and only if the trailing bytes are 
insignificant zeroes.

But I really doubt this would be enough as a generic solution.


Dmitry


------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to