On Śr 21 Sty 2015, 15:36:22, DAM wrote:
Show quoted text> На 21 ян. 2015, ср 07:06:21, monalisa@cbn.net.id написа:
> > Hi,
> >
> > I’ve got error when retrieve negative number between 0 to -1.
> >
> > e.g : -0.8 always read as 0.8
> >
> > But it’s ok if less than -1 (e.g : -1.1 etc)
> >
> > Configuration :
> >
> > CentOS 6
> > Perl 5.18.4.1 64 bits
> > Firebird 2.5.3 64 bits
>
> I can't reproduce this on 64-bit Debian/unstable with perl 5.20.1 and
> firebird 2.5.3.
>
> Can you try running the just committed 63-doubles.t test in t/?
>
https://github.com/mariuz/perl-dbd-firebird
>
flt defined as float - no errors
flt defined as numeric(18,4)
t/embed-63-doubles.t ............ 1/?
# Failed test 'row 9 (3.14159)'
# at t/embed-63-doubles.t line 85.
# Comparing $data->[1] as a number
# got : 3.1416
# expect : 3.14159 +/- 1e-06
# Failed test 'row 10 (-0.4)'
# at t/embed-63-doubles.t line 92.
# Comparing $data->[1] as a number
# got : 0.4 ('0.4000')
# expect : -0.4 +/- 1e-06
# Failed test 'row 11 (-0.6)'
# at t/embed-63-doubles.t line 92.
# Comparing $data->[1] as a number
# got : 0.6 ('0.6000')
# expect : -0.6 +/- 1e-06
# Failed test 'row 12 (-0.8)'
# at t/embed-63-doubles.t line 92.
# Comparing $data->[1] as a number
# got : 0.8 ('0.8000')
# expect : -0.8 +/- 1e-06
# Failed test 'row 13 (-0.95)'
# at t/embed-63-doubles.t line 92.
# Comparing $data->[1] as a number
# got : 0.95 ('0.9500')
# expect : -0.95 +/- 1e-06
# Failed test 'row 18 (-3.14159)'
# at t/embed-63-doubles.t line 92.
# Comparing $data->[1] as a number
# got : -3.1416
# expect : -3.14159 +/- 1e-06
# Looks like you failed 6 tests of 79.
t/embed-63-doubles.t ............ Dubious, test returned 6 (wstat 1536, 0x600)
Andrzej Dzik