Skip Menu |

This queue is for tickets about the Number-WithError CPAN distribution.

Report information
The Basics
Id: 62668
Status: open
Priority: 0/
Queue: Number-WithError

People
Owner: Nobody in particular
Requestors: ghaverla [...] materialisations.com
Cc:
AdminCc:

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



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
Subject: Re: [rt.cpan.org #62668] AutoReply: Scaling error - Number::WithError-0.08
Date: Sun, 21 Nov 2010 17:33:35 -0700
To: bug-Number-WithError [...] rt.cpan.org
From: Gordon Haverland <ghaverla [...] materialisations.com>
On November 3, 2010, you wrote: Show quoted text
> $x = Number::WithError->new(910,0.0);
Actually, it seems to be a bit more generic. Trailing zeros in the symmetric error term cause problems. For example, using the compact notation for a number with precision, this number does not cause problems: 9732(16). If I have 9730(160), I get problems (the error gets set to 0.0). If I have 9731(160), I again get 0.0 for the error. What I am using as a workaround, is if there is a trailing 0, I change it to a 1. Your routine usually rounds things to the proper numbers with this minor change. Gord
Subject: Re: [rt.cpan.org #62668] AutoReply: Scaling error - Number::WithError-0.08
Date: Mon, 29 Nov 2010 21:33:24 +0100
To: bug-Number-WithError [...] rt.cpan.org
From: Steffen Mueller <smueller [...] cpan.org>
Hi Gord, On Nov 22, 2010, at 1:33 AM, ghaverla via RT wrote: Show quoted text
> Queue: Number-WithError > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=62668 > > > On November 3, 2010, you wrote:
>> $x = Number::WithError->new(910,0.0);
> > Actually, it seems to be a bit more generic. Trailing zeros in > the symmetric error term cause problems. For example, using the > compact notation for a number with precision, this number does not > cause problems: 9732(16). If I have 9730(160), I get problems > (the error gets set to 0.0). If I have 9731(160), I again get 0.0 > for the error. What I am using as a workaround, is if there is a > trailing 0, I change it to a 1. Your routine usually rounds > things to the proper numbers with this minor change.
sorry for not replying earlier. I'm not deliberately ignoring you, but I started a new job, moved to a different country, and am generally swamped with work. Thus, for the time being, there isn't much I can do. What I'd certainly manage is to apply any patches should you come up with a fix for this issue. Best regards, Steffen
Subject: Re: [rt.cpan.org #62668] AutoReply: Scaling error - Number::WithError-0.08
Date: Mon, 29 Nov 2010 13:41:00 -0700
To: bug-Number-WithError [...] rt.cpan.org
From: Gordon Haverland <ghaverla [...] materialisations.com>
On November 29, 2010, you wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=62668 > > > Hi Gord, > > On Nov 22, 2010, at 1:33 AM, ghaverla via RT wrote:
> > Queue: Number-WithError > > > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=62668
> > >
> > > > On November 3, 2010, you wrote:
> >> $x = Number::WithError->new(910,0.0);
> > > > Actually, it seems to be a bit more generic. Trailing zeros > > in the symmetric error term cause problems. For example, > > using the compact notation for a number with precision, this > > number does not cause problems: 9732(16). If I have > > 9730(160), I get problems (the error gets set to 0.0). If I > > have 9731(160), I again get 0.0 for the error. What I am > > using as a workaround, is if there is a trailing 0, I change > > it to a 1. Your routine usually rounds things to the proper > > numbers with this minor change.
> > sorry for not replying earlier. I'm not deliberately ignoring > you, but I started a new job, moved to a different country, > and am generally swamped with work. Thus, for the time being, > there isn't much I can do. What I'd certainly manage is to > apply any patches should you come up with a fix for this > issue.
Hello Steffen. No problem. Congratulations on the new job and surviving a move. I hadn't thought about fixing the problem, I had found a way around it. But, I'll see what I can do. First thing is to get the database constructed. When I am building my own modules to access the data, I can look into this bug. Gord