On 2019-08-30 04:33, Richard Damon rich...@damon-family.org
[firebird-support] wrote:
> On 8/29/19 3:14 PM, 'Alan McDonald' a...@meta.com.au [firebird-support]
> wrote:
> numeric(18, 3) will use a double for its internal representation, but I
> would think it should still work. It might make more
Maybe the 'problem' is not in the ROUND() function but the CAST() ?
Peter
Technisoft
On 8/29/19 3:14 PM, 'Alan McDonald' a...@meta.com.au [firebird-support]
wrote:
>
>
> On 8/29/19 4:45 AM, m.djo...@gmail.com [firebird-support] wrote:
> >
> > In binary representation of the values maybe 4.72 is the closest, but
> > we are talking about mathematic.
> > This is from the
On 8/29/19 4:45 AM, m.djo...@gmail.com [firebird-support] wrote:
>
> In binary representation of the values maybe 4.72 is the closest, but
> we are talking about mathematic.
> This is from the description of the ROUND function in the documentation:
> Rounds a number to the nearest integer. If
On 8/29/19 4:45 AM, m.djo...@gmail.com [firebird-support] wrote:
>
> In binary representation of the values maybe 4.72 is the closest, but
> we are talking about mathematic.
> This is from the description of the ROUND function in the documentation:
> Rounds a number to the nearest integer. If
For exact numbers you have to use exact numeric types.
Double is float point type with all advantages and disadvantages.
Look here
https://en.wikipedia.org/wiki/Double-precision_floating-point_format
Just for fun, try this:
1e20 + 1 + 1 - 1e20 + 1
Slavek
Ing. Slavomir Skopalik
Executive
In binary representation of the values maybe 4.72 is the closest, but we are
talking about mathematic.
This is from the description of the ROUND function in the documentation:
Rounds a number to the nearest integer. If the fractional part is exactly 0.5,
rounding is upward for positive