Skip Menu |

This queue is for tickets about the DBI CPAN distribution.

Report information
The Basics
Id: 18013
Status: resolved
Priority: 0/
Queue: DBI

People
Owner: Nobody in particular
Requestors: jbernstein [...] marketpipe.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.50
Fixed in: (no value)



Subject: t/40profile.t fails with possible FP rounding error, DBI 1.50 on perl 5.8.6 on linux-x86
make test throws: t/40profile..............ok 51/64# Test 60 got: "25 0.93 0.110000000000000001 0.0100000000000000002 0.23000000000000001 1023110000 1023110010" (t/40profile.t at line 202) # Expected: "25 0.93 0.11 0.01 0.23 1023110000 1023110010" # t/40profile.t line 202 is: ok("@$totals", "25 0.93 0.11 0.01 0.23 1023110000 1023110010"); t/40profile..............ok 52/64# Test 62 got: "27 2.93 0.110000000000000001 0.0100000000000000002 0.23000000000000001 1023110000 1023110010" (t/40profile.t at line 211) # Expected: "27 2.93 0.11 0.01 0.23 1023110000 1023110010" # t/40profile.t line 211 is: ok("@$totals", "27 2.93 0.11 0.01 0.23 1023110000 1023110010"); t/40profile..............FAILED tests 60, 62 Failed 2/64 tests, 96.88% okay which looks to me like a floating point rounding error, perhaps... Linux colo16.servercity.co.uk 2.4.21-32.ELsmp #1 SMP Wed May 18 17:49:28 EDT 2005 i686 i686 i386 GNU/Linux This is perl, v5.8.6 built for i686-linux-ld
Already fixed for next release. Thanks.
On Tue Mar 07 07:54:17 2006, TIMB wrote: Show quoted text
> Already fixed for next release. Thanks.
Looks like there is a different rounding error problem in 1.51: t/40profile..............ok 6/36 # Failed test in t/40profile.t at line 99. t/40profile..............NOK 8# Structures begin differing at: # $got->[5] = '1150962858.01596498' # $expected->[5] = '1150962858.015965' # Failed test in t/40profile.t at line 104. t/40profile..............NOK 9# Structures begin differing at: # $got->[5] = '1150962858.01596498' # $expected->[5] = '1150962858.015965' t/40profile..............ok 10/36# Looks like you failed 2 tests of 36. t/40profile..............dubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 8-9 Failed 2/36 tests, 94.44% okay I am going to force it, since I don't profile, but I thought you might like to know. Thanks, Anthony
I think is_deeply is stringifying the value. I hink I've fixed it for 1.53 by doing this: -my $t1 = DBI::dbi_time; +my $t1 = DBI::dbi_time() . ""; -my $t2 = DBI::dbi_time; +my $t2 = DBI::dbi_time() . ""; Please reply (only) if that doesn't work for you. Thanks.