Log for attempted build of libmath-mpfr-perl_3.17-1 on m68k (dist=unstable)
sisyphus1 at optusnet.com.au
sisyphus1 at optusnet.com.au
Sat May 4 04:27:36 UTC 2013
-----Original Message-----
From: Daniel Kahn Gillmor
Sent: Saturday, May 04, 2013 12:20 AM
> On 05/03/2013 08:53 AM, sisyphus1 at optusnet.com.au wrote:
>
> > I don't think the loss of precision is an issue here.
> > It isn't a problem on my little-endian machine (which also has 64-bit IV
> > and 32-bit mp_prec_t).
> > I'm thinking that if, on a big-endian machine, I can re-rarrange the
> > byte order of the long long (IV) appropriately, then the 'P' specifier
> > should still be able to come up with the right figure.
> > And I speculate that the 'return unpack("J>", pack("J<", $_[0]));' will
> > perform that re-arrangement correctly.
>
> hm, i'm in the weeds on this one too, but...
>
> > At least, that's what I guess/think/hope .... but I don't have a
> > big-endian machine at my disposal,
>
> this is something i can help with! Rob, i could set up a powerpc
> machine and get you shell access over the network if it would help. let
> me know off-list, and i'll try to take care of it today or tomorrow.
>
I wonder if it's just a matter of moving the 4 low bytes into the top 4
bytes (which is a left shift of 32 places) ?
Could someone try this script (on one of the big-endian machines) and send
me the output, please :
/**********************************/
#include <stdio.h>
#include <mpfr.h>
int main(void) {
long long int a[9] = {80LL, 580LL, 1000001LL, 5003607LL, 2107083607LL,
2147483647LL, 2140000000LL, 1454735360LL, 1868562432LL};
long long int b[9] = {1342177280LL, 1140981760LL, 1094848256LL,
1465469952LL, 1468766077LL, 4294967167LL, 13602175LL, 8435030LL, 24687LL};
int i;
for(i = 0; i < 9; ++i) {
printf("Want %llu\n", a[i]);
mpfr_printf("Got %Pu\n\n", b[i]);
}
for(i = 0; i < 9; ++i) {
printf("Want %llu\n", a[i]);
mpfr_printf("Got %Pu\n\n", a[i] << 32);
}
return 0;
}
/**********************************/
I think the second of the 2 "for" loops in that script will produce the
results I'm after. If it doesn't, then I should at least be able to work out
from the results precisely what needs to be done - if, indeed, there is
something that can be done.
(The first "for" loop uses values that I now think are wrong. I'll leave it
there in case it provides something useful.)
I also need to check with the mpfr team that I'm not puzzling over an mpfr
bug. I don't think there is any mpfr bug at play here, but I'll wait til I
see the results of the above script before I make any enquiries about that.
Cheers,
Rob
PS
Daniel, I'll get back to you (off-list) about the access to the powerpc
machine later today.
More information about the pkg-perl-maintainers
mailing list