Skip Menu |
 

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

Report information
The Basics
Id: 99484
Status: new
Priority: 0/
Queue: Math-BigInt

People
Owner: Nobody in particular
Requestors: tdavenport [...] 4-catalyst.com
Cc:
AdminCc:

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



MIME-Version: 1.0
X-Spam-Status: No, score=-1.9 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9] autolearn=ham
X-Mailer: Microsoft Outlook 14.0
X-Spam-Flag: NO
Content-Language: en-us
content-type: text/plain; charset="utf-8"
Message-ID: <000a01cfe7d3$d46c5960$7d450c20$ [...] 4-catalyst.com>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Spam-Score: -1.9
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id B272424050A for <cpan-bug+Math-BigInt [...] hipster.bestpractical.com>; Tue, 14 Oct 2014 13:24:17 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pdtS2HlLz6qu for <cpan-bug+Math-BigInt [...] hipster.bestpractical.com>; Tue, 14 Oct 2014 13:24:16 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 866A92404FD for <bug-Math-BigInt [...] rt.cpan.org>; Tue, 14 Oct 2014 13:24:16 -0400 (EDT)
Received: (qmail 10175 invoked by alias); 14 Oct 2014 17:24:15 -0000
Received: from atl4mhob17.myregisteredsite.com (HELO atl4mhob17.myregisteredsite.com) (209.17.115.110) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Tue, 14 Oct 2014 10:24:13 -0700
Received: from mailpod.hostingplatform.com ([10.30.71.205]) by atl4mhob17.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id s9EHO8aB027364 for <bug-Math-BigInt [...] rt.cpan.org>; Tue, 14 Oct 2014 13:24:08 -0400
Received: (qmail 9394 invoked by uid 0); 14 Oct 2014 17:24:05 -0000
Received: from unknown (HELO daedalus) (tdavenport [...] 4-catalyst.com [...] 38.110.27.6) by 0 with ESMTPA; 14 Oct 2014 17:24:05 -0000
Delivered-To: cpan-bug+Math-BigInt [...] hipster.bestpractical.com
X-Tcpremoteip: 38.110.27.6
Subject: Cross-platform interoperability with BASE_LEN
Return-Path: <tdavenport [...] 4-catalyst.com>
Thread-Index: Ac/n09RRlDp5nzErQjewFtvxPpRMkA==
X-RT-Mail-Extension: math-bigint
X-Original-To: cpan-bug+Math-BigInt [...] hipster.bestpractical.com
X-Spam-Check-BY: la.mx.develooper.com
Date: Tue, 14 Oct 2014 13:25:20 -0400
X-Spam-Level:
X-Authenticated-Uid: tdavenport [...] 4-catalyst.com
To: <bug-Math-BigInt [...] rt.cpan.org>
Content-Transfer-Encoding: 7bit
From: "Todd Davenport" <tdavenport [...] 4-catalyst.com>
X-RT-Original-Encoding: ascii
X-RT-Interface: Email
Content-Length: 1481
Download (untitled) / with headers
text/plain 1.4k
It looks like the BASE_LEN const can never be overridden manually. Its calc'd during instantiation but there's no way for me to, say, do a $MBI->_base_len = 8 and override the value. The reason I need to do this is if you have perl code using 32-bit perl, building BigFloat objects with $BASE_LEN of 7 and saving them using Dumper or Storable. If you then load those in on a 64-bit more modern perl version, with a BASE_LEN of 9, and so the loaded values are all wrong. So for example, on a 64-bit Strawberry Perl on Windows (This is perl 5, version 18, subversion 2 (v5.18.2) built for MSWin32-x64-multi-thread): use Math::BigFloat; my $MBI = 'Math::BigInt::Calc'; my $num = bless( {"_m" => [4995822,1],"_es" => "-","_p" => -3,"_e" => [3],"sign" => "+"}, 'Math::BigFloat' ); print "baselen is ".$MBI->_base_len."\n"; print "num is ".$num->bstr."\n"; gives the following output: baselen is 9 num is 1004995.822 On a 32-bit ActivePerl on Windows (This is perl, v5.8.8 built for MSWin32-x86-multi-thread) : The output for the same code is: baselen is 7 num is 14995.822 If at a minimum you could manually set base_len in BigInt::Calc, we could then also set it in BigFloat, have it pass through to its helper object, and this would solve the problem. Even better would be for _base_len to be part of the BigFloat object, have it get saved as part of the bless from Dumper, then when its instantiated back in it passes it back to the MBI helper. Thanks for your time.
MIME-Version: 1.0
X-Spam-Status: No, score=-3.9 tagged_above=-99.9 required=10 tests=[AWL=2.000, BAYES_00=-1.9, FROM_OUR_RT=-4, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham
In-Reply-To: <rt-4.0.18-26146-1413307458-958.99484-3-0 [...] rt.cpan.org>
X-Mailer: Microsoft Outlook 14.0
X-Spam-Flag: NO
X-RT-Interface: API
References: <RT-Ticket-99484 [...] rt.cpan.org> <000a01cfe7d3$d46c5960$7d450c20$ [...] 4-catalyst.com> <rt-4.0.18-26146-1413307458-958.99484-3-0 [...] rt.cpan.org>
Content-Language: en-us
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <000601cfe8b1$a20cb170$e6261450$ [...] 4-catalyst.com>
content-type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -3.9
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id AF72E240496 for <cpan-bug+Math-BigInt [...] hipster.bestpractical.com>; Wed, 15 Oct 2014 15:51:50 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Hnjr6vy4miNh for <cpan-bug+Math-BigInt [...] hipster.bestpractical.com>; Wed, 15 Oct 2014 15:51:49 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 7F03C240463 for <bug-Math-BigInt [...] rt.cpan.org>; Wed, 15 Oct 2014 15:51:49 -0400 (EDT)
Received: (qmail 10180 invoked by alias); 15 Oct 2014 19:51:49 -0000
Received: from atl4mhob02.myregisteredsite.com (HELO atl4mhob02.myregisteredsite.com) (209.17.115.40) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Wed, 15 Oct 2014 12:51:46 -0700
Received: from mailpod.hostingplatform.com ([10.30.71.206]) by atl4mhob02.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id s9FJpe1x009737 for <bug-Math-BigInt [...] rt.cpan.org>; Wed, 15 Oct 2014 15:51:40 -0400
Received: (qmail 27805 invoked by uid 0); 15 Oct 2014 19:51:40 -0000
Received: from unknown (HELO daedalus) (tdavenport [...] 4-catalyst.com [...] 38.110.27.6) by 0 with ESMTPA; 15 Oct 2014 19:51:40 -0000
X-Tcpremoteip: 38.110.27.6
Delivered-To: cpan-bug+Math-BigInt [...] hipster.bestpractical.com
Subject: RE: [rt.cpan.org #99484] AutoReply: Cross-platform interoperability with BASE_LEN
Return-Path: <tdavenport [...] 4-catalyst.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+Math-BigInt [...] hipster.bestpractical.com
X-RT-Mail-Extension: math-bigint
Thread-Index: AQGx9bQeYldPw6iGJMDt6Tif6NGkiwHiaV36AlxbhdicS4GQUA==
Date: Wed, 15 Oct 2014 15:53:02 -0400
X-Spam-Level:
X-Authenticated-Uid: tdavenport [...] 4-catalyst.com
To: <bug-Math-BigInt [...] rt.cpan.org>
Content-Transfer-Encoding: 7bit
From: "Todd Davenport" <tdavenport [...] 4-catalyst.com>
RT-Message-ID: <rt-4.0.18-7858-1413402711-624.99484-0-0 [...] rt.cpan.org>
Content-Length: 89
Here's an idea of what I was thinking: https://github.com/microtodd/Perl-Math-BigFloat


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.