[Bug 275722] lang/perl5.36 - incorrect printf/sprintf output of bignum values
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 12 Dec 2023 14:35:02 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275722
Bug ID: 275722
Summary: lang/perl5.36 - incorrect printf/sprintf output of
bignum values
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Many People
Priority: ---
Component: Individual Port(s)
Assignee: mat@FreeBSD.org
Reporter: work+freebsd@vvv.kiev.ua
Assignee: mat@FreeBSD.org
Flags: maintainer-feedback?(mat@FreeBSD.org)
perl5-5.36.1_1 package contains bignum/bigint/bigfloat modules which work
incorrectly with printf/sprintf. Test script:
------------------------------
#!/usr/bin/env perl
use strict;
use warnings;
use bignum;
my $a = 0.1;
my $b = sprintf("%0.1f", $a);
print "$a = $b\n";
------------------------------
Expected output is "0.1 = 0.1".
Actual output is "0.1 = 0.0".
Workaround:
pkg install p5-Math-BigInt
The package provides new versions of bignum/bigint/bigfloat modules.
--
You are receiving this mail because:
You are the assignee for the bug.