02.09.2021 12:17, Mark Rotteveel wrote:

I find the suggestion to make this configurable an interesting one, but this wouldn't fundamentally resolve the issue you have, it just would change the compound error of calculation. For example, we followed your suggestion and provide an option to use double precision semantics for division or change the calculation so it provides half-up rounding instead of - effectively - floor rounding), then the result of 2.00 / 3.00 would be 0.6667 (what you want), but the result of - for example - 2.00 / 3.00 * 100 would be 66.6700, and I guess you would expect it to be 66.6667 and would prefer if the entire calculation happens in double precision (which brings along its own host of problems, because fundamentally double precision is not usable for exact calculations and has its own set of precision problems and compound errors depending on order of evaluation and actual values).

Let's discuss possible options and what benefits they would bring us. Being compatible with other RDBMS vendors may also count as a benefit ;-)

With all that said, I suggest you create a feature request ticket ("type: new feature") for making it configurable, so it can be tracked and evaluated (and voted on by the community), but I wouldn't hold my breath (though I'm not a Firebird core developer, which means this is not my decision).

I agree to consider [configurable] alternatives to how numeric division is handled.


Dmitry


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

Reply via email to