Skip Menu |
 

This queue is for tickets about the Math-BigInt CPAN distribution.

Report information
The Basics
Id: 19276
Status: resolved
Worked: 10 min
Priority: 0/
Queue: Math-BigInt

People
Owner: TELS [...] cpan.org
Requestors: eastonbeymer [...] cox.net
Cc:
AdminCc:

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



X-Scanned-BY: AMaViS-ng at bestpractical
MIME-Version: 1.0
X-Spam-Status: No, hits=-0.2 required=8.0 tests=BAYES_00,DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,HTML_40_50,HTML_MESSAGE
X-Mailer: Microsoft Outlook Express 6.00.2900.2869
Received-SPF: pass (x1.develooper.com: local policy)
X-Virus-Checked: Checked
Content-Type: multipart/alternative; boundary="----=_NextPart_000_0008_01C67819.0501AFF0"
Received: from localhost (localhost.localdomain [127.0.0.1]) by diesel.bestpractical.com (Postfix) with ESMTP id 2086B4D8150 for <cpan-bug+math-bigint [...] diesel.bestpractical.com>; Mon, 15 May 2006 15:14:01 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 9413F4D814E for <bug-Math-BigInt [...] rt.cpan.org>; Mon, 15 May 2006 15:14:00 -0400 (EDT)
Received: (qmail 9037 invoked by alias); 15 May 2006 19:13:59 -0000
Received: from fed1rmmtao04.cox.net (HELO fed1rmmtao04.cox.net) (68.230.241.35) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Mon, 15 May 2006 12:13:54 -0700
Received: from EASTONSONY ([72.193.141.251]) by fed1rmmtao04.cox.net (InterMail vM.6.01.06.01 201-2131-130-101-20060113) with SMTP id <20060515191347.SEQO17501.fed1rmmtao04.cox.net [...] EASTONSONY> for <bug-Math-BigInt [...] rt.cpan.org>; Mon, 15 May 2006 15:13:47 -0400
Delivered-To: cpan-bug+math-bigint [...] diesel.bestpractical.com
Subject: bignum error...
Return-Path: <eastonbeymer [...] cox.net>
X-Msmail-Priority: Normal
X-Original-To: cpan-bug+math-bigint [...] diesel.bestpractical.com
X-Spam-Check-BY: la.mx.develooper.com
X-Priority: 3
Date: Mon, 15 May 2006 12:13:48 -0700
Message-Id: <000b01c67853$b1929470$6601a8c0 [...] EASTONSONY>
X-Mimeole: Produced By Microsoft MimeOLE V6.00.2900.2869
To: <bug-Math-BigInt [...] rt.cpan.org>
From: "Easton Beymer" <eastonbeymer [...] cox.net>
Content-Length: 0
content-type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: iso-8859-1
Content-Length: 3265
Download (untitled) / with headers
text/plain 3.1k
Hi again, Tels, I have moved this message to a to a pop3, smtp mail server... Thanks for putting in the request to delete the message with the attachments. I figured I was really pushing the limits of tieing and overloading, but cobol and big bcd integer processing (including scaling) with the absence of floating point rounding errors is basic to cobol -- cobol requires accuracy to the penny. This package is really aimed at Perl 6 and Parrot (is there ever really going to be such a thing in my lifetime???). In order to emulate the data structures and data types inherent in cobol, it was necessary to use tied variables. I am not particularly concerned about performance with the bignum package -- it is more important to me to be able to accurately mirror the accuracy spelled out the the cobol standard. I will make the change to "Cobol" for the package name. I am wanting to implement rounding on an arithmetic statement by statement basis, but am lost as to how to implement this in bignum. Good examples seem to be lacking. Again, thanks... Easton -------------------------------------------------------------------------------- Show quoted text
> Subject: Re: [rt.cpan.org #19253] Error in bignum, BigInt... > From: bug-Math-BigInt@rt.cpan.org > To: eastonbeymer@hotmail.com > Date: Mon, 15 May 2006 14:14:00 -0400 > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=19253 > > > Moin, > > On Monday 15 May 2006 19:18, eastonbeymer@hotmail.com via RT wrote:
> > Queue: Math-BigInt > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=19253 > > > > > Hi Tels, > > > > I tried coming up with a stripped down version, but the error goes away > > once I start stripping... > > > > Attached are the full programs causing the problem. > > > > Cobol.pm is the code for a runtime package for a cobol compiler written > > in Perl, and I consider it to be proprietary at this time.
> > Unfortunately, you just posted it to rt.cpan.org, a public website :) > > I will try to see what's causing the problem, but it is very likely tie > plus the overload from bignum/bigint. Both bigint/bignum and bigrat are a > cheat/trick to trick Perl into working with long numbers. It works for > simple cases, but breaks down for more complicated stuff due to hairy > edge cases - a bigint is an overloaded object and a lot of code does not > expect to get something else than a scalar. > > So in many cases it is better to use Math::BigInt (or BigFloat) > explicitely and use only long math when really nec. This also makes > things much faster, generally :) > > Some comments: > > * Please use an uppercase first letter for packages so "use Cobol;" and > not "use cobol;" unless you really want to write a pragma (which is some > sort of special package reserved for internal stuff enhancing Perl :) > * I don't have Win32/Console.pm - I took out the references to it and the > error occurs, so I guess it doesn't matter for this bug. > > Thanx for your report, > > Tels > > -- > Signed on Mon May 15 20:07:25 2006 with key 0x93B84C15. > Visit my photo gallery at http://bloodgate.com/photos/ > PGP key on http://bloodgate.com/tels.asc or per email. > > "Remember: If the game let's you do it, it's not cheating." -- Xarax > >
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: iso-8859-1
Content-Length: 6033
MIME-Version: 1.0
In-Reply-To: <000b01c67853$b1929470$6601a8c0 [...] EASTONSONY>
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.6.HEAD-25663-1169812756-448.19276-0-0 [...] rt.cpan.org>
References: <000b01c67853$b1929470$6601a8c0 [...] EASTONSONY>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 530
Download (untitled) / with headers
text/plain 530b
I am not sure what exactly you are trying to acomplish, so a bit Perl code with "expected here XYZ" lines would be good. Have you looked at the global rounding parameters: use Math::BigFloat; Math::BigFloat->accuracy(5); my $x = Math::BigFloat->new("1.2345678"); print "$x\n"; $x += '0.12345678'; print "$x\n"; Another method would be to create a subclass of Math::BigFloat and overload all the math operators. There is an example in the testsuite under t/Math/BigFloat/Subclass.pm for a minimal code. Best wishes, Tels
MIME-Version: 1.0
In-Reply-To: <000b01c67853$b1929470$6601a8c0 [...] EASTONSONY>
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.6.HEAD-24500-1173020747-1227.19276-0-0 [...] rt.cpan.org>
References: <000b01c67853$b1929470$6601a8c0 [...] EASTONSONY>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 175
Download (untitled) / with headers
text/plain 175b
Marking this as resolved since I can't figure out what the actual problem is, or what I should do. If you still have problems, please reply to this message to reopen the bug.


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.