Skip Menu |

This queue is for tickets about the Ogg-Vorbis-Decoder CPAN distribution.

Report information
The Basics
Id: 56823
Status: resolved
Priority: 0/
Queue: Ogg-Vorbis-Decoder

Owner: Nobody in particular
Requestors: dmn [...]

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


Subject: [patch] test failures with Perl 5.12.0 -- float math
Date: Thu, 22 Apr 2010 17:05:23 +0300
To: bug-Ogg-Vorbis-Decoder [...]
From: Damyan Ivanov <dmn [...]>
Download (untitled) / with headers
text/plain 618b
Hi, Please find attached a patch fixing test failure with Perl 5.12.0 (built with -Duselongdouble). From the Debian bug report ( # Failed test 'time_total' # at t/basic.t line 22. # got: '187.146666666666675' # expected: '187.146666666667' # Looks like you failed 1 test of 20. The patch replaces the hard-coded 187.146666666667 constant with an expression giving the same result, but using the same precision as the running Perl interpreter. Please consider integrating the patch in a future release. Thanks, dam Debian Perl Group
From: dam [...]
Download (untitled) / with headers
text/plain 109b
On Thu Apr 22 10:05:46 2010, wrote: Show quoted text
> Please find attached a patch ...
And here is the patch.
Subject: t_basic_relax-float-compare.patch
Description: Avoid floating point math errors when comparing test results Thing is, the test may be run on a perl built with long doubles or short doubles and the results may not match due to precision difference. Perl 5.12 is built with long doubles (5.10 is not) . The patch makes the reference number be computed with the same precision as the test result. Bug-Debian: 578554 Forwarded: Author: Damyan Ivanov <> Last-Update: 2010-04-22 --- a/t/basic.t +++ b/t/basic.t @@ -19,7 +19,7 @@ ok($ogg->seekable, 'seekable'); ok($ogg->serialnumber, 'serialnumber'); is($ogg->raw_total, 4418594, 'raw_total'); ok($ogg->pcm_total, 'pcm_total'); -is($ogg->time_total, 187.146666666667, 'time_total'); +is($ogg->time_total, 187.14 + 2/300, 'time_total'); ok($ogg->raw_tell, 'raw_tell'); ok($ogg->pcm_tell, 'pcm_tell'); ok($ogg->time_tell, 'time_tell');
Thanks. 0.8 patched & pushed.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to