Subject: | Scaling error - Number::WithError-0.08 |
Date: | Wed, 3 Nov 2010 06:43:04 -0600 |
To: | bug-Number-WithError [...] rt.cpan.org |
From: | Gordon Haverland <ghaverla [...] materialisations.com> |
I am scaling numbers, most of which have associated errors. I
came across an occurence where I had a value, and no error, and
stumbled across a bug.
To scale 91 +/- 9 ys (yocto seconds) worked fine. The next value
to scale was >910 yocto seconds. I stripped off the greater than
sign, and made a Number::WithError object with zero error.
$x = Number::WithError->new(910,0.0);
and then proceeded to scale it, getting '0e-1 +/- 0.0e00'.
Actually, to multiply the $x by anything smaller than 1E-6 seems
to produce '0e-1 +/- 0.0e00'. I was investigating the scaling
when running perldb inside emacs. If I change the object being
created to:
$x = Number::WithError->new(910,1.0);
And then scale it (multiply by 1E-24), it works fine. As I am
going to drop the error after stringifying it, it doesn't matter
to me what I have to set the error to.
In case you are interested, it's the half life of H-5 in
NuBase2003.
Number::WithError v0.08
perl v5.10.1
Debian unstable linux running a custom 2.6.32 kernel
I hope that is enough information. Have a great day!
Gordon Haverland