Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!caen!uflorida!gatech!mcnc!uvaarpa!mmdf From: eichin@athena.mit.edu (Mark W. Eichin) Newsgroups: comp.lang.perl Subject: Re: Perl-Users Digest #524, "unsigned long ints/mips/floats + FIX" Message-ID: <1990Dec18.010037.22579@uvaarpa.Virginia.EDU> Date: 18 Dec 90 01:00:37 GMT Sender: mmdf@uvaarpa.Virginia.EDU (Uvaarpa Mail System) Reply-To: eichin@athena.mit.edu Organization: The Internet Lines: 23 I submitted this to perl-users for the MIPS and RT, but looks like it applies to the Apollo too: With my patch: $ ./perl -e 'printf "%8x\n",unpack("N",pack("N",0x8000000f));' 8000000f Without the patch (straight pl41): $ perl -e 'printf "%8x\n",unpack("N",pack("N",0x8000000f));' Floating exception $ tb Process 7341 (parent 3885, group 7341) Time 90/12/17.16:45(EST) Program /usr/local/bin/perl Status 00120025: floating point operand error (OS/fault handler) In routine "/usr/local/bin/perl" offset 88294 Called from "/usr/local/bin/perl" offset 94664 It turns out that those addresses are in do_pack, in the case 'N', line 580. Using aulong for along takes care of it (the U_L doesn't end up being necessary, but that's "luck" ie it's defined as a simple case, I think...) _Mark_