Subject: | improper handling of floating point inputs |
Date: | Thu, 17 Nov 2016 10:04:32 -0600 |
To: | bug-Number-Bytes-Human [...] rt.cpan.org |
From: | Munir Nassar <nassarmu [...] umn.edu> |
While writing a tool to deal with user quotas i ran into an issue with
Number::Bytes::Human, the parser does not properly handle floating point
numbers:
parse(1G)= 1073741824
parse(1.5G)= 1078984704
parse(1.50G)= 1126170624
parse(1.500G)= 1598029824
parse(1.5000G)= 6316621824
tested on ubuntu 14.04.05 with libnumber-bytes-human-perl version 0.09-1. I
do not have access to non-debian based distros but i suspect that this
issue is not distro specific.
expected outcome: the output for 1.5G, 1.50G, 1.500G 1.5000G should be the
same.
attached is my test script to show the problem
--
Munir Nassar <nassarmu@umn.edu>
Infrastructure Engineer, College of Science and Engineering
University of Minnesota
Key fingerprint = B033 3852 64F1 C8EF 9626 2C2F 7900 EBB3 2D44 A694
Message body is not shown because sender requested not to inline it.