develooper Front page | perl.perl5.porters | Postings from June 2021

Re: quadmath with 32 bit ints

Thread Previous | Thread Next
From:
sisyphus
Date:
June 9, 2021 09:50
Subject:
Re: quadmath with 32 bit ints
Message ID:
CADZSBj3Q6n61Q+8b5CAPTnQyhZJ9dPPp9JdmCSuuCdN6Mjq77Q@mail.gmail.com
On Wed, Jun 9, 2021 at 6:50 PM David Cantrell <david@cantrell.org.uk> wrote:
 [snip]

> Before I go digging into this, has anyone seen this before?
>

Yes, I think so:
https://github.com/Perl/perl5/issues/18533

My preferred (simplistic) patch to Calc.pm, which I eventually presented
at  https://github.com/pjacklam/p5-Math-BigInt/pull/1 (and which I've been
using successfully for the last few months) is:
#########
 --- Calc.pm_orig        2021-01-23 16:23:26 +1100
+++ Calc.pm     2021-01-23 16:30:19 +1100
@@ -147,6 +147,12 @@
         }
     }

+    # The above procedure leads to some test failures on perls where
ivsize is 4
+    # && nvtype is __float128. Here, for that configuration only, we hard
code
+    # in values known to work.
+    use Config;
+    if($Config{ivsize} == 4 && $Config{nvtype} eq '__float128') { $e = 9;
$int = 0; }
+
     __PACKAGE__ -> _base_len($e, $int);        # set and store

     use integer;
########

Thanks for raising !!
I just get ignored ... though there might be good reasons for that ...

Cheers,
Rob

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About