Subject Re: [firebird-support] Round gives inconsistent results for DOUBLE PRECISION expressions
Author Mark Rotteveel
On 2019-07-29 05:49, Geoff Worboys geoff@...
[firebird-support] wrote:
> Can anyone explain why the following example gives inconsistent
> results. The first two I consider correct (rounded up to 8.42),
> the last four I consider incorrect (rounded down to 8.41).
>
[..]
>
> I was changing over from a UDF of my own that used an explicitly
> DOUBLE PRECISION input parameter. When I use that UDF in the
> above code, all results return the same 8.42 value.

Without knowing what exactly you're previous UDF did, we can't really
answer it. Likely it used a different rounding mode or rounding strategy
than applied by Firebird.

Mark