Skip Menu |
 

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

Report information
The Basics
Id: 21413
Status: resolved
Priority: 0/
Queue: Math-BigInt

People
Owner: TELS [...] cpan.org
Requestors: peter.john.acklam [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.77
Fixed in: 1.78



Subject: blsft() and brsft() totally screwy
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1294
Download (untitled) / with headers
text/plain 1.2k
I categorized this as a critical bug since a math module is unreliable, and thus for many purposes useless, if the results are so erroneous as those below: Math::BigInt::VERSION is 1.77 Math::BigFloat::VERSION is 1.51 perl is v5.8.7 built for cygwin-thread-multi-64int The following works as expected: $ perl -MMath::BigFloat -wle \ 'print Math::BigFloat->new(shift)->blsft(0, 10)' -- '31.4159365' 31.4159365 The following also works as expected: $ perl -MMath::BigFloat -wle \ 'print Math::BigFloat->new(shift)->blsft(1, 10)' -- '31.4159365' 314.159365 The following should print '3.14159365': $ perl -MMath::BigFloat -wle \ 'print Math::BigFloat->new(shift)->blsft(-1, 10)' -- '31.4159365' 3 The following works fine, sort of, but appends a trailing zero: $ perl -MMath::BigFloat -wle \ 'print Math::BigFloat->new(shift)->brsft(0, 10)' -- '31.4159365' 31.41593650 The following should print '3.14159365', but is really screwy (note the TWO decimal separators): $ perl -MMath::BigFloat -wle \ 'print Math::BigFloat->new(shift)->brsft(1, 10)' -- '31.4159365' 3.141593651.4159365 The following should print '314.159365', but is also screwy: $ perl -MMath::BigFloat -wle \ 'print Math::BigFloat->new(shift)->brsft(-1, 10)' -- '31.4159365' 3000.02
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00
In-Reply-To: <rt-3.6.HEAD-416-1157892898-1312.21413-4-0 [...] rt.cpan.org>
Content-Disposition: inline
Received-SPF: neutral (x1.develooper.com: local policy)
References: <RT-Ticket-21413 [...] rt.cpan.org> <rt-3.6.HEAD-416-1157892898-1312.21413-4-0 [...] rt.cpan.org>
X-Pair-Authenticated: 84.63.35.168
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (ss1.fabel.dk [63.251.223.179]) by diesel.bestpractical.com (Postfix) with SMTP id 09B464D810D for <bug-Math-BigInt [...] rt.cpan.org>; Sun, 10 Sep 2006 09:44:28 -0400 (EDT)
Received: (qmail 12436 invoked by alias); 10 Sep 2006 13:44:28 -0000
Received: from relay03.pair.com (HELO relay03.pair.com) (209.68.5.17) by la.mx.develooper.com (qpsmtpd/0.28) with SMTP; Sun, 10 Sep 2006 06:44:22 -0700
Received: (qmail 86433 invoked from network); 10 Sep 2006 13:44:15 -0000
Received: from unknown (HELO bloodgate.com) (unknown) by unknown with SMTP; 10 Sep 2006 13:44:15 -0000
Delivered-To: cpan-bug+math-bigint [...] diesel.bestpractical.com
User-Agent: KMail/1.9.1
Subject: Re: [rt.cpan.org #21413] blsft() and brsft() totally screwy
Return-Path: <nospam-abuse [...] bloodgate.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: bug-Math-BigInt [...] rt.cpan.org
Date: Sun, 10 Sep 2006 15:45:58 +0200
Message-Id: <200609101545.58413 [...] bloodgate.com>
To: bug-Math-BigInt [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Tels <nospam-abuse [...] bloodgate.com>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.6.HEAD-426-1157895873-425.21413-0-0 [...] rt.cpan.org>
Content-Length: 4715
Download (untitled) / with headers
text/plain 4.6k
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 - -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Moin, On Sunday 10 September 2006 14:54, Peter John Acklam via RT wrote: Show quoted text
> Sun Sep 10 08:54:57 2006: Request 21413 was acted upon.
[snip] Show quoted text
> I categorized this as a critical bug since a math module is unreliable, > and thus for many purposes useless, if the results are so erroneous as > those below: > > Math::BigInt::VERSION is 1.77 > Math::BigFloat::VERSION is 1.51 > > perl is v5.8.7 built for cygwin-thread-multi-64int > > The following works as expected: > > $ perl -MMath::BigFloat -wle \ > 'print Math::BigFloat->new(shift)->blsft(0, 10)' -- '31.4159365' > 31.4159365 > > The following also works as expected: > > $ perl -MMath::BigFloat -wle \ > 'print Math::BigFloat->new(shift)->blsft(1, 10)' -- '31.4159365' > 314.159365 > > The following should print '3.14159365': > > $ perl -MMath::BigFloat -wle \ > 'print Math::BigFloat->new(shift)->blsft(-1, 10)' -- '31.4159365' > 3
I do not get why you think that shifting by a "negative" amount is supported :-D It clearly is not documented to be that way. (I can understand that you would expect the result, tho) Show quoted text
> The following works fine, sort of, but appends a trailing zero: > > $ perl -MMath::BigFloat -wle \ > 'print Math::BigFloat->new(shift)->brsft(0, 10)' -- '31.4159365' > 31.41593650
Actually, it doesn't. perl -MMath::BigFloat -wle 'print scalar \ Math::BigFloat->new(shift)->brsft(0, 10)' -- '31.4159365' The reason is that print calls brsft() in list context, and brsft() does seem to call bdiv() in list context, too: sub brsft { ... $x->bdiv($n->bpow($y),$a,$p,$r,$y); } There probably should be a "scalar" before that call to bdiv. The "0" is appended due to (from the POD): =item bdiv The following will probably not do what you expect: print $c->bdiv(123.456),"\n"; It prints both quotient and reminder since print works in list context. Also, bdiv() will modify $c, so be carefull. You probably want to use print $c / 123.456,"\n"; print scalar $c->bdiv(123.456),"\n"; # or if you want to modify $c instead. :) Show quoted text
> The following should print '3.14159365', but is really screwy > (note the TWO decimal separators): > > $ perl -MMath::BigFloat -wle \ > 'print Math::BigFloat->new(shift)->brsft(1, 10)' -- '31.4159365' > 3.141593651.4159365
Same "bug" again. Show quoted text
> The following should print '314.159365', but is also screwy: > > $ perl -MMath::BigFloat -wle \ > 'print Math::BigFloat->new(shift)->brsft(-1, 10)' -- '31.4159365' > 3000.02
Same "bug". It returns "300", tho, so shifting by negative amounts could use some correction. Negative amounts of shifting should probably either be supported, or disallowed. They certainly werent expected when I wrote the code. I do not have much time right now, holidy coming up etc. It might be that I will not be able to look into these issues before 2006-10-10 :/ (I fixed the scalar issue in my local copy of v1.78, see http://Bloodgate.com/perl/packages/devel/Math-BigInt-1.78.tar.gz for a snapshot) Thank you for your report! All the best, Tels - - -- Signed on Sun Sep 10 15:25:35 2006 with key 0x93B84C15. Visit my photo gallery at http://bloodgate.com/photos/ PGP key on http://bloodgate.com/tels.asc or per email. "Given enough time, all legal battles in the tech industry will invoke the DMCA. This generally means that all constructive arguments have ended." NialScorva's law - - -- Signed on Sun Sep 10 15:37:28 2006 with key 0x93B84C15. Visit my photo gallery at http://bloodgate.com/photos/ PGP key on http://bloodgate.com/tels.asc or per email. "Retsina?" - "Ja, Papa?" - "Warp 3." - "Is gut, Papa." - -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iQEVAwUBRQQVlncLPEOTuEwVAQI0Kwf+IOhUoTnI4NZRXovuPo1Hn60KkO/rfKk+ 8H9voiVYR3Fpw3f3pLGcoEwzRKh9g/OJoFyh9F/eOJ8iEAcE9YSDOZOlgCyp8SOW con6+EK2Gw6NqqBpGHGYcb5o06nC3cZ5FyO5zFsqp+nGQvDnNaVYBDaqgZDxscWo bErcod7D9qBraAniHDsimH1Y0DMJ1o+EapqXP/LgP33T8AVNCkqsKuFHiYYGYwXi tktoEl6wnkO8RpqT2iWrkD31Ox98Vx/jWbrNA3GoBKvgFntBr0D7gBVlDs8Y2Tkw 4xJ1/5a9EVbEO3wWUYonV4f6gxS39gybTTCSOv4iyUYvbOOG4gOJHg== =sWrR - -----END PGP SIGNATURE----- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iQEVAwUBRQQXFncLPEOTuEwVAQLHcAf+MFNYqnf3+JOWNxGfVzEIP4y0CJYOfYYv m6CT2ZIW7iqkiDSULjercA5xb113yYMdOWGcx3e5nmUu/uLMxyzvTJWB+XMXE+Op 5tb6twPOwW7sc0+xOf7fkR1IRIAx08ESNEKKto/euv8LVkeh/UZXcXTcKRfbNIrr 2+UxUmFB1zaPJ3wVvRSEgDpWHBPhmOE4RFJMzpRvrVQHrCF2hPxyFjthd4F0xv8R xMBgXKLgKrzvQzt2LWXBYNEts3W05HPCf6kLathJPf+KrQTBbqsIezkdAy8BMNIC 8ORLyuDz3jWJEYSWDid9GmM1ZiwsZ0z/oBajBoxfq2kEc5NV8Q979A== =9rFL -----END PGP SIGNATURE-----
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00
In-Reply-To: <rt-3.6.HEAD-426-1157895873-425.21413-5-0 [...] rt.cpan.org>
Content-Disposition: inline
Received-SPF: neutral (x1.develooper.com: local policy)
References: <RT-Ticket-21413 [...] rt.cpan.org> <200609101545.58413 [...] bloodgate.com> <rt-3.6.HEAD-426-1157895873-425.21413-5-0 [...] rt.cpan.org>
X-Pair-Authenticated: 84.63.35.168
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (ss1.fabel.dk [63.251.223.179]) by diesel.bestpractical.com (Postfix) with SMTP id C58894D80C5 for <bug-Math-BigInt [...] rt.cpan.org>; Sun, 10 Sep 2006 10:16:23 -0400 (EDT)
Received: (qmail 23450 invoked by alias); 10 Sep 2006 14:16:23 -0000
Received: from relay01.pair.com (HELO relay01.pair.com) (209.68.5.15) by la.mx.develooper.com (qpsmtpd/0.28) with SMTP; Sun, 10 Sep 2006 07:16:18 -0700
Received: (qmail 95539 invoked from network); 10 Sep 2006 14:16:12 -0000
Received: from unknown (HELO bloodgate.com) (unknown) by unknown with SMTP; 10 Sep 2006 14:16:12 -0000
Delivered-To: cpan-bug+math-bigint [...] diesel.bestpractical.com
User-Agent: KMail/1.9.1
Subject: Re: [rt.cpan.org #21413] blsft() and brsft() totally screwy
Return-Path: <nospam-abuse [...] bloodgate.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: bug-Math-BigInt [...] rt.cpan.org
Date: Sun, 10 Sep 2006 16:13:24 +0200
Message-Id: <200609101613.25017 [...] bloodgate.com>
To: bug-Math-BigInt [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Tels <nospam-abuse [...] bloodgate.com>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.6.HEAD-450-1157897789-1120.21413-0-0 [...] rt.cpan.org>
Content-Length: 2008
Download (untitled) / with headers
text/plain 1.9k
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Moin, On Sunday 10 September 2006 15:44, nospam-abuse@bloodgate.com via RT wrote: Show quoted text
> Queue: Math-BigInt > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21413 >
> > The following works fine, sort of, but appends a trailing zero: > > > > $ perl -MMath::BigFloat -wle \ > > 'print Math::BigFloat->new(shift)->brsft(0, 10)' -- '31.4159365' > > 31.41593650
> > Actually, it doesn't. > > perl -MMath::BigFloat -wle 'print scalar \ > Math::BigFloat->new(shift)->brsft(0, 10)' -- '31.4159365' > > The reason is that print calls brsft() in list context, and brsft() does > seem to call bdiv() in list context, too: > > sub brsft > { > ... > $x->bdiv($n->bpow($y),$a,$p,$r,$y); > } > > There probably should be a "scalar" before that call to bdiv.
Actually, there shouldn't because the doc say (in the synopsis): $x->brsft($y); # right shift # return (quo,rem) or quo if scalar I took the "scalar " out again. (It remains in bpow() since that isn't supposed to return the reminder only in one case) Thank you for your report! Best wishes, Tels - -- Signed on Sun Sep 10 16:12:02 2006 with key 0x93B84C15. Visit my photo gallery at http://bloodgate.com/photos/ PGP key on http://bloodgate.com/tels.asc or per email. "We're confident that DNF will be one of the greatest, if not the greatest, game of 1998. And this confidence is not misplaced." -Scott Miller, 1997 (http://tinyurl.com/6m8nh) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iQEVAwUBRQQdhHcLPEOTuEwVAQL7GAf+P0LedRs6ztqBrthQIDc5BRS2p585f32+ Rq3BdU75Ic+F3Q8SDro10MFjJ/Hog9Cr+KQx/0LevGjQxvKn2F2TJ9ubyUj2LElV cVbVihliBeB7vycBbNsUaem7tB9BAJkHCTlm57jEGTEprU/tdYRIUwk8ypYyEpAd 7/2RsFuCuOwHGSvP452Lz85BZk93p+6D7zlfZh/iN9BjoIrPqBvvM8oTHBMmfAtC Dtox7CgmLHJH1EX3PQCyV+oVhpRaHjoYBTpJ5bCJmqLW0WahMEwR/Hr6wa4Dwvlq fvceX9FkamYugQU3aqfENFinLoiy/PBCtNgEkBpVr9CG91HGASd41Q== =+VLc -----END PGP SIGNATURE-----
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00
In-Reply-To: <rt-3.6.HEAD-416-1157892898-1312.21413-4-0 [...] rt.cpan.org>
Content-Disposition: inline
Received-SPF: neutral (x1.develooper.com: local policy)
References: <RT-Ticket-21413 [...] rt.cpan.org> <rt-3.6.HEAD-416-1157892898-1312.21413-4-0 [...] rt.cpan.org>
X-Pair-Authenticated: 84.63.35.168
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (ss1.fabel.dk [63.251.223.179]) by diesel.bestpractical.com (Postfix) with SMTP id 15FBC4D80C5 for <bug-Math-BigInt [...] rt.cpan.org>; Sun, 10 Sep 2006 10:22:25 -0400 (EDT)
Received: (qmail 25428 invoked by alias); 10 Sep 2006 14:22:25 -0000
Received: from relay03.pair.com (HELO relay03.pair.com) (209.68.5.17) by la.mx.develooper.com (qpsmtpd/0.28) with SMTP; Sun, 10 Sep 2006 07:22:22 -0700
Received: (qmail 90074 invoked from network); 10 Sep 2006 14:22:16 -0000
Received: from unknown (HELO bloodgate.com) (unknown) by unknown with SMTP; 10 Sep 2006 14:22:16 -0000
Delivered-To: cpan-bug+math-bigint [...] diesel.bestpractical.com
User-Agent: KMail/1.9.1
Subject: Re: [rt.cpan.org #21413] blsft() and brsft() totally screwy
Return-Path: <nospam-abuse [...] bloodgate.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: bug-Math-BigInt [...] rt.cpan.org
Date: Sun, 10 Sep 2006 16:28:09 +0200
Message-Id: <200609101628.09468 [...] bloodgate.com>
To: bug-Math-BigInt [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Tels <nospam-abuse [...] bloodgate.com>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.6.HEAD-450-1157898150-1462.21413-0-0 [...] rt.cpan.org>
Content-Length: 1330
Download (untitled) / with headers
text/plain 1.2k
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Moin, I updated the documentation under CAVEATS to avoid the gotcha! with the "appended 0" and the similiar issues you reported. I also made brsft() and blsft() call the other one on negative amounts. perl -MMath::BigFloat -wle \ 'print Math::BigFloat->new(shift)->brsft(-1, 10)' -- '31.4159365' prints now: 314.159365 Can you please try the updated snapshot and see if that fixes all your issues? http://bloodgate.com/perl/packages/devel/Math-BigInt-1.78.tar.gz All the best, Tels - -- Signed on Sun Sep 10 16:26:31 2006 with key 0x93B84C15. Visit my photo gallery at http://bloodgate.com/photos/ PGP key on http://bloodgate.com/tels.asc or per email. Q: "Dr. Fisher, how did you begin your great career in Contact Dermatology?" Dr. Alexander Fisher: "I started from Scratch!" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iQEVAwUBRQQg+XcLPEOTuEwVAQKlmgf9HY15/BcwB3p/7qWesb++VwVlByXUYick 6tD/oRaCjzh/rI0LzynMeyny+wQSLT44XTRX1HfuTqyyYdiemvOTiaDGPI1BsT5q /hhIH16VvRn/Rth6Xs1OenpD2qVkTFNzVP43H6BAhqbvQ9nrQF5HGvgolj0pKWoi kK25EP6ysFNfuF2/2g67X24KhQ064VgM76TDgRuXpaE+IgtByT7u/OfacPA61Mx3 1JE0bd9tDHpoh4QM68yDSxDaHYrjciXYTTRHlLM2duelkQIgI2GByPQKdt5yzsgV yAdbJxDTtOaXxUHJ8yj75r0csDniOlFPHvarqOHGkW6a+XFFDHWxRw== =YeGZ -----END PGP SIGNATURE-----
MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-426-1157895873-425.21413-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
References: <RT-Ticket-21413 [...] rt.cpan.org> <rt-3.6.HEAD-416-1157892898-1312.21413-4-0 [...] rt.cpan.org> <200609101545.58413 [...] bloodgate.com> <rt-3.6.HEAD-426-1157895873-425.21413-0-0 [...] rt.cpan.org>
Message-Id: <rt-3.6.HEAD-405-1157900259-19.21413-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
From: pjacklam [...] online.no
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 807
Download (untitled) / with headers
text/plain 807b
nospam-abuse@bloodgate.com wrote: Show quoted text
> I do not get why you think that shifting by a "negative" amount is > supported :-D It clearly is not documented to be that way. (I can > understand that you would expect the result, tho)
It's not documented not to be that way either, and no error is given, so I assumed it would work. The documentation says $x->blsft($y); # left shift $x->blsft($y,$n); # left shift, in base $n (like 10) with no restriction on $y. It's quite obvious that $y must be an integer, but nowhere does it say $y must be non-negative. Show quoted text
> Negative amounts of shifting should probably either be supported, or > disallowed. They certainly werent expected when I wrote the code.
OK. Then disallow them. At least for now. I guess that requires less work than adding support for it. :-)
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00
In-Reply-To: <rt-3.6.HEAD-405-1157900259-19.21413-5-0 [...] rt.cpan.org>
Content-Disposition: inline
Received-SPF: neutral (x1.develooper.com: local policy)
References: <RT-Ticket-21413 [...] rt.cpan.org> <rt-3.6.HEAD-426-1157895873-425.21413-5-0 [...] rt.cpan.org> <rt-3.6.HEAD-405-1157900259-19.21413-5-0 [...] rt.cpan.org>
X-Pair-Authenticated: 84.63.35.168
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (ss1.fabel.dk [63.251.223.179]) by diesel.bestpractical.com (Postfix) with SMTP id B0CBB4D80C5 for <bug-Math-BigInt [...] rt.cpan.org>; Sun, 10 Sep 2006 11:20:34 -0400 (EDT)
Received: (qmail 12612 invoked by alias); 10 Sep 2006 15:20:33 -0000
Received: from relay03.pair.com (HELO relay03.pair.com) (209.68.5.17) by la.mx.develooper.com (qpsmtpd/0.28) with SMTP; Sun, 10 Sep 2006 08:20:31 -0700
Received: (qmail 96385 invoked from network); 10 Sep 2006 15:20:24 -0000
Received: from unknown (HELO bloodgate.com) (unknown) by unknown with SMTP; 10 Sep 2006 15:20:24 -0000
Delivered-To: cpan-bug+math-bigint [...] diesel.bestpractical.com
User-Agent: KMail/1.9.1
Subject: Re: [rt.cpan.org #21413] blsft() and brsft() totally screwy
Return-Path: <nospam-abuse [...] bloodgate.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: bug-Math-BigInt [...] rt.cpan.org
Date: Sun, 10 Sep 2006 17:27:09 +0200
Message-Id: <200609101727.10061 [...] bloodgate.com>
To: bug-Math-BigInt [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Tels <nospam-abuse [...] bloodgate.com>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.6.HEAD-433-1157901638-603.21413-0-0 [...] rt.cpan.org>
Content-Length: 2246
Download (untitled) / with headers
text/plain 2.1k
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Moin, On Sunday 10 September 2006 16:57, Peter John Acklam via RT wrote: Show quoted text
> Queue: Math-BigInt > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21413 > > > nospam-abuse@bloodgate.com wrote:
> > I do not get why you think that shifting by a "negative" amount is > > supported :-D It clearly is not documented to be that way. (I can > > understand that you would expect the result, tho)
> > It's not documented not to be that way either, and no error is given, so > I assumed it would work. The documentation says > > $x->blsft($y); # left shift > $x->blsft($y,$n); # left shift, in base $n (like 10) > > with no restriction on $y. It's quite obvious that $y must be an > integer, but nowhere does it say $y must be non-negative.
You are right, but then in my mind, "left" implies it moves left, not "the other left" :-) I guess as a non-native speaker I am not actually qualified to write documentation. Problem is, as always, when the documentation write, programmer, tester, implementor, specificator and designer are all the same person :) Show quoted text
> > Negative amounts of shifting should probably either be supported, or > > disallowed. They certainly werent expected when I wrote the code.
> > OK. Then disallow them. At least for now. I guess that requires less > work than adding support for it. :-)
Should work now, please see my other email :D testcases are still missing, tho, as my bathroom cleaning duty had priority. Best wishes, Tels - -- Signed on Sun Sep 10 17:25:15 2006 with key 0x93B84C15. Visit my photo gallery at http://bloodgate.com/photos/ PGP key on http://bloodgate.com/tels.asc or per email. "I'm not a vegetarian, but I eat animals who are" -- Groucho Marx -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iQEVAwUBRQQuzncLPEOTuEwVAQL0CQf9Gd/QlOtH4HaGvwioSnid/W6VN5Z/Qku4 bY+hcsQkDojSkMssj9+pednbt3kWlfSz/ioiamTH6px5VPqyO51acEHqQXKDuP5h P8ThFqVjqD+quwjsdI/TbJobhA7qxJsViPZclDuvmcr6/7lIJ92GaRcpTpJPsSjZ o7BDlWOv+XyIeDkkCD5dn6KPDFd6xGEIxMiMbyF027wOpiF1322MxZqgu1UpnU3a bOgO3Klx30f2byZ+12GKQC9wGdsH9BBUWdRMCXdc9e8sXK+OM20CmzkG2znrFII3 srBupbWRE3NX2g3je0o3tR4opcCXE5oiHAM8brYwv6Fo2fj6D0xGAg== =O2hU -----END PGP SIGNATURE-----
MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-433-1157901638-603.21413-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
References: <RT-Ticket-21413 [...] rt.cpan.org> <rt-3.6.HEAD-426-1157895873-425.21413-5-0 [...] rt.cpan.org> <rt-3.6.HEAD-405-1157900259-19.21413-5-0 [...] rt.cpan.org> <200609101727.10061 [...] bloodgate.com> <rt-3.6.HEAD-433-1157901638-603.21413-0-0 [...] rt.cpan.org>
Message-Id: <rt-3.6.HEAD-450-1157912167-1886.21413-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
From: pjacklam [...] online.no
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 180
Download (untitled) / with headers
text/plain 180b
I'm sorry I missed the context issue. It didn't occur to me that blsft() and brsft() behaved differently in list context. I have tested the new version and it works nicely. Thanks.
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00
In-Reply-To: <rt-3.6.HEAD-450-1157912167-1886.21413-5-0 [...] rt.cpan.org>
Content-Disposition: inline
Received-SPF: neutral (x1.develooper.com: local policy)
References: <RT-Ticket-21413 [...] rt.cpan.org> <rt-3.6.HEAD-433-1157901638-603.21413-5-0 [...] rt.cpan.org> <rt-3.6.HEAD-450-1157912167-1886.21413-5-0 [...] rt.cpan.org>
X-Pair-Authenticated: 84.63.4.49
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (ss1.fabel.dk [63.251.223.179]) by diesel.bestpractical.com (Postfix) with SMTP id 456754D809F for <bug-Math-BigInt [...] rt.cpan.org>; Sun, 10 Sep 2006 15:37:04 -0400 (EDT)
Received: (qmail 15436 invoked by alias); 10 Sep 2006 19:37:04 -0000
Received: from relay03.pair.com (HELO relay03.pair.com) (209.68.5.17) by la.mx.develooper.com (qpsmtpd/0.28) with SMTP; Sun, 10 Sep 2006 12:37:00 -0700
Received: (qmail 18481 invoked from network); 10 Sep 2006 19:36:52 -0000
Received: from unknown (HELO bloodgate.com) (unknown) by unknown with SMTP; 10 Sep 2006 19:36:52 -0000
Delivered-To: cpan-bug+math-bigint [...] diesel.bestpractical.com
User-Agent: KMail/1.9.1
Subject: Re: [rt.cpan.org #21413] blsft() and brsft() totally screwy
Return-Path: <nospam-abuse [...] bloodgate.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: bug-Math-BigInt [...] rt.cpan.org
Date: Sun, 10 Sep 2006 21:43:31 +0200
Message-Id: <200609102143.39349 [...] bloodgate.com>
To: bug-Math-BigInt [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Tels <nospam-abuse [...] bloodgate.com>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.6.HEAD-433-1157917029-1777.21413-0-0 [...] rt.cpan.org>
Content-Length: 1370
Download (untitled) / with headers
text/plain 1.3k
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Moin, On Sunday 10 September 2006 20:16, Peter John Acklam via RT wrote: Show quoted text
> Queue: Math-BigInt > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21413 > > > I'm sorry I missed the context issue. It didn't occur to me that blsft() > and brsft() behaved differently in list context. I have tested the new > version and it works nicely. Thanks.
No problem, it should have been documented better (and it is still a bit wierd that only brsft() works differently in list context). best wishes, tels - -- Signed on Sun Sep 10 21:42:58 2006 with key 0x93B84C15. Visit my photo gallery at http://bloodgate.com/photos/ PGP key on http://bloodgate.com/tels.asc or per email. "If you want to travel around the world and be invited to speak at a lot of different places, just write a Unix operating system." -- Linus Torvalds -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iQEVAwUBRQRq63cLPEOTuEwVAQKr9gf/Tc25IEmydDehAg+U3a63Wb59uITxPtng R2EnUZF5zWd7Yl/ZMRpYUmcue4K5BjncEQuZq18oEyV/cFBKv+rqB0x4I15Ch6MQ 3onL/iaFA545tprS24BC00HFd1XHswJEJBnguX7uhHQMM47B03wYm8h/8+taBeTU UxzPy0rgbsGvEI9J9eixiDL+REKl6FV5ZIoHBIt1JdO0f2YgECkaC9zioA84+Ul6 l8tG/g/gT5yJgIFmyklIJvJfx6Ipgu/lpvUqa8AD6pnvt0oIhmqzeLtmZeYLiF+H icsPIVRAeFxIidAbnhXxGo7EvbBv/KB+7t0n6GbYgzr65V8bSdfwHQ== =yWVx -----END PGP SIGNATURE-----
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.6.HEAD-4388-1170421646-219.21413-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 82
This issue has been fixed in the released v1.78. Thank you for your report, Tels


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.